@lingxiteam/assets 3.3.1-alpha.6 → 3.3.1-alpha.7

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.
package/es/theme/index.js CHANGED
@@ -59,7 +59,7 @@ var extractZip = function extractZip() {
59
59
  };
60
60
 
61
61
  // 获取主题
62
- var getTheme = /*#__PURE__*/function () {
62
+ var getThemeImpl = /*#__PURE__*/function () {
63
63
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
64
64
  var domains, downRes, i;
65
65
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -102,15 +102,49 @@ var getTheme = /*#__PURE__*/function () {
102
102
  if (downRes) {
103
103
  extractZip();
104
104
  }
105
- case 19:
105
+ return _context.abrupt("return", downRes);
106
+ case 20:
106
107
  case "end":
107
108
  return _context.stop();
108
109
  }
109
110
  }
110
111
  }, _callee);
111
112
  }));
112
- return function getTheme(_x) {
113
+ return function getThemeImpl(_x) {
113
114
  return _ref2.apply(this, arguments);
114
115
  };
115
116
  }();
117
+ var getTheme = /*#__PURE__*/function () {
118
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
119
+ var url, res;
120
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
121
+ while (1) {
122
+ switch (_context2.prev = _context2.next) {
123
+ case 0:
124
+ url = 'https://dev.iwhalecloud.com/portal/zcm-doc/file/download?filePath=document/book-275/doc/uploads/63433/ad4b0668-59d1-4535-8ab9-9633517f95b0/default.zip';
125
+ _context2.prev = 1;
126
+ _context2.next = 4;
127
+ return getThemeImpl(url);
128
+ case 4:
129
+ res = _context2.sent;
130
+ if (!res) {
131
+ getThemeImpl();
132
+ }
133
+ _context2.next = 11;
134
+ break;
135
+ case 8:
136
+ _context2.prev = 8;
137
+ _context2.t0 = _context2["catch"](1);
138
+ console.error(_context2.t0);
139
+ case 11:
140
+ case "end":
141
+ return _context2.stop();
142
+ }
143
+ }
144
+ }, _callee2, null, [[1, 8]]);
145
+ }));
146
+ return function getTheme() {
147
+ return _ref3.apply(this, arguments);
148
+ };
149
+ }();
116
150
  export default getTheme;
@@ -65,7 +65,7 @@ var extractZip = function extractZip() {
65
65
  };
66
66
 
67
67
  // 获取主题
68
- var getTheme = /*#__PURE__*/function () {
68
+ var getThemeImpl = /*#__PURE__*/function () {
69
69
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
70
70
  var domains, downRes, i;
71
71
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -108,16 +108,50 @@ var getTheme = /*#__PURE__*/function () {
108
108
  if (downRes) {
109
109
  extractZip();
110
110
  }
111
- case 19:
111
+ return _context.abrupt("return", downRes);
112
+ case 20:
112
113
  case "end":
113
114
  return _context.stop();
114
115
  }
115
116
  }
116
117
  }, _callee);
117
118
  }));
118
- return function getTheme(_x) {
119
+ return function getThemeImpl(_x) {
119
120
  return _ref2.apply(this, arguments);
120
121
  };
121
122
  }();
123
+ var getTheme = /*#__PURE__*/function () {
124
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
125
+ var url, res;
126
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
127
+ while (1) {
128
+ switch (_context2.prev = _context2.next) {
129
+ case 0:
130
+ url = 'https://dev.iwhalecloud.com/portal/zcm-doc/file/download?filePath=document/book-275/doc/uploads/63433/ad4b0668-59d1-4535-8ab9-9633517f95b0/default.zip';
131
+ _context2.prev = 1;
132
+ _context2.next = 4;
133
+ return getThemeImpl(url);
134
+ case 4:
135
+ res = _context2.sent;
136
+ if (!res) {
137
+ getThemeImpl();
138
+ }
139
+ _context2.next = 11;
140
+ break;
141
+ case 8:
142
+ _context2.prev = 8;
143
+ _context2.t0 = _context2["catch"](1);
144
+ console.error(_context2.t0);
145
+ case 11:
146
+ case "end":
147
+ return _context2.stop();
148
+ }
149
+ }
150
+ }, _callee2, null, [[1, 8]]);
151
+ }));
152
+ return function getTheme() {
153
+ return _ref3.apply(this, arguments);
154
+ };
155
+ }();
122
156
  var _default = getTheme;
123
157
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxiteam/assets",
3
- "version": "3.3.1-alpha.6",
3
+ "version": "3.3.1-alpha.7",
4
4
  "description": "灵犀低代码平台移动端 - 工具类",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",