diff --git a/package/component/src/component/formItem/index.vue b/package/component/src/component/formItem/index.vue index bac2e15d..25f1ba19 100644 --- a/package/component/src/component/formItem/index.vue +++ b/package/component/src/component/formItem/index.vue @@ -166,19 +166,22 @@ onMounted(() => { }); const getMarginLeft = computed(() => { - if (props.mode == "block") { - if(props.labelPosition != "top") { - let labelWidth = typeof props.labelWidth === "string" ? parseFloat(props.labelWidth) : props.labelWidth; - labelWidth += 15; - return { - "margin-left": `${labelWidth}px`, - }; - } else { - return { - "margin-left": "0px", - } - } + if (props.mode == "block") { + if (props.labelPosition != "top") { + let labelWidth = + typeof props.labelWidth === "string" + ? parseFloat(props.labelWidth) + : props.labelWidth; + labelWidth += 15; + return { + "margin-left": `${labelWidth}px`, + }; + } else { + return { + "margin-left": "0px", + }; } + } }); diff --git a/package/component/src/component/select/index.vue b/package/component/src/component/select/index.vue index 5c725e55..bd8f9719 100644 --- a/package/component/src/component/select/index.vue +++ b/package/component/src/component/select/index.vue @@ -68,7 +68,11 @@ const open = function () { const emit = defineEmits(["update:modelValue", "change", "search", "create"]); const selectItem = ref({ - value: !props.multiple? props.modelValue : props.modelValue ? ([] as any[]).concat(props.modelValue) : [], + value: !props.multiple + ? props.modelValue + : props.modelValue + ? ([] as any[]).concat(props.modelValue) + : [], label: props.multiple ? [] : null, multiple: props.multiple, } as SelectItem);