Level 2
You have to Bind the Label.
<el-table>
<el-table-column :label="value" width="120px" align="center" />
</el-table>
Placeholder will also be Bind.
:placeholder="options[0].label"
1 like
I am using Element (https://element.eleme.io/#/en-US/component/select) to design my Admin Panel.
I have a Select. Now I want to select an option. With that The header of the Table Title will be changed. How is this possible?
Another problem is I want to placeholder the first element of the Select-Option.
Code:
Select Part:
<el-select v-model="value" placeholder="Select">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
Table:
<el-table>
<el-table-column label="value" width="120px" align="center" />
</el-table>
I want to make dynamic this label
JS:
data() {
return {
options: [{
value: 'billingCountry',
label: 'Billing Country'
}, {
value: 'billingState',
label: 'Billing State'
}, {
value: 'billingCity',
label: 'Billing City'
}, {
value: 'billingZIP',
label: 'Billing ZIP'
}, {
value: 'shippingCountry',
label: 'Shipping Country'
}],
value: ''
}
}
You have to Bind the Label.
<el-table>
<el-table-column :label="value" width="120px" align="center" />
</el-table>
Placeholder will also be Bind.
:placeholder="options[0].label"
Please or to participate in this conversation.