component-shipinlv 1.3.10 → 1.3.11

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.
@@ -152,7 +152,7 @@ var openChrome = /*#__PURE__*/function () {
152
152
  }();
153
153
  var getOpenQuery = /*#__PURE__*/function () {
154
154
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(query, isNew, settingConfig, env) {
155
- var cmdList, url, openUrl, chromeProfileDir, publishExtensionDir;
155
+ var cmdList, url, openUrl, chromeProfileDir, position, publishExtensionDir;
156
156
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
157
157
  while (1) switch (_context4.prev = _context4.next) {
158
158
  case 0:
@@ -203,26 +203,35 @@ var getOpenQuery = /*#__PURE__*/function () {
203
203
  case 16:
204
204
  notification.notificationError('不支持的系统', '发布不支持此系统');
205
205
  case 17:
206
+ position = {
207
+ x: 0,
208
+ y: 0
209
+ };
210
+ if (query.action === 'publish') {
211
+ position.x = -window.screen.width + 100;
212
+ position.y = 10;
213
+ }
214
+
206
215
  // 尺寸
207
- cmdList.push("--window-position=".concat(-window.screen.width + 20, ",10"));
216
+ cmdList.push("--window-position=".concat(position.x, ",").concat(position.y));
208
217
  cmdList.push("--window-size=".concat(window.screen.width, ",").concat(window.screen.height - 100));
209
218
  cmdList.push("--user-data-dir=".concat(chromeProfileDir));
210
219
  cmdList.push("--user-agent=".concat(userAgent()));
211
220
 
212
221
  // 不要检查
213
222
  cmdList.push('--no-first-run', '--no-default-browser-check', '--disable-default-apps');
214
- _context4.next = 24;
223
+ _context4.next = 26;
215
224
  return getPublishExtensionDir(env).catch(function (err) {
216
225
  notification.notificationError('获取插件地址失败', err.message);
217
226
  });
218
- case 24:
227
+ case 26:
219
228
  publishExtensionDir = _context4.sent;
220
229
  if (publishExtensionDir) {
221
- _context4.next = 27;
230
+ _context4.next = 29;
222
231
  break;
223
232
  }
224
233
  return _context4.abrupt("return", Promise.reject(new Error('获取插件地址失败')));
225
- case 27:
234
+ case 29:
226
235
  cmdList.push("--load-extension=".concat(publishExtensionDir));
227
236
  cmdList.push("".concat(openUrl));
228
237
  console.log('profileName:', cmdList, chromeProfileDir);
@@ -230,7 +239,7 @@ var getOpenQuery = /*#__PURE__*/function () {
230
239
  commandList: cmdList,
231
240
  chromeProfileDir: chromeProfileDir
232
241
  });
233
- case 31:
242
+ case 33:
234
243
  case "end":
235
244
  return _context4.stop();
236
245
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",