From 2f952c67cb4eddd4ad916a8418b3aee4cae82111 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 十一月 2021 10:00:09 +0800 Subject: [PATCH] 2021-11-02 --- src/mob/components/menubar/normal-menubar/index.jsx | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/mob/components/menubar/normal-menubar/index.jsx b/src/mob/components/menubar/normal-menubar/index.jsx index 95c3d50..43d1e85 100644 --- a/src/mob/components/menubar/normal-menubar/index.jsx +++ b/src/mob/components/menubar/normal-menubar/index.jsx @@ -19,6 +19,7 @@ const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) +const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) const { confirm } = Modal @@ -45,10 +46,14 @@ floor: card.floor, tabId: '', parentId: '', + format: 'object', // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡 + pageable: false, // 缁勪欢灞炴�� - 鏄惁鍙垎椤� + switchable: false, // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹� dataName: card.dataName || '', width: card.width || 24, name: card.name, subtype: card.subtype, + setting: { interType: 'system' }, wrap: { name: card.name, width: card.width || 24, title: '' }, style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, @@ -227,7 +232,16 @@ } updateWrap = (res) => { - this.updateComponent({...this.state.card, wrap: res}) + let card = {...this.state.card, wrap: res} + if (res.datatype === 'dynamic' && !card.format) { + card.format = 'object' + card.pageable = false + card.switchable = false + card.setting = { interType: 'system' } + card.columns = [] + card.scripts = [] + } + this.updateComponent(card) } clickComponent = (e) => { @@ -268,6 +282,8 @@ <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> <UserComponent config={card}/> <Icon className="close" title="鍒犻櫎缁勪欢" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> + {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} + {card.wrap.datatype !== 'dynamic' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} </div> } trigger="hover"> <Icon type="tool" /> -- Gitblit v1.8.0