|
2 | 2 | <div class="h-40px flex items-center justify-center">
|
3 | 3 | <MagicCubeEditor
|
4 | 4 | v-model="cellList"
|
5 |
| - class="m-b-16px" |
6 |
| - :rows="1" |
7 | 5 | :cols="cellCount"
|
8 | 6 | :cube-size="38"
|
| 7 | + :rows="1" |
| 8 | + class="m-b-16px" |
9 | 9 | @hot-area-selected="handleHotAreaSelected"
|
10 | 10 | />
|
11 |
| - <img src="@/assets/imgs/diy/app-nav-bar-mp.png" alt="" class="h-30px w-76px" v-if="isMp" /> |
| 11 | + <img v-if="isMp" alt="" class="h-30px w-76px" src="@/assets/imgs/diy/app-nav-bar-mp.png" /> |
12 | 12 | </div>
|
13 | 13 | <template v-for="(cell, cellIndex) in cellList" :key="cellIndex">
|
14 | 14 | <template v-if="selectedHotAreaIndex === cellIndex">
|
15 |
| - <el-form-item label="类型" :prop="`cell[${cellIndex}].type`"> |
| 15 | + <el-form-item :prop="`cell[${cellIndex}].type`" label="类型"> |
16 | 16 | <el-radio-group v-model="cell.type">
|
17 | 17 | <el-radio value="text">文字</el-radio>
|
18 | 18 | <el-radio value="image">图片</el-radio>
|
|
21 | 21 | </el-form-item>
|
22 | 22 | <!-- 1. 文字 -->
|
23 | 23 | <template v-if="cell.type === 'text'">
|
24 |
| - <el-form-item label="内容" :prop="`cell[${cellIndex}].text`"> |
| 24 | + <el-form-item :prop="`cell[${cellIndex}].text`" label="内容"> |
25 | 25 | <el-input v-model="cell!.text" maxlength="10" show-word-limit />
|
26 | 26 | </el-form-item>
|
27 |
| - <el-form-item label="颜色" :prop="`cell[${cellIndex}].text`"> |
| 27 | + <el-form-item :prop="`cell[${cellIndex}].text`" label="颜色"> |
28 | 28 | <ColorInput v-model="cell!.textColor" />
|
29 | 29 | </el-form-item>
|
| 30 | + <el-form-item :prop="`cell[${cellIndex}].url`" label="链接"> |
| 31 | + <AppLinkInput v-model="cell.url" /> |
| 32 | + </el-form-item> |
30 | 33 | </template>
|
31 | 34 | <!-- 2. 图片 -->
|
32 | 35 | <template v-else-if="cell.type === 'image'">
|
33 |
| - <el-form-item label="图片" :prop="`cell[${cellIndex}].imgUrl`"> |
| 36 | + <el-form-item :prop="`cell[${cellIndex}].imgUrl`" label="图片"> |
34 | 37 | <UploadImg v-model="cell.imgUrl" :limit="1" height="56px" width="56px">
|
35 | 38 | <template #tip>建议尺寸 56*56</template>
|
36 | 39 | </UploadImg>
|
37 | 40 | </el-form-item>
|
38 |
| - <el-form-item label="链接" :prop="`cell[${cellIndex}].url`"> |
| 41 | + <el-form-item :prop="`cell[${cellIndex}].url`" label="链接"> |
39 | 42 | <AppLinkInput v-model="cell.url" />
|
40 | 43 | </el-form-item>
|
41 | 44 | </template>
|
42 | 45 | <!-- 3. 搜索框 -->
|
43 | 46 | <template v-else>
|
44 |
| - <el-form-item label="提示文字" :prop="`cell[${cellIndex}].placeholder`"> |
| 47 | + <el-form-item :prop="`cell[${cellIndex}].placeholder`" label="提示文字"> |
45 | 48 | <el-input v-model="cell.placeholder" maxlength="10" show-word-limit />
|
46 | 49 | </el-form-item>
|
47 |
| - <el-form-item label="圆角" :prop="`cell[${cellIndex}].borderRadius`"> |
| 50 | + <el-form-item :prop="`cell[${cellIndex}].borderRadius`" label="圆角"> |
48 | 51 | <el-slider
|
49 | 52 | v-model="cell.borderRadius"
|
50 | 53 | :max="100"
|
51 | 54 | :min="0"
|
52 |
| - show-input |
53 |
| - input-size="small" |
54 | 55 | :show-input-controls="false"
|
| 56 | + input-size="small" |
| 57 | + show-input |
55 | 58 | />
|
56 | 59 | </el-form-item>
|
57 | 60 | </template>
|
58 | 61 | </template>
|
59 | 62 | </template>
|
60 | 63 | </template>
|
61 | 64 |
|
62 |
| -<script setup lang="ts"> |
| 65 | +<script lang="ts" setup> |
63 | 66 | import { NavigationBarCellProperty } from '../config'
|
64 | 67 | import { usePropertyForm } from '@/components/DiyEditor/util'
|
65 | 68 | // 导航栏属性面板
|
@@ -87,4 +90,4 @@ const handleHotAreaSelected = (cellValue: NavigationBarCellProperty, index: numb
|
87 | 90 | }
|
88 | 91 | </script>
|
89 | 92 |
|
90 |
| -<style scoped lang="scss"></style> |
| 93 | +<style lang="scss" scoped></style> |
0 commit comments