From 9b0754adb7fbe595eef73010992c0ce53ef6571a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 11 十月 2023 17:22:36 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/actionList/printbutton/index.jsx | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 6691220..4bd500f 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -2148,7 +2148,19 @@ _item.value = _item.value.replace(/\t+|\v+/g, '') // 鍘婚櫎鍒惰〃绗� if (item.interception !== 'false') { // 鍘婚櫎棣栧熬绌烘牸 - _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') + if (item.interception === 'func') { + try { + // eslint-disable-next-line + let func = new Function('value', 'data', item.func) + _item.value = func(_item.value, _data) + _item.value = _item.value !== undefined ? _item.value : '' + } catch (e) { + console.warn(e) + _item.value = '' + } + } else { + _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') + } } if (_item.type === 'text' && /@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 鐗规畩瀛楁鏇挎崲 _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) -- Gitblit v1.8.0