();
{{ property.placeholder || '搜索商品' }}
-
+
- {{
- keyword
- }}
+
+ {{ keyword }}
+
();
-
-
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(
-
-
+
-
@@ -79,7 +81,7 @@ watch(
-
+
@@ -110,12 +112,10 @@ watch(
-
+
-
-
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/config.ts
index 0404f3647..efdb4da21 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/config.ts
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/config.ts
@@ -2,41 +2,29 @@ import type { DiyComponent } from '../../../util';
/** 底部导航菜单属性 */
export interface TabBarProperty {
- // 选项列表
- items: TabBarItemProperty[];
- // 主题
- theme: string;
- // 样式
- style: TabBarStyle;
+ items: TabBarItemProperty[]; // 选项列表
+ theme: string; // 主题
+ style: TabBarStyle; // 样式
}
-// 选项属性
+/** 选项属性 */
export interface TabBarItemProperty {
- // 标签文字
- text: string;
- // 链接
- url: string;
- // 默认图标链接
- iconUrl: string;
- // 选中的图标链接
- activeIconUrl: string;
+ text: string; // 标签文字
+ url: string; // 链接
+ iconUrl: string; // 默认图标链接
+ activeIconUrl: string; // 选中的图标链接
}
-// 样式
+/** 样式 */
export interface TabBarStyle {
- // 背景类型
- bgType: 'color' | 'img';
- // 背景颜色
- bgColor: string;
- // 图片链接
- bgImg: string;
- // 默认颜色
- color: string;
- // 选中的颜色
- activeColor: string;
+ bgType: 'color' | 'img'; // 背景类型
+ bgColor: string; // 背景颜色
+ bgImg: string; // 图片链接
+ color: string; // 默认颜色
+ activeColor: string; // 选中的颜色
}
-// 定义组件
+/** 定义组件 */
export const component = {
id: 'TabBar',
name: '底部导航',
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/index.vue
index 9c1ddd834..aa7484d63 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/index.vue
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/index.vue
@@ -5,7 +5,7 @@ import { IconifyIcon } from '@vben/icons';
import { ElImage } from 'element-plus';
-/** 页面底部导航栏 */
+/** 底部导航 */
defineOptions({ name: 'TabBar' });
defineProps<{ property: TabBarProperty }>();
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/property.vue
index a258901dd..6c3368618 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/property.vue
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/tab-bar/property.vue
@@ -23,7 +23,8 @@ import {
} from '#/views/mall/promotion/components';
import { component, THEME_LIST } from './config';
-// 底部导航栏
+
+/** 底部导航栏 */
defineOptions({ name: 'TabBarProperty' });
const props = defineProps<{ modelValue: TabBarProperty }>();
@@ -33,7 +34,7 @@ const formData = useVModel(props, 'modelValue', emit);
// 将数据库的值更新到右侧属性栏
component.property.items = formData.value.items;
-// 要的主题
+/** 处理主题变更 */
const handleThemeChange = () => {
const theme = THEME_LIST.find((theme) => theme.id === formData.value.theme);
if (theme?.color) {
@@ -44,7 +45,6 @@ const handleThemeChange = () => {
-
@@ -89,7 +89,6 @@ const handleThemeChange = () => {
建议尺寸 375 * 50
-
图标设置
拖动左上角的小圆点可对其排序, 图标建议尺寸 44*44
@@ -129,5 +128,3 @@ const handleThemeChange = () => {
-
-
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts
index f442e7dc5..2ef0eb772 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts
@@ -2,46 +2,28 @@ import type { ComponentStyle, DiyComponent } from '../../../util';
/** 标题栏属性 */
export interface TitleBarProperty {
- // 背景图
- bgImgUrl: string;
- // 偏移
- marginLeft: number;
- // 显示位置
- textAlign: 'center' | 'left';
- // 主标题
- title: string;
- // 副标题
- description: string;
- // 标题大小
- titleSize: number;
- // 描述大小
- descriptionSize: number;
- // 标题粗细
- titleWeight: number;
- // 描述粗细
- descriptionWeight: number;
- // 标题颜色
- titleColor: string;
- // 描述颜色
- descriptionColor: string;
- // 高度
- height: number;
- // 查看更多
+ bgImgUrl: string; // 背景图
+ marginLeft: number; // 偏移
+ textAlign: 'center' | 'left'; // 显示位置
+ title: string; // 主标题
+ description: string; // 副标题
+ titleSize: number; // 标题大小
+ descriptionSize: number; // 描述大小
+ titleWeight: number; // 标题粗细
+ descriptionWeight: number; // 描述粗细
+ titleColor: string; // 标题颜色
+ descriptionColor: string; // 描述颜色
+ height: number; // 高度
more: {
- // 是否显示查看更多
- show: false;
- // 自定义文字
- text: string;
- // 样式选择
- type: 'all' | 'icon' | 'text';
- // 链接
- url: string;
- };
- // 组件样式
- style: ComponentStyle;
+ show: false; // 是否显示查看更多
+ text: string; // 自定义文字
+ type: 'all' | 'icon' | 'text'; // 样式选择
+ url: string; // 链接
+ }; // 查看更多
+ style: ComponentStyle; // 组件样式
}
-// 定义组件
+/** 定义组件 */
export const component = {
id: 'TitleBar',
name: '标题栏',
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue
index 1fdafb90a..9ff872301 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue
@@ -24,15 +24,16 @@ import {
import ComponentContainerProperty from '../../component-container-property.vue';
-// 导航栏属性面板
+/** 导航栏属性面板 */
defineOptions({ name: 'TitleBarProperty' });
const props = defineProps<{ modelValue: TitleBarProperty }>();
+
const emit = defineEmits(['update:modelValue']);
+
const formData = useVModel(props, 'modelValue', emit);
-// 表单校验
-const rules = {};
+const rules = {}; // 表单校验
@@ -167,5 +168,3 @@ const rules = {};
-
-
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/config.ts
index 2dae34da2..568cfb94f 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/config.ts
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/config.ts
@@ -2,11 +2,10 @@ import type { ComponentStyle, DiyComponent } from '../../../util';
/** 用户卡片属性 */
export interface UserCardProperty {
- // 组件样式
- style: ComponentStyle;
+ style: ComponentStyle; // 组件样式
}
-// 定义组件
+/** 定义组件 */
export const component = {
id: 'UserCard',
name: '用户卡片',
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue
index 9cb312f37..e1cd58bc6 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue
@@ -7,7 +7,8 @@ import { ElAvatar } from 'element-plus';
/** 用户卡片 */
defineOptions({ name: 'UserCard' });
-// 定义属性
+
+/** 定义属性 */
defineProps<{ property: UserCardProperty }>();
@@ -30,6 +31,4 @@ defineProps<{ property: UserCardProperty }>();