From e2afee71874538e31ed57032e3ad1bba1188ab4b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 20 十月 2022 15:31:41 +0800 Subject: [PATCH] 2022-10-20 --- src/views/mobdesign/index.jsx | 36 +++++------------------------------- 1 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 384ca4e..bbd3cdb 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -152,7 +152,6 @@ MKEmitter.addListener('modalStatus', this.modalStatus) MKEmitter.addListener('triggerMenuSave', this.submitConfig) MKEmitter.addListener('changeEditMenu', this.changeEditMenu) - MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent) setTimeout(() => { if (sessionStorage.getItem('app_custom_components')) { @@ -220,7 +219,6 @@ MKEmitter.removeListener('modalStatus', this.modalStatus) MKEmitter.removeListener('triggerMenuSave', this.submitConfig) MKEmitter.removeListener('changeEditMenu', this.changeEditMenu) - MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle) MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) } @@ -457,28 +455,6 @@ this.setState({customComponents: coms}) } - updateComponentStyle = (parentId, keys, style) => { - const { config } = this.state - - if (config.uuid !== parentId) return - - let components = config.components.map(item => { - if (keys.includes(item.uuid)) { - item.style = {...item.style, ...style} - } - return item - }) - - this.setState({ - config: {...config, components}, - comloading: true - }, () => { - this.setState({ - comloading: false - }) - }) - } - closeView = () => { const { oriConfig, config } = this.state @@ -656,18 +632,16 @@ backElements: [] } ], - headerStyle: {}, parentId: '', width: 24, scripts: [], pageable: false, + headerStyle: {}, width: 24, scripts: [], pageable: false, wrap: {name: 'logo', width: 24, datatype: 'static', cardType: '', blacklist: []}, name: 'logo', floor: 1, switchable: true, - setting:{interType: 'system'}, tabId: '', style:{paddingTop: '8vh', paddingBottom: '10vh'}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: [] + setting:{interType: 'system'}, style:{paddingTop: '8vh', paddingBottom: '10vh'}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: [] }) config.components.push({ uuid: Utils.getuuid(), type: 'login', floor: 1, - tabId: '', - parentId: '', width: 24, name: '鐢ㄦ埛缁戝畾', subtype: 'bindlogin', @@ -687,10 +661,10 @@ backElements: [] } ], - headerStyle: {}, parentId: '', width: 24, scripts: [], pageable: false, + headerStyle: {}, width: 24, scripts: [], pageable: false, wrap: {name: 'Power', width: 24, datatype: 'static', cardType: '', blacklist: []}, name: 'Power', floor: 1, switchable: true, - setting:{interType: 'system'}, tabId: '', style:{}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: [] + setting:{interType: 'system'}, style:{}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: [] }) } @@ -2030,12 +2004,12 @@ <SysInterface config={config} updateConfig={this.updateConfig}/> <PictureController/> <Quotecomponent config={config} updateConfig={this.updateConfig}/> + <StyleCombControlButton menu={config} /> <Button className="mk-border-green set-home" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> <Button className="mk-border-purple set-login" onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <Transfer MenuID={MenuId} /> <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> - <StyleCombControlButton menu={config} /> <Button className="mk-border-danger" onClick={this.refreshView}><RedoOutlined /> 寮哄埗鍒锋柊</Button> <Button type="default" onClick={this.closeView}>鍏抽棴</Button> </div> -- Gitblit v1.8.0