trying to create a dependency between two form select options where in the second select tag i would like to show data based on the first option select. I know i can use v-if but it's not really giving me a solution that feels like best practice. my relevant part of the form looks like this:
<el-form-item label="Provider">
<el-select v-model="form.provider" placeholder="select provider">
<el-option v-for="provider in form.providers"
:label="provider"
:value="provider">{{provider}}
</el-option>
</el-select>
</el-form-item>
<el-form-item label="Accounts">
<el-select v-model="form.account" placeholder="Select account">
<!--****here it is****-->
<el-option v-for="account in form.accounts.revcontent"
label="account"
value="account">{{account}}</el-option>
</el-select>
</el-form-item>
now here in my code im using provider name hardcoded -> revcontent but i would like this value to be the v-model="form.provider" value.
so incase user chose revcontent as provider what actually happenning is what show sin this piece of code but if he chose adsense for example the logic sould change to this:
<el-option v-for="account in form.accounts.adsense"...>
I tried solutions like:
v-for="account in form.accounts.form.provider"
and
v-for="account in form.accounts.{{form.proivder}}"
but they obviously didn't work any idea how can i achive this in a way that will consider as best practice ?? thx