1.1.5 • Published 3 years ago
@aliretail/editor-tools-link-selector v1.1.5
EditorToolsLinkSelector
@aliretail/editor-tools-link-selector
编辑器内的选择链接小工具
API
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|---|---|---|---|---|
visible | 是否展示 | true | boolean | false | 完全受控 |
currentPageList | 当前页面链接列表 | true | array | [] | 无 |
dialogProps | dialog组件的props | true | object | -- | 透传 |
dialogProps.onOk | 点击确认的回调方法 | true | function | -- | 选择的结果会作为入参传入该方法的定义中 |
dialogProps.onClose | 点击关闭的回调方法 | true | function | -- | 选择的结果会作为入参传入该方法的定义中 |
dialogProps.onCancel | 点击取消的回调方法 | true | function | -- | 选择的结果会作为入参传入该方法的定义中 |
demo
<EditorToolsLinkSelector visible={visible}
currentPageList = {[{
id: 'mapsijf',
imgUrl: '',
name: '双11大促预热',
type: '广告弹窗',
behaviorDesc: '锚点',
behaviorCode: '0', // 0: 锚点; 1: 弹窗;
}]}
dialogProps={{
onOk: (obj) => {
console.log('链接对象', obj);
this.setState({visible: false})
}
}}/>