diff --git a/src/App.vue b/src/App.vue index 161fbfe..0434bf6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -534,6 +534,154 @@ categories.value.unshift({ }, ] } + }, + { + title: '产品分类', + vid: hash(`${++nextId}`), + mid: hash(`${++nextId}`), + maxReferenceCount: -1, + referenceCount:0, + image:undefined, + configs:[ + { + help: '帮助', + addable: true, + type: 'list', + field: 'items', + label: '产品分类列表', + configs: [ + { + type: 'image', + label: '分类图片', + field: 'itemImage', + // 表示内联数据 + inlines: [{ + type: 'text', + field: 'link', + label: '链接', + help: '请输入链接', // 自动生成:"请输入${label}" + }, + { + type: 'text', + label: '自定义标题', + field: 'title', + }, + ] + }, + ] + }, + ], + init:{ + theme: { + color: '#fff', + }, + items:[ + { + title: '标题', + link: 'link' + } + ] + }, + theme:{ + padding: 12, + color: '@@theme.color', + }, + children:{ + theme:{ + width: '100%', + clip: 'autoX', + whiteSpace: 'nowrap', + }, + children:{ + type: 'each', + key: 'items', + handle: { + theme:{ + width: '60px', + height: '60px', + display: 'inline-block', + radius: 40, + color: 'pink', + textColor: '#fff', + margin: { + right: 10 + }, + }, + children:'图片', + } + }, + } + }, + { + title: '两列产品卡片', + vid: hash(`${++nextId}`), + mid: hash(`${++nextId}`), + maxReferenceCount: -1, + referenceCount:0, + image:undefined, + configs:[], + init:{}, + theme:{ + color: 'pink', + padding:{ + top: 12.5, + left:12.5, + right: 12.5 + }, + gap:10, + }, + children:[ + { + theme:{ + width: 170, + height:200, + color: 'white' + }, + children: '产品' + }, + { + theme:{ + width: 170, + height:200, + color: 'white' + }, + children: '产品' + } + ] + }, + { + title: '自定义标题', + vid: hash( `${++nextId}`), + mid: hash( `${++nextId}`), + maxReferenceCount: -1, + referenceCount:0, + image: undefined, + configs:[ + { + type: 'text', + field: 'Title', + label: '标题', + help: '自定义标题', // 自动生成:"请输入${label}" + }, + ], + init: { + Title:'猜你喜欢', + }, + theme:{ + padding:{ + vertical: 15, + horizontal: 15, + }, + color: '#fff', + textColor: '#333', + fontSize: '@@theme.fontSize', + fontWeight: 900, + }, + children:{ + type: 'text', + key: 'Title' + } + } ], }) diff --git a/src/engineer/configs/TextConfig.vue b/src/engineer/configs/TextConfig.vue index 4a58e38..430fc76 100644 --- a/src/engineer/configs/TextConfig.vue +++ b/src/engineer/configs/TextConfig.vue @@ -17,7 +17,7 @@ const data = useSource(props.field)