✨(component): update
This commit is contained in:
parent
406fb7e828
commit
1a7aacbcb8
@ -168,7 +168,10 @@ onMounted(() => {
|
|||||||
const getMarginLeft = computed(() => {
|
const getMarginLeft = computed(() => {
|
||||||
if (props.mode == "block") {
|
if (props.mode == "block") {
|
||||||
if (props.labelPosition != "top") {
|
if (props.labelPosition != "top") {
|
||||||
let labelWidth = typeof props.labelWidth === "string" ? parseFloat(props.labelWidth) : props.labelWidth;
|
let labelWidth =
|
||||||
|
typeof props.labelWidth === "string"
|
||||||
|
? parseFloat(props.labelWidth)
|
||||||
|
: props.labelWidth;
|
||||||
labelWidth += 15;
|
labelWidth += 15;
|
||||||
return {
|
return {
|
||||||
"margin-left": `${labelWidth}px`,
|
"margin-left": `${labelWidth}px`,
|
||||||
@ -176,7 +179,7 @@ const getMarginLeft = computed(() => {
|
|||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
"margin-left": "0px",
|
"margin-left": "0px",
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,11 @@ const open = function () {
|
|||||||
const emit = defineEmits(["update:modelValue", "change", "search", "create"]);
|
const emit = defineEmits(["update:modelValue", "change", "search", "create"]);
|
||||||
|
|
||||||
const selectItem = ref<SelectItem>({
|
const selectItem = ref<SelectItem>({
|
||||||
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,
|
label: props.multiple ? [] : null,
|
||||||
multiple: props.multiple,
|
multiple: props.multiple,
|
||||||
} as SelectItem);
|
} as SelectItem);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user