From 55a1b8402fd258da084df9b8a3935eef8450247c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 01 八月 2021 18:03:02 +0800 Subject: [PATCH] 2021-08-01 --- src/menu/components/form/normal-form/index.jsx | 52 +++++++++++++++++----------------------------------- 1 files changed, 17 insertions(+), 35 deletions(-) diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx index 915753b..3ad8ebf 100644 --- a/src/menu/components/form/normal-form/index.jsx +++ b/src/menu/components/form/normal-form/index.jsx @@ -79,9 +79,9 @@ sort: 1, style: {}, fields: [], - prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'true'}, - subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px'}}, - nextButton: {label: '璺宠繃', type: 'next', enable: 'false'} + prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'true', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}, + subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}}, + nextButton: {label: '璺宠繃', type: 'next', enable: 'false', style: {paddingTop: '5px', paddingBottom: '5px'}} }] } @@ -182,37 +182,10 @@ this.props.updateConfig(card) } - /** - * @description 鍗曚釜鍗$墖淇℃伅鏇存柊 - */ - deleteCard = (cell) => { - let card = fromJS(this.state.card).toJS() - let _this = this - - confirm({ - content: '纭畾鍒犻櫎琛ㄥ崟鍚楋紵', - onOk() { - card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid) - - let uuids = [] - cell.elements && cell.elements.forEach(c => { - if (c.eleType === 'button') { - uuids.push(c.uuid) - } - }) - MKEmitter.emit('delButtons', uuids) - - _this.setState({card}) - _this.props.updateConfig(card) - }, - onCancel() {} - }) - } - changeStyle = () => { const { card } = this.state - MKEmitter.emit('changeStyle', [card.uuid], ['height', 'background', 'border', 'padding', 'margin'], card.style) + MKEmitter.emit('changeStyle', [card.uuid], ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style) } getStyle = (comIds, style) => { @@ -238,9 +211,9 @@ sort: card.subcards.length + 1, style: {}, fields: [], - prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'true'}, - subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px'}}, - nextButton: {label: '璺宠繃', type: 'next', enable: 'false'} + prevButton: {label: '涓婁竴姝�', type: 'prev', enable: 'true', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}, + subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}}, + nextButton: {label: '璺宠繃', type: 'next', enable: 'false', style: {paddingTop: '5px', paddingBottom: '5px'}} } card.subcards.push(newcard) @@ -314,10 +287,19 @@ } handleGroupSubmit = () => { - const { group } = this.state + let group = fromJS(this.state.group).toJS() this.groupRef.handleConfirm().then(res => { + group.prevButton.enable = res.prevEnable + group.subButton.enable = res.subEnable + group.nextButton.enable = res.nextEnable + + delete res.prevEnable + delete res.subEnable + delete res.nextEnable + group.setting = res + this.setState({groupvisible: false}) this.updateGroup(group) }) -- Gitblit v1.8.0