From 8a1ee7d651500f848a3c2f05c7fe3be2b7114a43 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 10 四月 2024 00:47:56 +0800 Subject: [PATCH] 2024-04-10 --- src/tabviews/custom/components/card/prop-card/index.jsx | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 0901077..7885b03 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -76,6 +76,14 @@ _data.$$BID = BID || '' _data.$$BData = BData || '' + + if (_config.wrap.datatype === 'static' && BData) { + Object.keys(BData).forEach(key => { + if (/\$/.test(key)) return + _data[key] = BData[key] + }) + } + if (_config.setting.primaryKey) { _data.$$uuid = _data[_config.setting.primaryKey] || '' } @@ -494,8 +502,16 @@ } if (config.wrap.datatype === 'static') { + let _data = {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()} + if (BData) { + Object.keys(BData).forEach(key => { + if (/\$/.test(key)) return + _data[key] = BData[key] + }) + } + this.setState({ - data: {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()}, + data: _data, }) if (!btn) { -- Gitblit v1.8.0