///
declare module 'zent/lib/design' {
interface IDesignComponent {
type: string|Array
// 预览这个组件的 Component
preview: Function
// 预览组件的包裹层
previewItem?: Function
// 所有预览界面上的事件都是在这个里面处理的
previewController?: Function
// 编辑这个组件的 Component
editor: Function
// 编辑组件的包裹层
editorItem?: Function
// 传给 editor 的额外 props
editorProps?: Function|Object
// 传给 preview 的额外 props
previewProps?: Function|Object
// 组件是否可以拖拽
dragable?: boolean
// 组件是否出现在添加组件的列表里面
appendable?: boolean
// 是否显示右下角的编辑区域(编辑/加内容/删除)
// 不支持在这里配置编辑区域的按钮,参数太多。
// 如果要自定义编辑区域,可以通过重写 previewController 的方式来做。
configurable?: boolean
// 组件是否可以编辑
// 可以选中的组件一定是可以编辑的
// 不可编辑的组件不可选中,只能展示。
// 右下角的编辑区域由 configurable 单独控制
editable?: boolean
// 选中时是否高亮
highlightWhenSelect?: boolean
}
interface IGroupComponent {
type: string
editor: Function
preview: Function
name: string
}
interface IDesignProps {
components: Array
value?: Array