提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<ComponentContainerProperty v-model="formData.style"> |
|
3 |
<!-- 表单 --> |
|
4 |
<el-form label-width="80px" :model="formData" class="m-t-8px"> |
|
5 |
<el-card header="搜索热词" class="property-group" shadow="never"> |
|
6 |
<Draggable v-model="formData.hotKeywords" :empty-item="''"> |
|
7 |
<template #default="{ index }"> |
|
8 |
<el-input v-model="formData.hotKeywords[index]" placeholder="请输入热词" /> |
|
9 |
</template> |
|
10 |
</Draggable> |
|
11 |
</el-card> |
|
12 |
<el-card header="搜索样式" class="property-group" shadow="never"> |
|
13 |
<el-form-item label="框体样式"> |
|
14 |
<el-radio-group v-model="formData!.borderRadius"> |
|
15 |
<el-tooltip content="方形" placement="top"> |
9259c2
|
16 |
<el-radio-button :value="0"> |
820397
|
17 |
<Icon icon="tabler:input-search" /> |
H |
18 |
</el-radio-button> |
|
19 |
</el-tooltip> |
|
20 |
<el-tooltip content="圆形" placement="top"> |
9259c2
|
21 |
<el-radio-button :value="10"> |
820397
|
22 |
<Icon icon="iconoir:input-search" /> |
H |
23 |
</el-radio-button> |
|
24 |
</el-tooltip> |
|
25 |
</el-radio-group> |
|
26 |
</el-form-item> |
|
27 |
<el-form-item label="提示文字" prop="placeholder"> |
|
28 |
<el-input v-model="formData.placeholder" /> |
|
29 |
</el-form-item> |
|
30 |
<el-form-item label="文本位置" prop="placeholderPosition"> |
|
31 |
<el-radio-group v-model="formData!.placeholderPosition"> |
|
32 |
<el-tooltip content="居左" placement="top"> |
9259c2
|
33 |
<el-radio-button value="left"> |
820397
|
34 |
<Icon icon="ant-design:align-left-outlined" /> |
H |
35 |
</el-radio-button> |
|
36 |
</el-tooltip> |
|
37 |
<el-tooltip content="居中" placement="top"> |
9259c2
|
38 |
<el-radio-button value="center"> |
820397
|
39 |
<Icon icon="ant-design:align-center-outlined" /> |
H |
40 |
</el-radio-button> |
|
41 |
</el-tooltip> |
|
42 |
</el-radio-group> |
|
43 |
</el-form-item> |
|
44 |
<el-form-item label="扫一扫" prop="showScan"> |
|
45 |
<el-switch v-model="formData!.showScan" /> |
|
46 |
</el-form-item> |
|
47 |
<el-form-item label="框体高度" prop="height"> |
|
48 |
<el-slider v-model="formData!.height" :max="50" :min="28" show-input input-size="small" /> |
|
49 |
</el-form-item> |
|
50 |
<el-form-item label="框体颜色" prop="backgroundColor"> |
|
51 |
<ColorInput v-model="formData.backgroundColor" /> |
|
52 |
</el-form-item> |
|
53 |
<el-form-item class="lef" label="文本颜色" prop="textColor"> |
|
54 |
<ColorInput v-model="formData.textColor" /> |
|
55 |
</el-form-item> |
|
56 |
</el-card> |
|
57 |
</el-form> |
|
58 |
</ComponentContainerProperty> |
|
59 |
</template> |
|
60 |
|
|
61 |
<script setup lang="ts"> |
|
62 |
import { usePropertyForm } from '@/components/DiyEditor/util' |
|
63 |
import { SearchProperty } from '@/components/DiyEditor/components/mobile/SearchBar/config' |
|
64 |
|
|
65 |
/** 搜索框属性面板 */ |
|
66 |
defineOptions({ name: 'SearchProperty' }) |
|
67 |
|
|
68 |
const props = defineProps<{ modelValue: SearchProperty }>() |
|
69 |
const emit = defineEmits(['update:modelValue']) |
|
70 |
const { formData } = usePropertyForm(props.modelValue, emit) |
|
71 |
</script> |
|
72 |
|
|
73 |
<style scoped lang="scss"></style> |