提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<el-form label-width="80px" :model="formData"> |
|
3 |
<el-form-item label="高度" prop="height"> |
|
4 |
<el-slider v-model="formData.height" :min="1" :max="100" show-input input-size="small" /> |
|
5 |
</el-form-item> |
|
6 |
<el-form-item label="选择样式" prop="borderType"> |
|
7 |
<el-radio-group v-model="formData!.borderType"> |
|
8 |
<el-tooltip |
|
9 |
placement="top" |
|
10 |
v-for="(item, index) in BORDER_TYPES" |
|
11 |
:key="index" |
|
12 |
:content="item.text" |
|
13 |
> |
9259c2
|
14 |
<el-radio-button :value="item.type"> |
820397
|
15 |
<Icon :icon="item.icon" /> |
H |
16 |
</el-radio-button> |
|
17 |
</el-tooltip> |
|
18 |
</el-radio-group> |
|
19 |
</el-form-item> |
|
20 |
<template v-if="formData.borderType !== 'none'"> |
|
21 |
<el-form-item label="线宽" prop="lineWidth"> |
|
22 |
<el-slider v-model="formData.lineWidth" :min="1" :max="30" show-input input-size="small" /> |
|
23 |
</el-form-item> |
|
24 |
<el-form-item label="左右边距" prop="paddingType"> |
|
25 |
<el-radio-group v-model="formData!.paddingType"> |
|
26 |
<el-tooltip content="无边距" placement="top"> |
9259c2
|
27 |
<el-radio-button value="none"> |
820397
|
28 |
<Icon icon="tabler:box-padding" /> |
H |
29 |
</el-radio-button> |
|
30 |
</el-tooltip> |
|
31 |
<el-tooltip content="左右留边" placement="top"> |
9259c2
|
32 |
<el-radio-button value="horizontal"> |
820397
|
33 |
<Icon icon="vaadin:padding" /> |
H |
34 |
</el-radio-button> |
|
35 |
</el-tooltip> |
|
36 |
</el-radio-group> |
|
37 |
</el-form-item> |
|
38 |
<el-form-item label="颜色"> |
|
39 |
<!-- 分割线颜色 --> |
|
40 |
<ColorInput v-model="formData.lineColor" /> |
|
41 |
</el-form-item> |
|
42 |
</template> |
|
43 |
</el-form> |
|
44 |
</template> |
|
45 |
|
|
46 |
<script setup lang="ts"> |
|
47 |
import { DividerProperty } from './config' |
|
48 |
import { usePropertyForm } from '@/components/DiyEditor/util' |
|
49 |
// 导航栏属性面板 |
|
50 |
defineOptions({ name: 'DividerProperty' }) |
|
51 |
const props = defineProps<{ modelValue: DividerProperty }>() |
|
52 |
const emit = defineEmits(['update:modelValue']) |
|
53 |
const { formData } = usePropertyForm(props.modelValue, emit) |
|
54 |
|
|
55 |
//线类型 |
|
56 |
const BORDER_TYPES = [ |
|
57 |
{ |
|
58 |
icon: 'vaadin:line-h', |
|
59 |
text: '实线', |
|
60 |
type: 'solid' |
|
61 |
}, |
|
62 |
{ |
|
63 |
icon: 'tabler:line-dashed', |
|
64 |
text: '虚线', |
|
65 |
type: 'dashed' |
|
66 |
}, |
|
67 |
{ |
|
68 |
icon: 'tabler:line-dotted', |
|
69 |
text: '点线', |
|
70 |
type: 'dotted' |
|
71 |
}, |
|
72 |
{ |
|
73 |
icon: 'entypo:progress-empty', |
|
74 |
text: '无', |
|
75 |
type: 'none' |
|
76 |
} |
|
77 |
] |
|
78 |
</script> |
|
79 |
|
|
80 |
<style scoped lang="scss"></style> |