From bdfec44c9f3a37dbbe05bf14a252ffec04132a86 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 21:24:28 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/table/normal-table/index.jsx | 50 +++++++++++++++++++++++--------------------------- 1 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx index 0ba1305..480a7db 100644 --- a/src/menu/components/table/normal-table/index.jsx +++ b/src/menu/components/table/normal-table/index.jsx @@ -143,7 +143,6 @@ } componentDidMount () { - MKEmitter.addListener('submitStyle', this.getStyle) MKEmitter.addListener('submitModal', this.handleSave) // MKEmitter.addListener('logButton', this.logButton) MKEmitter.addListener('completeSave', this.completeSave) @@ -160,7 +159,6 @@ this.setState = () => { return } - MKEmitter.removeListener('submitStyle', this.getStyle) MKEmitter.removeListener('submitModal', this.handleSave) // MKEmitter.removeListener('logButton', this.logButton) MKEmitter.removeListener('completeSave', this.completeSave) @@ -208,14 +206,14 @@ if (!window.GLOB.styling || !card.errors) { // 鏍峰紡淇敼鏃朵笉鍋氱瓫鏌� card.errors = [] - let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' - if (supModule === 'empty') { - supModule = '' - } + // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' + // if (supModule === 'empty') { + // supModule = '' + // } let doubleClick = card.wrap.doubleClick || '' let columns = card.columns.map(c => c.field) - let lowcols = card.columns.map(c => c.field.toLowerCase()) + // let lowcols = card.columns.map(c => c.field.toLowerCase()) if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { card.errors.push({ level: 0, detail: '鏈缃暟鎹簮锛�'}) @@ -233,14 +231,14 @@ if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { if (!cell.modal || cell.modal.fields.length === 0) { card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟灏氭湭娣诲姞`}) - } else { - cell.modal.fields.forEach(m => { - if (m.type === 'linkMain' && !supModule) { - card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄}) - } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { - card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻}) - } - }) + // } else { + // cell.modal.fields.forEach(m => { + // if (m.type === 'linkMain' && !supModule) { + // card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄}) + // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { + // card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻}) + // } + // }) } } if (doubleClick === cell.uuid) { @@ -254,14 +252,14 @@ if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { if (!cell.modal || cell.modal.fields.length === 0) { card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟灏氭湭娣诲姞`}) - } else { - cell.modal.fields.forEach(m => { - if (m.type === 'linkMain' && !supModule) { - card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄}) - } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { - card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻}) - } - }) + // } else { + // cell.modal.fields.forEach(m => { + // if (m.type === 'linkMain' && !supModule) { + // card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄}) + // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) { + // card.errors.push({ level: 1, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻}) + // } + // }) } } if (doubleClick === cell.uuid) { @@ -319,13 +317,11 @@ style.fontSize = card.wrap.fontSize || 14 style.fontWeight = card.wrap.fontWeight || 'normal' - MKEmitter.emit('changeStyle', [card.uuid], ['font1', 'background', 'border', 'padding', 'margin', 'shadow'], style) + MKEmitter.emit('changeStyle', ['font1', 'background', 'border', 'padding', 'margin', 'shadow'], style, this.getStyle) } - getStyle = (comIds, style) => { + getStyle = (style) => { const { card } = this.state - - if (comIds[0] !== card.uuid || comIds.length !== 1) return let _card = fromJS(card).toJS() let _style = fromJS(style).toJS() -- Gitblit v1.8.0