File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/components/DiyEditor/components/mobile/NavigationBar/components Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,18 @@ import { useVModel } from '@vueuse/core'
68
68
// 导航栏属性面板
69
69
defineOptions ({ name: ' NavigationBarCellProperty' })
70
70
71
- const props = defineProps <{
72
- modelValue: NavigationBarCellProperty []
73
- isMp: boolean
74
- }>()
71
+ const props = withDefaults (
72
+ defineProps <{
73
+ modelValue: NavigationBarCellProperty []
74
+ isMp: boolean
75
+ }>(),
76
+ {
77
+ modelValue : () => [],
78
+ isMp: true
79
+ }
80
+ )
75
81
const emit = defineEmits ([' update:modelValue' ])
76
- const { formData : cellList } = usePropertyForm (props .modelValue , emit )
77
- if (! cellList .value ) cellList .value = []
82
+ const cellList = useVModel (props , ' modelValue' , emit )
78
83
79
84
// 单元格数量:小程序6个(右侧胶囊按钮占了2个),其它平台8个
80
85
const cellCount = computed (() => (props .isMp ? 6 : 8 ))
You can’t perform that action at this time.
0 commit comments