import { imgMode, dataSource } from "./../params.js" export const config = { "name": "图片组件", "icon": "el-icon-picture-outline", "fields": { "dataVal": { "label": "图片数据", "type": "array", "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": "upload", "value": "http://songhe-cdn.oss-cn-shenzhen.aliyuncs.com/songhe/20231030/cfdca276e835409292246f29d6732956.jpeg" } } }, "attrs": { "label": "图片设置", "type": "object", "child": { "width": { "label": "图片宽度", "type": "number", "valType": "Number", "value": 100, "min": 1, "max": 100 }, "height": { "label": "图片高度", "type": "number", "valType": "Number", "value": 300, "min": 1, "max": 1000 }, "border-radius": { "label": "圆角值", "hint": "图片形状为圆形时无效", "type": "number", "valType": "Number", "value": 0, "max": 1000 }, "shape": { "label": "图片形状", "type": "select", "valType": "String", "value": "square", "data": [{ "label": "圆形", "value": "circle" }, { "label": "方形", "value": "square" } ] }, "mode": { "label": "裁剪模式", "hint": "图片的裁剪模式", "type": "select", "valType": "String", "value": "aspectFill", "data": imgMode } } }, "styles": { "label": "图片样式", "type": "object", "child": { "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" } } } } }