diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts index 01d5894d1..c471780e1 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts @@ -13,10 +13,10 @@ export interface SearchProperty { style: ComponentStyle; } -// 文字位置 +/** 文字位置 */ export type PlaceholderPosition = 'center' | 'left'; -// 定义组件 +/** 定义组件 */ export const component = { id: 'SearchBar', name: '搜索框', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue index e7c770304..7463d7db6 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue @@ -5,19 +5,19 @@ import { IconifyIcon } from '@vben/icons'; /** 搜索框 */ defineOptions({ name: 'SearchBar' }); + defineProps<{ property: SearchProperty }>(); - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue index 5e1822078..4dca02da7 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue @@ -11,6 +11,7 @@ import { ElCard, ElForm, ElFormItem, + ElInput, ElRadioButton, ElRadioGroup, ElSlider, @@ -18,7 +19,7 @@ import { ElTooltip, } from 'element-plus'; -import { Draggable } from '#/views/mall/promotion/components'; +import { ColorInput, Draggable } from '#/views/mall/promotion/components'; import ComponentContainerProperty from '../../component-container-property.vue'; @@ -26,10 +27,12 @@ import ComponentContainerProperty from '../../component-container-property.vue'; defineOptions({ name: 'SearchProperty' }); const props = defineProps<{ modelValue: SearchProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); -// 监听热词数组变化 +/** 监听热词数组变化 */ watch( () => formData.value.hotKeywords, (newVal) => { @@ -45,8 +48,7 @@ watch(