...
1、ComponentInlinePage 内置页配置
元素 | 说明 | 类型 |
---|---|---|
name | 内置页英文名 | string |
title | 内置页标题 | string |
cover | 内置页封面图 | string |
style | 内置页样式 | Object | undefined |
anchorsType | 编辑状态锚点的类型:为空则表示没有锚点,不能改变大小 'nw n ne e se s sw w' 代表组件编辑框的8个锚点 | string | undefined |
height | 内置页高度 | number | undefined |
2、内置页配置示例
代码块 | ||||
---|---|---|---|---|
| ||||
//file = app/default-setting/element.js import * as INLINE from "constants/inline-pages-names"; import ElementTypes from "@fe-plugin/components/lib/constants/element-types"; //导出一个内置页配置 export default [ { name: INLINE.INLINE_A, title: "这是内置页", style: {}, cover: "https://static.h5no1.com/rp/plugin/assets/a19e096f-89b8-4f15-8187-09db7a3c86f0", }, ] |
...
代码块 | ||||
---|---|---|---|---|
| ||||
//file = app/default-setting/index.js import inlinePages from "app/default-settings/inline-pages"; import elements from "app/default-settings/element"; //组件命名 const ComponentName = "testCmp"; //默认设置 const defaultSetting = { name: ComponentName, title: "测试组件", //导入内置页设置 inlinePages, //导入元素设置 elements, cover: "https://static.h5no1.com/rp/plugin/assets/85becc30-ccb4-41b2-ad75-9bfa9447e587", style: { width: 293, height: 408, backgroundColor: "#fff", }, hasComponentSetting: true, hasPluginSetting: false, // 组件独有设置(在setting模块中使用) cmpSettingData: { isAlertExist: 0, alertText: "这里是默认设置的aler字符这是独有设置中的属性", }, }; export default defaultSetting; |
...