提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<ComponentContainerProperty v-model="formData.style"> |
|
3 |
<el-text tag="p"> 菜单设置 </el-text> |
|
4 |
<el-text type="info" size="small"> 拖动左侧的小圆点可以调整顺序 </el-text> |
|
5 |
|
|
6 |
<!-- 表单 --> |
|
7 |
<el-form label-width="60px" :model="formData" class="m-t-8px"> |
|
8 |
<Draggable v-model="formData.list" :empty-item="EMPTY_MENU_LIST_ITEM_PROPERTY"> |
|
9 |
<template #default="{ element }"> |
|
10 |
<el-form-item label="图标" prop="iconUrl"> |
|
11 |
<UploadImg v-model="element.iconUrl" height="80px" width="80px"> |
|
12 |
<template #tip> 建议尺寸:44 * 44 </template> |
|
13 |
</UploadImg> |
|
14 |
</el-form-item> |
|
15 |
<el-form-item label="标题" prop="title"> |
|
16 |
<InputWithColor v-model="element.title" v-model:color="element.titleColor" /> |
|
17 |
</el-form-item> |
|
18 |
<el-form-item label="副标题" prop="subtitle"> |
|
19 |
<InputWithColor v-model="element.subtitle" v-model:color="element.subtitleColor" /> |
|
20 |
</el-form-item> |
|
21 |
<el-form-item label="链接" prop="url"> |
|
22 |
<AppLinkInput v-model="element.url" /> |
|
23 |
</el-form-item> |
|
24 |
</template> |
|
25 |
</Draggable> |
|
26 |
</el-form> |
|
27 |
</ComponentContainerProperty> |
|
28 |
</template> |
|
29 |
|
|
30 |
<script setup lang="ts"> |
|
31 |
import { usePropertyForm } from '@/components/DiyEditor/util' |
|
32 |
import { |
|
33 |
EMPTY_MENU_LIST_ITEM_PROPERTY, |
|
34 |
MenuListProperty |
|
35 |
} from '@/components/DiyEditor/components/mobile/MenuList/config' |
|
36 |
|
|
37 |
/** 列表导航属性面板 */ |
|
38 |
defineOptions({ name: 'MenuListProperty' }) |
|
39 |
|
|
40 |
const props = defineProps<{ modelValue: MenuListProperty }>() |
|
41 |
const emit = defineEmits(['update:modelValue']) |
|
42 |
const { formData } = usePropertyForm(props.modelValue, emit) |
|
43 |
</script> |
|
44 |
|
|
45 |
<style scoped lang="scss"></style> |