* zin: refactor $.getScript with $.getLib.

This commit is contained in:
sunhao
2023-08-02 16:19:43 +08:00
parent 8c939d9d6e
commit 1024ce8c51
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -29,6 +29,6 @@ class echarts extends wg
global $app;
$jsFile = $app->getWebRoot() . 'js/echarts/echarts.common.min.js';
return zui::echarts(inherit($this), set::_call("~((name,selector,options) => $.getScript('$jsFile', null, () => zui.create(name,selector,options)))"));
return zui::echarts(inherit($this), set::_call("~((name,selector,options) => $.getLib('$jsFile', null, () => zui.create(name,selector,options)))"));
}
}
+1 -1
View File
@@ -30,7 +30,7 @@ class editor extends wg
// global $app;
// $jsFile = $app->getWebRoot() . 'js/zeneditor/tiptap-component.esm.js';
$jsFile = 'https://zui-dist.oop.cc/zeneditor/tiptap-component.esm.js';
return '$.getScript("' . $jsFile . '", {type: "module"}, () => {document.body.dataset.loadedEditor = true;});';
return '$.getLib("' . $jsFile . '", {type: "module"}, () => {document.body.dataset.loadedEditor = true;});';
}
protected function build(): wg
+1 -1
View File
@@ -28,7 +28,7 @@ class password extends wg
return $checkStrength ? array
(
h::jsCall('$.getScript', $jsRoot . 'md5.js'),
h::jsCall('$.getLib', $jsRoot . 'md5.js'),
jsVar('window.strengthClass', $strengthClass),
jsVar('window.passwordStrengthList', $lang->user->passwordStrengthList),
inputGroup