| | |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | } |
| | | |