模块常用组件

预设样式

{
  "components": {
    "outter_switch": {
      "extension": {
        "confirm": {},
        "shape": "button",
        "size": "small",
        "defaultValue": "1",
        "type": "",
        "dataSource": [
          {
            "label": "预设样式",
            "value": "1"
          },
          {
            "label": "自定义样式",
            "value": "2"
          }
        ]
      },
      "wrapperStyle": {
        "margin": "0"
      },
      "invisible": false,
      "dataName": "outterSwitch",
      "style": {
        "margin": "0 auto",
        "width": "285px"
      },
      "label": {
        "description": {
          "icon": "",
          "desc": ""
        },
        "title": ""
      },
      "type": "OfficialRadio",
      "validateProps": {
        "dataType": "Text",
        "required": false,
        "validate": false
      }
    },
    "nomal_style_container": {
      "wrapperStyle": {
        "height": "auto",
        "margin": "10px 0"
      },
      "invisible": false,
      "style": {
        "width": "auto",
        "height": "auto"
      },
      "label": {
        "description": "",
        "title": ""
      },
      "type": "OfficialContainer"
    },
    "custom_style_container": {
      "wrapperStyle": {
        "height": "auto",
        "margin": "10px 0"
      },
      "invisible": false,
      "style": {
        "width": "auto",
        "height": "auto"
      },
      "label": {
        "description": "",
        "title": ""
      },
      "type": "OfficialContainer"
    }
  },
  "layout": [
    {
      "children": [],
      "root": true,
      "id": "outter_switch"
    },
    {
      "children": [],
      "root": true,
      "id": "nomal_style_container"
    },
    {
      "children": [],
      "root": true,
      "id": "custom_style_container"
    }
  ],
  "rules": [
    {
      "condition": "${moduleData.outterSwitch}==1",
      "components": {
        "nomal_style_container": {
          "invisible": false
        },
        "custom_style_container": {
          "invisible": true
        }
      },
      "desc": ""
    },
    {
      "condition": "${moduleData.outterSwitch}==2",
      "components": {
        "nomal_style_container": {
          "invisible": true
        },
        "custom_style_container": {
          "invisible": false
        }
      },
      "desc": ""
    }
  ],
  "editable": true,
  "moduleTips": [],
  "previewable": true,
  "realtimeSave": false,
  "schemaVersion": "1",
  "tips": []
}
  1. 热区组件
"image": {
  "type": "TaobaowpSingleImage",
  "dataName": "image",
  "label": {
    "description": "",
    "title": "轮播图片"
  },
  "wrapperStyle": {
    "margin": "0"
  },
  "style": {},
  "extension": {
    "appType": "qietu",
    "designer": "requ",
    "dialogType": "dialog",
    "intelligentPageUrl": "https://luban.taobao.com/wangpu-layer.html",
    "intelligentRelateData": "basic_image_widget_id",
    "moduleType": "designer",
    "relateData": "basic_image_widget_id",
    "sendDataType": "url",
    "structure": true,
    "text": "添加图片",
    "url": "//sucai.wangpu.taobao.com/select.htm",
    "config": {
      "type": "pic",
      "mime": "jpg,png"
    }
  },
  "validateProps": {
    "dataType": "Image",
    "validate": false
  }
},
"requ": {
  "type": "TaobaowpWpDesigner",
  "dataName": "requ",
  "label": {
    "description": {
      "desc": ""
    },
    "title": "热区"
  },
  "wrapperStyle": {},
  "style": {
    "width": "265px",
    "height": "80px"
  },
  "invisible": false,
  "extension": {
    "relateData": "image",
    "dialogType": "dialog",
    "url": "//wangpu.taobao.com/shopdecorate/tools/designMaker.htm"
  },
  "validateProps": {
    "dataType": "Array",
    "required": false,
    "validate": true
  }
}
  1. 图片组件
  //返回 image:""
  "image": {
    "type": "TaobaowpSingleImage",
    "dataName": "image",
    "label": {
      "description": "",
      "title": "背景图片"
    },
    "wrapperStyle": {
      "margin": "0"
    },
    "style": {},
    "extension": {
      "dele":"true",
      "appType": "qietu",
      "designer": "requ",
      "dialogType": "dialog",
      "moduleType": "designer",
      "sendDataType": "url",
      "structure": true,
      "text": "添加图片",
      "url": "//sucai.wangpu.taobao.com/select.htm",
      "config": {
        "type": "pic",
        "mime": "jpg,png"
      }
    },
    "validateProps": {
      "dataType": "Image",
      "validate": false
    }
  }


//返回 image.image
"image":{
	"type": "TaobaowpSingleImage",
  "dataName": "image",
  "label": {
    "description": "",
    "title": ""
  },
  "wrapperStyle": {
    "margin": "0"
  },
  "style": {
    "width": "70px",
    "height": "50px"
  },
  "extension": {
  	"dele":true,
    "sendDataType": "url",
    "dialogType": "dialog",
    "url": "//sucai.wangpu.taobao.com/select.htm",
    "config": {
      "type": "pic",
      "needCrop": true,
      "mime": "jpg,png"
    }
  },
  "validateProps": {
    "required": false,
    "dataType": "Image",
    "validate": true
  }
}
  1. 链接组件
    "url": {
      "type": "OfficialLink",
      "dataName": "url",
      "label": {
        "title": "链接",
        "description": {}
      },
      "wrapperStyle": {},
      "style": {
        "width": "auto",
        "height": "auto"
      },
      "extension": {
        "compatibleType": "wangpu",
        "dialogType": "dialog",
        "sendDataType": "url",
        "url": "//wangpu.taobao.com/shopdecorate/tools/linkSelector.htm",
        "placeholder": "请输入链接",
        "clear": true,
        "config": {}
      },
      "validateProps": {
        "required": false,
        "dataType": "Link",
        "validate": true
      }
    }
  1. 数组组件
    "imageList": {
      "type": "OfficialArray",
      "dataName": "imageList",
      "label": {
        "description": {
          "desc": ""
        },
        "title": ""
      },
      "wrapperStyle": {},
      "style": {},
      "invisible": false,
      "extension": {
        "itemTitle": "分组标题",
        "text": "添加",
        "itemTitleIndex": true
      },
      "validateProps": {
        "min": 1,
        "max": 3,
        "dataType": "Array",
        "required": false,
        "validate": false
      },
      "components":{
      "map": {
      "type": "OfficialMap",
      "dataName": "map",
      "label": {
        "description": {
          "desc": ""
        },
        "title": ""
      },
      "wrapperStyle": {},
      "style": {},
      "invisible": false,
      "extension": {},
      "validateProps": {
        "dataType": "Map",
        "required": false,
        "validate": false
      }
    }
      },
      "layout":[
          {
      "id": "map",
      "root": true,
      "children": []
    }]
    }
  1. 类目组件
"category": {
      "type": "OfficialSelect",
      "dataName": "category",
      "label": {
        "title": "商品类别:"
      },
      "wrapperStyle": {
        "display": "flex",
        "flexDirection": "row",
        "justifyContent": "space-between",
        "alignItems": "center",
        "margin": "5px 0",
        "width": "100%"
      },
      "style": {
        "width": "70%",
        "height": "auto"
      },
      "extension": {
        "dataMap": {
          "result": "selectList",
          "label": "text",
          "value": "value"
        },
        "placeholder": "请选择分类",
        "url": "//wangpu.taobao.com/decorate/ajax/select/GetShopCategorySelect.do",
        "resType": "jsonp"
      },
      "validateProps": {
        "required": false,
        "dataType": "",
        "validate": false
      }
    },

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值