0
0
Fork 0

Lay foundation for event communication

This commit is contained in:
Tyler-A 2020-08-02 23:43:12 -06:00
parent 8fd9fdcc74
commit b8304cc285
2 changed files with 9 additions and 5 deletions

View file

@ -59,7 +59,7 @@
v-if="type === 'Tracks' && data_exists" v-if="type === 'Tracks' && data_exists"
id="playlist_button" id="playlist_button"
> >
<button @click.self="event('export-attempt')"> <button @click.self="event('playlist_export')">
Export Playlist Export Playlist
</button> </button>
</div> </div>
@ -118,7 +118,7 @@ export default {
} }
}, },
methods: { methods: {
event(name) { this.$emit(name); }, event(name, data=null) { this.$emit(name, data); },
get_user() {}, get_user() {},
verify_request_amount() { verify_request_amount() {
let amount; let amount;

View file

@ -3,7 +3,8 @@
<Control <Control
:dev="dev_mode" :dev="dev_mode"
:preview="preview_mode" :preview="preview_mode"
@export-attempt="handle_export" @playlist_export="handle_export"
@data_request="get_data"
/> />
</div> </div>
</template> </template>
@ -24,8 +25,11 @@ export default {
computed: {}, computed: {},
methods: { methods: {
handle_export() { handle_export() {
alert("Potato") console.log("Handling the export");
} },
get_data() {
console.log("Fetching data from Spotify")
},
} }
} }
</script> </script>