diff --git a/src/components/common/custom-module/model-lines/index.vue b/src/components/common/custom-module/model-lines/index.vue index 07c99df1..4397ccb0 100644 --- a/src/components/common/custom-module/model-lines/index.vue +++ b/src/components/common/custom-module/model-lines/index.vue @@ -8,37 +8,32 @@ const props = defineProps({ default: () => { return {}; }, - required: true + required: true, }, isPercentage: { type: Boolean, - default: false + default: false, }, scale: { type: Number, - default: 1 - } + default: 1, + }, }); // 用于页面判断显示 const form = reactive(props.value); const border_style = computed(() => { if (form.line_settings === 'horizontal') { - return `${ set_count() } margin: 5px 0;border-bottom: ${form.line_size * props.scale }px ${form.line_style} ${form.line_color};`; + return `${set_count()} margin: 5px 0;border-bottom: ${form.line_size * props.scale}px ${form.line_style} ${form.line_color};`; } else { - return `${ set_count() } margin: 0 5px;border-right: ${form.line_size * props.scale }px ${form.line_style} ${form.line_color};`; + return `${set_count()} margin: 0 5px;border-right: ${form.line_size * props.scale}px ${form.line_style} ${form.line_color};`; } }); const set_count = () => { - if (props.isPercentage) { - return ''; + if (form.line_settings === 'horizontal') { + return `width: ${form.com_width}px;`; } else { - if (form.line_settings === 'horizontal') { - return `width: ${ form.com_width }px;`; - } else { - return `height: ${ form.com_height }px;`; - } - + return `height: ${form.com_height}px;`; } };