✨(component): update
This commit is contained in:
parent
406fb7e828
commit
1a7aacbcb8
@ -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",
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -68,7 +68,11 @@ const open = function () {
|
||||
const emit = defineEmits(["update:modelValue", "change", "search", "create"]);
|
||||
|
||||
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,
|
||||
multiple: props.multiple,
|
||||
} as SelectItem);
|
||||
|
Loading…
Reference in New Issue
Block a user