import { fontWeight, imgMode, dataSource } from "./../params.js" import dataApiList from "./api.js" export const config = { "name": "商品专区", "icon": "el-icon-picture-outline", "fields": { "dataVal": { "label": "数据", "child": { "dataMsg":{ "label": "数据源", "type": "setDate", "child": { "dataSource": { "label": "数据源", "type": "select", "valType": "Number", "value": 0, "data": [{ "label": "自定义", "value": dataSource.Source_00 }, { "label": "选择", "value": dataSource.Source_01 }, { "label": "接口获取", "value": dataSource.Source_02 } ] }, "dataList": { "label": "数据列表", "type": "array", "template": { "title": { "label": "标题", "type": "input", "maxlength": 30, "value": "" }, "image": { "label": "轮播图片", "type": "upload", "value": "" }, "jump": { "label": "页面跳转", "type": "jump", "value": "" } }, "value": [] }, "Api":{ } } }, } }, "attrs": { "label": "组件设置", "type": "object", "child": { "quantity": { "label": "显示数量", "type": "number", "valType": "Number", "value": 4, "max": 6, "min": 1 }, "rowNum": { "label": "一行几个", "type": "number", "valType": "Number", "value": 4, "max": 6, "min": 1 }, "gap": { "label": "间距", "type": "number", "valType": "Number", "value": 22, "min": 0 }, "mode": { "label": "裁剪模式", "hint": "图片的裁剪模式", "type": "select", "valType": "String", "value": "aspectFill", "data": imgMode }, // "queueing": { // "label": "排列方式", // "type": "select", // "valType": "Number", // "value": 1, // "data": [{ // "label": "横向", // "value": 1 // }, // { // "label": "纵向", // "value": 2 // } // ] // }, // "showSubhead": { // "label": "显示副标题", // "type": "switch", // "value": true // } } }, "styles": { "label": "组件样式", "type": "object", "child": { "boxStyle": { "label": "模块设置", "type": "object", "child": { "backgroundColor": { "label": "背景色", "type": "color", "value": "#ffffff" }, "paddingLeft": { "label": "左间距", "type": "number", "valType": "Number", "value": 20, "min": 0 }, "paddingTop": { "label": "上边距", "type": "number", "value": 20, "min": 0 }, "paddingRight": { "label": "右边距", "type": "number", "value": 20, "min": 0 }, "paddingBottom": { "label": "下边距", "type": "number", "value": 20, "min": 0 }, } }, "goodsItem": { "label": "商品单例", "type": "object", "child": { // "height": { // "label": "盒子高度", // "type": "number", // "value": 222, // "max": 1000 // }, // "paddingTop": { // "label": "上边距", // "type": "number", // "value": 0 // }, // "paddingRight": { // "label": "右边距", // "type": "number", // "value": 0 // }, // "paddingBottom": { // "label": "下边距", // "type": "number", // "value": 0 // }, // "paddingLeft": { // "label": "左边距", // "type": "number", // "value": 0 // }, "backgroundColor": { "label": "背景色", "type": "color", "value": "#ffffff" }, "borderRadius": { "label": "圆角", "type": "number", "value": 10, "min": 0 } } }, "goodsImage": { "label": "商品图片", "type": "object", "child": { "height": { "label": "图片高", "type": "number", "value": 200, "max": 600 }, "borderRadius": { "label": "圆角", "type": "number", "value": 10, "min": 0 } } }, "goodsDetails": { "label": "商品详情", "type": "object", "child": { "height": { "label": "高度", "type": "number", "value": 200, "max": 600 }, "paddingTop": { "label": "上边距", "type": "number", "value": 0 }, "paddingRight": { "label": "右边距", "type": "number", "value": 0 }, "paddingBottom": { "label": "下边距", "type": "number", "value": 0 }, "paddingLeft": { "label": "左边距", "type": "number", "value": 0 } } }, "goodsTitle": { "label": "商品名称", "type": "object", "child": { "paddingTop": { "label": "上边距", "type": "number", "value": 0 }, "fontSize": { "label": "字体大小", "type": "number", "value": 18, "max": 100, "min": 12 }, "fontWeight": { "label": "文字粗细", "type": "select", "valType": "Number", "value": 700, "data": fontWeight }, "color": { "label": "字体颜色", "type": "color", "value": "#000000" } } }, "subheadTitle": { "label": "商品副名称", "type": "object", "child": { "paddingTop": { "label": "上边距", "type": "number", "value": 0 }, "fontSize": { "label": "字体大小", "type": "number", "value": 18, "max": 100, "min": 12 }, "color": { "label": "字体颜色", "type": "color", "value": "#A4A2A2" }, "fontWeight": { "label": "文字粗细", "type": "select", "valType": "Number", "value": 300, "data": fontWeight } } }, "goodsPrice": { "label": "商品价格", "type": "object", "child": { "paddingTop": { "label": "上边距", "type": "number", "value": 0 }, "fontWeight": { "label": "文字粗细", "type": "select", "valType": "Number", "value": 500, "data": fontWeight } } }, "PriceTag": { "label": "商品价格符号", "type": "object", "child": { "fontSize": { "label": "字体大小", "type": "number", "value": 18, "max": 100, "min": 12 } } }, "price": { "label": "商品现价", "type": "object", "child": { "fontSize": { "label": "字体大小", "type": "number", "value": 18, "max": 100, "min": 12 }, "color": { "label": "字体颜色", "type": "color", "value": "#F80808" }, } }, "originalPrice": { "label": "商品原价", "type": "object", "child": { "fontSize": { "label": "字体大小", "type": "number", "value": 18, "max": 100, "min": 12 }, "color": { "label": "字体颜色", "type": "color", "value": "#C8C6C6" }, "fontWeight": { "label": "文字粗细", "type": "select", "valType": "Number", "value": 500, "data": fontWeight } } }, } } } }