fix(form): select option label不生效

This commit is contained in:
roymondchen 2024-05-08 14:44:04 +08:00
parent 0f2bd3f01d
commit 9034cef0d2

View File

@ -24,7 +24,15 @@
v-for="(group, index) in (options as SelectGroupOption[])" v-for="(group, index) in (options as SelectGroupOption[])"
:key="index" :key="index"
:is="optionGroupComponent?.component || 'el-option-group'" :is="optionGroupComponent?.component || 'el-option-group'"
v-bind="optionGroupComponent?.props(group) || group" v-bind="
optionGroupComponent?.props({
label: group.label,
disabled: group.disabled,
}) || {
label: group.label,
disabled: group.disabled,
}
"
> >
<component <component
v-for="(item, index) in group.options" v-for="(item, index) in group.options"
@ -51,7 +59,17 @@
class="tmagic-design-option" class="tmagic-design-option"
:key="config.valueKey ? option.value[config.valueKey] : option.value" :key="config.valueKey ? option.value[config.valueKey] : option.value"
:is="optionComponent?.component || 'el-option'" :is="optionComponent?.component || 'el-option'"
v-bind="optionComponent?.props(option) || option" v-bind="
optionComponent?.props({
label: option.text,
value: option.value,
disabled: option.disabled,
}) || {
label: option.text,
value: option.value,
disabled: option.disabled,
}
"
> >
</component> </component>
</template> </template>