...
元素名称枚举 | ||||||||||||||||||||||
import ElementTypes from "@fe-plugin/components/lib/constants/element-types"; | ||||||||||||||||||||||
元素名称 | 元素私有配置 | |||||||||||||||||||||
按钮 ElementTypes.BTN |
| |||||||||||||||||||||
文本 ElementTypes.TEXT |
| |||||||||||||||||||||
图片 ElementTypes.IMAGE |
| |||||||||||||||||||||
表单选项 ElementTypes.CHOOSE | ||||||||||||||||||||||
表单输入框 ElementTypes.INPUT | ||||||||||||||||||||||
表单文本域 ElementTypes.TEXTAREA | ||||||||||||||||||||||
表单提交 ElementTypes.SUBMIT | ||||||||||||||||||||||
文件上上传 ElementTypes.FILEUPLOADER | ||||||||||||||||||||||
表单下拉框 ElementTypes.SELECT | ||||||||||||||||||||||
弹窗 ElementTypes.DIAGLOG | ||||||||||||||||||||||
形状 ElementTypes.SHAPE | 微信头像 ElementTypes.WXPORTRAIT | 微信昵称 ElementTypes.WXNICKNAME |
default-setting 配置示例
代码块 | ||||
---|---|---|---|---|
| ||||
//包含一个按钮 和 一个内置页的组件 const defaultSetting = { name: "testCmp", title: "测试组件", inlinePages:[ { name: "INLINE_PAGE_A", title: "这是内置页", style: {}, cover: "https://static.h5no1.com/rp/plugin/assets/a19e096f-89b8-4f15-8187-09db7a3c86f0", } ], elements:[ { key: "BTN_A", name: "按钮", type: "btn", label: "确定", style: { position: "absolute", left: 42, top: 353, width: 235, height: 39, backgroundColor: "rgba(224,47,36,1)", borderRadius: 20, fontSize: 15, fontWeight: 600, color: "rgba(255,255,255,1)", }, parentName: "testCmp", }, ], cover:"https://static.h5no1.com/rp/plugin/assets/85becc30-ccb4-41b2-ad75-9bfa9447e587", style: { width: 293, height: 408, backgroundColor: "#fff", }, hasComponentSetting: true, }; |
...