From 10505e3f2b515a9e0c94496b2bc8340316863d64 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 11 一月 2022 09:39:34 +0800 Subject: [PATCH] 2022-01-11 --- src/tabviews/custom/components/card/prop-card/index.jsx | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index a347b8e..e4dc898 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -43,7 +43,7 @@ let _data = { $$empty: true } let _sync = false - if (_config.setting && _config.wrap.datatype !== 'static') { + if (_config.wrap.datatype !== 'static') { _sync = _config.setting.sync === 'true' if (_sync && data) { @@ -64,7 +64,7 @@ if (_data) { _data.$$BID = BID || '' _data.$$BData = BData || '' - if (_config.setting && _config.setting.primaryKey) { + if (_config.setting.primaryKey) { _data.$$uuid = _data[_config.setting.primaryKey] || '' } } @@ -101,7 +101,7 @@ }) let offset = 0 - if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left' && _config.subcards[0] && _width < 24) { + if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left' && _width < 24) { offset = 24 - _width if (_config.wrap.cardFloat === 'center') { offset = Math.floor(offset / 2) @@ -126,7 +126,7 @@ config: _config, arr_field: _config.columns.map(col => col.field).join(','), }, () => { - if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') { + if (_config.wrap.datatype !== 'static' && _config.setting.sync !== 'true' && _config.setting.onload === 'true') { this.loadData() } else if ((!_sync || _config.wrap.priKeyType === 'static') && selected !== 'false') { setTimeout(() => { @@ -192,8 +192,6 @@ checkTopLine = () => { const { config, data, selected } = this.state - - if (!config.subcards[0]) return this.setState({ activeKey: 0, @@ -288,7 +286,7 @@ resetParentParam = (MenuID, id, data) => { const { config } = this.state - if (!config.setting || !config.setting.supModule || config.setting.supModule !== MenuID) return + if (!config.setting.supModule || config.setting.supModule !== MenuID) return if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { this.loadData() -- Gitblit v1.8.0