diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts index 9a1fc4194..ac47bf4b5 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts @@ -2,13 +2,11 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 营销文章属性 */ export interface PromotionArticleProperty { - // 文章编号 - id: number; - // 组件样式 - style: ComponentStyle; + id: number; // 文章编号 + style: ComponentStyle; // 组件样式 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'PromotionArticle', name: '营销文章', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue index 10e9f5aa3..09f1ff673 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue @@ -9,10 +9,10 @@ import * as ArticleApi from '#/api/mall/promotion/article/index'; /** 营销文章 */ defineOptions({ name: 'PromotionArticle' }); -// 定义属性 -const props = defineProps<{ property: PromotionArticleProperty }>(); -// 商品列表 -const article = ref(); + +const props = defineProps<{ property: PromotionArticleProperty }>(); // 定义属性 + +const article = ref(); // 商品列表 watch( () => props.property.id, @@ -29,5 +29,3 @@ watch( - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue index 7a701c54f..d70503b17 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue @@ -12,18 +12,19 @@ import * as ArticleApi from '#/api/mall/promotion/article/index'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 营销文章属性面板 +/** 营销文章属性面板 */ defineOptions({ name: 'PromotionArticleProperty' }); const props = defineProps<{ modelValue: PromotionArticleProperty }>(); -const emit = defineEmits(['update:modelValue']); -const formData = useVModel(props, 'modelValue', emit); -// 文章列表 -const articles = ref([]); -// 加载中 -const loading = ref(false); -// 查询文章列表 +const emit = defineEmits(['update:modelValue']); + +const formData = useVModel(props, 'modelValue', emit); + +const articles = ref([]); // 文章列表 +const loading = ref(false); // 加载中 + +/** 查询文章列表 */ const queryArticleList = async (title?: string) => { loading.value = true; const { list } = await ArticleApi.getArticlePage({ @@ -35,7 +36,7 @@ const queryArticleList = async (title?: string) => { loading.value = false; }; -// 初始化 +/** 初始化 */ onMounted(() => { queryArticleList(); }); @@ -65,5 +66,3 @@ onMounted(() => { - -