1
0
mirror of https://gitee.com/layui/layui.git synced 2025-04-05 17:38:02 +08:00

Merge commit from fork

This commit is contained in:
贤心 2024-09-23 11:18:29 +08:00 committed by GitHub
parent 5e707cec12
commit f756b41d63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,8 +24,8 @@
// 获取 layui 所在目录
var getPath = function(){
var jsPath = doc.currentScript ? doc.currentScript.src : function(){
var js = doc.scripts;
var jsPath = (doc.currentScript && doc.currentScript.tagName.toUpperCase() === 'SCRIPT') ? doc.currentScript.src : function(){
var js = doc.getElementsByTagName('script');
var last = js.length - 1;
var src;
for(var i = last; i > 0; i--){