Browse Source

CORE-127 简化前端国际化写法

master
Dailer 6 years ago
parent
commit
313009e2e2
  1. 4
      src/core/base.js

4
src/core/base.js

@ -44,10 +44,10 @@ if (!_global.BI) {
localeText = key;
}
var len = arguments.length;
var regexp = new RegExp("\\{\\s*\\}");
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
localeText = localeText.replace(regexp, arguments[i] + "");
}
}
return localeText;

Loading…
Cancel
Save