Lay foundation for event communication
This commit is contained in:
parent
8fd9fdcc74
commit
b8304cc285
2 changed files with 9 additions and 5 deletions
|
|
@ -59,7 +59,7 @@
|
|||
v-if="type === 'Tracks' && data_exists"
|
||||
id="playlist_button"
|
||||
>
|
||||
<button @click.self="event('export-attempt')">
|
||||
<button @click.self="event('playlist_export')">
|
||||
Export Playlist
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -118,7 +118,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
event(name) { this.$emit(name); },
|
||||
event(name, data=null) { this.$emit(name, data); },
|
||||
get_user() {},
|
||||
verify_request_amount() {
|
||||
let amount;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<Control
|
||||
:dev="dev_mode"
|
||||
:preview="preview_mode"
|
||||
@export-attempt="handle_export"
|
||||
@playlist_export="handle_export"
|
||||
@data_request="get_data"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -24,8 +25,11 @@ export default {
|
|||
computed: {},
|
||||
methods: {
|
||||
handle_export() {
|
||||
alert("Potato")
|
||||
}
|
||||
console.log("Handling the export");
|
||||
},
|
||||
get_data() {
|
||||
console.log("Fetching data from Spotify")
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue