From 162440a345abe2432df48b933bb858e6f1b56449 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 18 一月 2024 11:26:38 +0800 Subject: [PATCH] 2024-01-18 --- src/tabviews/custom/index.jsx | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index c6c0b26..aa98810 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -919,12 +919,24 @@ } if (cell.verify && cell.verify.preHandle === 'true') { - try { - // eslint-disable-next-line - let func = new Function('btn', 'systemType', cell.verify.pre_func) - func(cell, window.GLOB.systemType) - } catch (e) { - console.warn(e) + let script = cell.verify.pre_func + if (!/#position-/.test(script) || /#position-init/.test(script)) { + try { + // eslint-disable-next-line + let func = new Function('btn', 'position', 'systemType', script) + func(cell, 'init', window.GLOB.systemType) + } catch (e) { + console.warn(e) + } + } + if (/#position-inner/.test(script)) { + cell.$innerScript = script + } + if (/#position-outer/.test(script)) { + cell.$outerScript = script + } + if (/#position-callback/.test(script)) { + cell.$callbackScript = script } } -- Gitblit v1.8.0