efront 4.15.2 → 4.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -836,13 +836,6 @@ var hook = function (requires_count) {
836
836
  modules.hook_time = +new Date;
837
837
  if (document) {
838
838
  initPixelDecoder();
839
- if (modules.hook_time - efront_time < (isProduction ? 30 : 5) && document.querySelector && devicePixelRatio > 1 && /Linux/.test(navigator.platform) && navigator.maxTouchPoints > 0) {
840
- let ratio = +(1000000 / devicePixelRatio + .5 | 0) / 1000000;
841
- document.querySelector("meta[name=viewport]").setAttribute("content", `width=device-width,target-densitydpi=device-dpi,user-scalable=no,initial-scale=1,maximum-scale=${ratio}`);
842
- renderPixelRatio *= devicePixelRatio;
843
- modules.renderPixelRatio = renderPixelRatio;
844
- devicePixelRatio = modules.devicePixelRatio = 1;
845
- }
846
839
  if (!efrontPath) efrontPath = document.body.getAttribute("main-path") || document.body.getAttribute("path") || document.body.getAttribute("main") || "zimoli";
847
840
  }
848
841
  init(efrontPath, function (zimoli) {
@@ -1,4 +1,4 @@
1
- var { File, location } = this;
1
+ var { File, location, FormData, navigator } = this;
2
2
  function hasFile(o) {
3
3
  if (!File) return false;
4
4
  for (var k in o) {
@@ -152,7 +152,7 @@ function cross_(jsonp, digest = noop, method, url, headers) {
152
152
  };
153
153
  var getErrorSystem = function () {
154
154
  if (location && !/^(\w+\:|\/\/)/.test(url) && /^file\:/i.test(location.href) || /^file\:/i.test(url)) return i18n`文件系统`;
155
- if (navigator.onLine) return i18n`网络`;
155
+ if (navigator?.onLine) return i18n`网络`;
156
156
  return i18n`服务器`;
157
157
  };
158
158
 
@@ -2245,4 +2245,7 @@ var createDataURL = function (width, height, getPixel) {
2245
2245
 
2246
2246
  // multibyte support
2247
2247
 
2248
- qrcode.stringToBytesFuncs['UTF-8'] = /* 这一块已被efront作者修改 */ encodeUTF8;
2248
+ qrcode.stringToBytes =
2249
+ qrcode.stringToBytesFuncs.default =
2250
+ qrcode.stringToBytesFuncs['UTF-8'] =
2251
+ /* 这一块已被efront作者修改 */ encodeUTF8;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.15.2",
3
+ "version": "4.15.3",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {