00:00:00
elementuiCheckbox显示值的问题
elementui 的 Checkbox 组件在多选框组的情况下,想要传给后端的值与所想要展示的值不一致时,如:
<el-checkbox-group v-model="checkboxGroup2" size="mini" disabled>
<el-checkbox label="备选项1" border></el-checkbox>
<el-checkbox label="备选项2" border></el-checkbox>
</el-checkbox-group>可将需要展示的值用插值表达式放在 el-checkbox 标签中,改为:
<el-checkbox-group v-model="checkboxGroup2" size="mini" disabled>
<el-checkbox label="备选项1" border>{{想要展示的值}}</el-checkbox>
<el-checkbox label="备选项2" border>{{想要展示的值}}</el-checkbox>
</el-checkbox-group>