This commit is contained in:
贤心
2021-04-22 10:22:45 +08:00
parent 0a433bf2e4
commit 726cdd9ba5
20 changed files with 637 additions and 111 deletions

View File

@@ -67,7 +67,7 @@ layui.define(function(exports){
//匹配JS规则内容
.replace(/(?="|')/g, '\\').replace(tool.query(), function(str){
str = str.replace(jss, '').replace(jsse, '');
return '";' + str.replace(/\\/g, '') + ';view+="';
return '";' + str.replace(/\\(.)/g, '$1') + ';view+="';
})
//匹配普通字段
@@ -81,7 +81,7 @@ layui.define(function(exports){
str = str.replace(/^=/, '');
start = '"+_escape_(';
}
return start + str.replace(/\\/g, '') + ')+"';
return start + str.replace(/\\(.)/g, '$1') + ')+"';
});
tpl = '"use strict";var view = "' + tpl + '";return view;';