📖 code review:店铺装修逻辑

This commit is contained in:
YunaiV
2023-12-19 23:10:58 +08:00
parent df1c565cd9
commit b86f082306
19 changed files with 23 additions and 23 deletions

View File

@ -100,6 +100,7 @@ const emits = defineEmits<{
(e: 'copy'): void
(e: 'delete'): void
}>()
/**
* 移动组件
* @param direction 移动方向
@ -107,12 +108,14 @@ const emits = defineEmits<{
const handleMoveComponent = (direction: number) => {
emits('move', direction)
}
/**
* 复制组件
*/
const handleCopyComponent = () => {
emits('copy')
}
/**
* 删除组件
*/

View File

@ -4,6 +4,7 @@ import { floatToFixed2 } from '@/utils'
import { formatDate } from '@/utils/formatTime'
// 优惠值
// TODO @疯狂idea 有告警
export const CouponDiscount = defineComponent({
name: 'CouponDiscount',
props: {

View File

@ -24,6 +24,7 @@ export interface CouponCardProperty {
}
// 定义组件
// TODO @疯狂idea 有告警
export const component = {
id: 'CouponCard',
name: '优惠券',

View File

@ -9,6 +9,7 @@ export interface HotZoneProperty {
// 组件样式
style: ComponentStyle
}
/** 热区项目属性 */
export interface HotZoneItemProperty {
// 链接的名称

View File

@ -13,6 +13,7 @@ export interface MagicCubeProperty {
// 组件样式
style: ComponentStyle
}
/** 广告魔方项目属性 */
export interface MagicCubeItemProperty {
// 图标链接
@ -30,6 +31,7 @@ export interface MagicCubeItemProperty {
}
// 定义组件
// TODO @疯狂:有 idea 爆红告警
export const component = {
id: 'MagicCube',
name: '广告魔方',

View File

@ -10,6 +10,7 @@ export interface MenuGridProperty {
// 组件样式
style: ComponentStyle
}
/** 宫格导航项目属性 */
export interface MenuGridItemProperty {
// 图标链接

View File

@ -8,6 +8,7 @@ export interface MenuListProperty {
// 组件样式
style: ComponentStyle
}
/** 列表导航项目属性 */
export interface MenuListItemProperty {
// 图标链接

View File

@ -12,7 +12,6 @@
<el-form-item label="文字颜色" prop="文字颜色">
<ColorInput v-model="formData.textColor" />
</el-form-item>
<el-card header="公告内容" class="property-group" shadow="never">
<Draggable v-model="formData.contents">
<template #default="{ element }">

View File

@ -59,6 +59,7 @@ export interface ProductCardFieldProperty {
}
// 定义组件
// TODO @疯狂idea 有告警
export const component = {
id: 'ProductCard',
name: '商品卡片',

View File

@ -134,6 +134,7 @@ watch(
deep: true
}
)
/**
* 计算商品的间距
* @param index 商品索引

View File

@ -38,6 +38,7 @@ export interface ProductListFieldProperty {
}
// 定义组件
// TODO @疯狂idea 有告警
export const component = {
id: 'ProductList',
name: '商品栏',

View File

@ -6,6 +6,7 @@ import { PromotionArticleProperty } from './config'
import * as ArticleApi from '@/api/mall/promotion/article/index'
/** 营销文章 */
// TODO @疯狂idea 有告警
defineOptions({ name: 'PromotionArticle' })
// 定义属性
const props = defineProps<{ property: PromotionArticleProperty }>()

View File

@ -29,6 +29,7 @@ export interface PromotionCombinationProperty {
// 组件样式
style: ComponentStyle
}
// 商品字段
export interface PromotionCombinationFieldProperty {
// 是否显示
@ -38,6 +39,7 @@ export interface PromotionCombinationFieldProperty {
}
// 定义组件
// TODO @疯狂idea 有告警
export const component = {
id: 'PromotionCombination',
name: '拼团',

View File

@ -17,6 +17,7 @@ export interface SearchProperty {
export type PlaceholderPosition = 'left' | 'center'
// 定义组件
// TODO @疯狂idea 这里爆红可以卡看咋优化下哇is missing the following properties from type DiyComponent<SearchProperty>: uid, position
export const component = {
id: 'SearchBar',
name: '搜索框',

View File

@ -19,6 +19,7 @@ export interface VideoPlayerStyle extends ComponentStyle {
}
// 定义组件
// TODO @疯狂idea 有告警
export const component = {
id: 'VideoPlayer',
name: '视频播放',

View File

@ -103,6 +103,7 @@ export function usePropertyForm<T>(modelValue: T, emit: Function): { formData: R
}
)
// TODO @疯狂:这个 idea 爆红,看看怎么可以解决哈
return { formData }
}