I currently have the following code snippet:
<b-dropdown text="Select Factory" block variant="primary" class="m-2" menu-class="w-100">
<b-dropdown-item @click="selectedFactory='China'">China</b-dropdown-item>
<b-dropdown-item @click="selectedFactory='Europe'">Europe</b-dropdown-item>
</b-dropdown>
<b-dropdown text="Select Toy" block variant="primary" class="m-2" menu-class="w-100">
<b-dropdown-item @click="selectedToy='Marvel'">Marvel</b-dropdown-item>
<b-dropdown-item @click="selectedToy='Toy Story'">Toy Story</b-dropdown-item>
</b-dropdown>
I am trying to figure out how to make this code dynamic so that the source link changes based on the dropdown selection. Currently, when embedded in an iframe, it doesn't respond to the dropdown selections. I suspect it might be related to the compute function, but I'm not entirely certain.
export default {
el: '#apps',
data () {
return {
source:'http://127.0.0.1:5503/src/html/`{{this.selectedFactory}}`_{{this.selectedToy}}.html',
selectedFactory: '',
selectedToy:'',
}
},
computed:{
}
}