Hello I am trying to pass the this.masterVolume
from the parent to the child settingSlider
When I try to look this up I only find people passing string literals to children. How do I pass data that is defined on the parent to the child?
<template>
<section class="av-section" id="audio-section">
<div class="av-groupbox">
<h3 class="av-groupbox-header-text">Audio</h3>
<div class="av-user-element">
<settingSlider _value={{masterVolume}} v-on:input="changeVolume($event)" min="0" max="1" step="0.01" label="Master Volume"></settingSlider>
</div>
</div>
</section>
</template>
<script lang="ts">
export default defineComponent({
name: "SettingsAudioSection",
components: {
settingSlider,
settingsKeybox
},
mounted() {
this.masterVolume = PlayerSettings.get[PlayerSettings.TYPE.VOLUME]
},
data() {
return {
masterVolume: PlayerSettings.get[PlayerSettings.TYPE.VOLUME],
}
},
methods: {
changeVolume(volume: number) {
},
},
});
</script>