-
Notifications
You must be signed in to change notification settings - Fork 1
组件描述
子凡 edited this page Jul 5, 2019
·
2 revisions
描述组件 props、events、actions信息。
config.js
const props = [
{
key: "href",
type: "string",
info: "链接指向的页面的 URL",
defaultValue: "javascript:;"
},
{
key: "target",
type: "string",
info: "打开链接文档方式",
defaultValue: "_self",
enum: [
{
text: "_self",
value: "_self"
},
{
text: "_blank",
value: "_blank"
},
{
text: "_parent",
value: "_parent"
},
{
text: "_top",
value: "_top"
}
]
}
];
const events = [];
const actions = [
{
key: "click",
type: "string",
info: "点击按钮",
defaultValue: undefined
}
];
export default {
props,
events,
actions
};
props
中 type
字段决定了在平台上设置属性值的组件类型。举例:
- type: "string" -> Input
- type: "boolean" -> Switch