From 8f394e7ef20cc0abba3f47c23a63b069e9dd0e45 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 19 十月 2022 15:09:30 +0800 Subject: [PATCH] 2022-10-19 --- src/views/mobdesign/index.jsx | 34 ++++------------------------------ 1 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 384ca4e..6d3d572 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: [] }) } -- Gitblit v1.8.0