eoss-ui 0.7.30 → 0.7.31

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/lib/main.js CHANGED
@@ -4514,7 +4514,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
4514
4514
  // ESM COMPAT FLAG
4515
4515
  __webpack_require__.r(__webpack_exports__);
4516
4516
 
4517
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=0d6a4fb9&
4517
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=a5fa23da&
4518
4518
  var render = function () {
4519
4519
  var _vm = this
4520
4520
  var _h = _vm.$createElement
@@ -4633,7 +4633,7 @@ var staticRenderFns = []
4633
4633
  render._withStripped = true
4634
4634
 
4635
4635
 
4636
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=0d6a4fb9&
4636
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=a5fa23da&
4637
4637
 
4638
4638
  // EXTERNAL MODULE: ./src/config/image.js
4639
4639
  var config_image = __webpack_require__(20);
@@ -17254,16 +17254,15 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17254
17254
 
17255
17255
  var url = _ref.url,
17256
17256
  name = _ref.name,
17257
- width = _ref.width,
17258
- height = _ref.height,
17257
+ _ref$width = _ref.width,
17258
+ width = _ref$width === undefined ? '100%' : _ref$width,
17259
+ _ref$height = _ref.height,
17260
+ height = _ref$height === undefined ? '100%' : _ref$height,
17259
17261
  appCode = _ref.appCode,
17260
17262
  id = _ref.id,
17261
17263
  size = _ref.size;
17262
17264
 
17263
- if (!appCode && !id) {
17264
- console.error('参数错误,缺少appCode或者id');
17265
- return;
17266
- }
17265
+ id = id ? id : appCode ? undefined : 'iframe' + this.dialogs.length;
17267
17266
  var openModel = util["a" /* default */].getStorage('openModel');
17268
17267
  var src = url;
17269
17268
  if (!util["a" /* default */].startWith(url, ['http', '/'], true)) {
@@ -17276,7 +17275,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17276
17275
  src = pathname + url.replace('./', '/');
17277
17276
  }
17278
17277
  if (openModel && openModel == 'dialog') {
17279
- var dialog = {
17278
+ var _dialog = {
17280
17279
  id: id,
17281
17280
  url: src,
17282
17281
  name: name,
@@ -17286,12 +17285,12 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17286
17285
  visible: false,
17287
17286
  size: size
17288
17287
  };
17289
- var n = this.dialogs.push(dialog);
17288
+ var n = this.dialogs.push(_dialog);
17290
17289
  this.$nextTick(function () {
17291
- _this5.$set(dialog, 'index', n - 1);
17292
- _this5.$set(dialog, 'visible', true);
17290
+ _this5.$set(_dialog, 'index', n - 1);
17291
+ _this5.$set(_dialog, 'visible', true);
17293
17292
  });
17294
- return dialog;
17293
+ return _dialog;
17295
17294
  }
17296
17295
 
17297
17296
  if (name) {
@@ -17317,21 +17316,34 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17317
17316
  * @date 2024年9月7日
17318
17317
  **/
17319
17318
  winClose: function winClose(_ref2) {
17319
+ var _$refs$main;
17320
+
17320
17321
  var url = _ref2.url,
17321
17322
  appCode = _ref2.appCode,
17322
- id = _ref2.id;
17323
+ id = _ref2.id,
17324
+ index = _ref2.index,
17325
+ refresh = _ref2.refresh,
17326
+ jumpMenu = _ref2.jumpMenu;
17323
17327
 
17324
17328
  if (!appCode && !id) {
17325
17329
  console.error('参数错误,缺少appCode或者id');
17326
17330
  return;
17327
17331
  }
17328
- var dialog = this.dialogs.find(function (item) {
17329
- return item.url == url || item.appCode == appCode || item.id == id;
17330
- });
17331
- if (dialog) {
17332
- this.$set(dialog, 'visible', false);
17332
+ if (index) {
17333
+ this.$set(this.dialogs, 'visible', false);
17333
17334
  this.dialogs.splice(dialog.index, 1);
17335
+ } else {
17336
+ var _dialog2 = this.dialogs.find(function (item) {
17337
+ return item.url == url || item.appCode == appCode || item.id == id;
17338
+ });
17339
+
17340
+ if (_dialog2) {
17341
+ this.$set(_dialog2, 'visible', false);
17342
+ this.dialogs.splice(_dialog2.index, 1);
17343
+ }
17334
17344
  }
17345
+ refresh && this.$refs.main.handleRefresh(refresh);
17346
+ jumpMenu && (Array.isArray(jumpMenu) ? (_$refs$main = this.$refs.main).jumpMenu.apply(_$refs$main, jumpMenu) : this.$refs.main.jumpMenu(jumpMenu));
17335
17347
  },
17336
17348
 
17337
17349
 
@@ -17341,17 +17353,11 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17341
17353
  * @date 2024年9月7日
17342
17354
  **/
17343
17355
  handleMessage: function handleMessage(e) {
17344
- var _$refs$main,
17345
- _this6 = this,
17346
- _$refs$main2,
17347
- _$refs$main3;
17356
+ var _$refs$main2;
17348
17357
 
17349
17358
  var _e$data = e.data,
17350
17359
  method = _e$data.method,
17351
17360
  args = _e$data.args;
17352
- var index = args.index,
17353
- refresh = args.refresh,
17354
- jumpMenu = args.jumpMenu;
17355
17361
 
17356
17362
  switch (method) {
17357
17363
  case 'reLogin':
@@ -17361,7 +17367,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17361
17367
  this.$refs.main.handleRefresh(args);
17362
17368
  break;
17363
17369
  case 'jumpMenu':
17364
- Array.isArray(args) ? (_$refs$main = this.$refs.main).jumpMenu.apply(_$refs$main, args) : this.$refs.main.jumpMenu(args);
17370
+ Array.isArray(args) ? (_$refs$main2 = this.$refs.main).jumpMenu.apply(_$refs$main2, args) : this.$refs.main.jumpMenu(args);
17365
17371
  break;
17366
17372
  case 'emit':
17367
17373
  var origin = args.origin,
@@ -17374,43 +17380,19 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
17374
17380
  break;
17375
17381
  case 'openDialog':
17376
17382
  //打开弹窗
17377
- if (!args.appCode && !args.id) {
17378
- console.error('参数错误,缺少appCode或者id');
17379
- return;
17380
- }
17381
- args.index = this.dialogs.length;
17382
- args.visible = false;
17383
- this.dialogs.push(args);
17384
- this.$nextTick(function () {
17385
- _this6.$set(args, 'visible', true);
17386
- });
17383
+ this.winOpen(args);
17387
17384
  break;
17388
17385
  case 'closeDialog':
17389
17386
  //关闭弹窗
17390
- this.$set(this.dialogs[index], 'visible', false);
17391
- this.dialogs.splice(index, 1);
17392
- refresh && this.$refs.main.handleRefresh(refresh);
17393
- jumpMenu && (Array.isArray(jumpMenu) ? (_$refs$main2 = this.$refs.main).jumpMenu.apply(_$refs$main2, jumpMenu) : this.$refs.main.jumpMenu(jumpMenu));
17387
+ this.winClose(args);
17394
17388
  break;
17395
17389
  case 'windowOpen':
17396
17390
  //打开弹窗
17397
- if (!args.appCode && !args.id) {
17398
- console.error('参数错误,缺少appCode或者id');
17399
- return;
17400
- }
17401
- args.index = this.dialogs.length;
17402
- args.visible = false;
17403
- this.dialogs.push(args);
17404
- this.$nextTick(function () {
17405
- _this6.$set(args, 'visible', true);
17406
- });
17391
+ this.winOpen(args);
17407
17392
  break;
17408
17393
  case 'windowClose':
17409
17394
  //关闭弹窗
17410
- this.$set(this.dialogs[index], 'visible', false);
17411
- this.dialogs.splice(index, 1);
17412
- refresh && this.$refs.main.handleRefresh(refresh);
17413
- jumpMenu && (Array.isArray(jumpMenu) ? (_$refs$main3 = this.$refs.main).jumpMenu.apply(_$refs$main3, jumpMenu) : this.$refs.main.jumpMenu(jumpMenu));
17395
+ this.winClose(args);
17414
17396
  break;
17415
17397
  }
17416
17398
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.7.30",
3
+ "version": "0.7.31",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
Binary file
Binary file
Binary file
@@ -346,11 +346,8 @@ export default {
346
346
  * @author huangbo
347
347
  * @date 2024年9月7日
348
348
  **/
349
- winOpen({ url, name, width, height, appCode, id, size }) {
350
- if (!appCode && !id) {
351
- console.error('参数错误,缺少appCode或者id');
352
- return;
353
- }
349
+ winOpen({ url, name, width = '100%', height = '100%', appCode, id, size }) {
350
+ id = id ? id : appCode ?undefined: 'iframe' + this.dialogs.length;
354
351
  const openModel = util.getStorage('openModel');
355
352
  let src = url;
356
353
  if (!util.startWith(url, ['http', '/'], true)) {
@@ -406,18 +403,29 @@ export default {
406
403
  * @author huangbo
407
404
  * @date 2024年9月7日
408
405
  **/
409
- winClose({ url, appCode, id }) {
406
+ winClose({ url, appCode, id, index, refresh, jumpMenu }) {
410
407
  if (!appCode && !id) {
411
408
  console.error('参数错误,缺少appCode或者id');
412
409
  return;
413
410
  }
414
- let dialog = this.dialogs.find(
415
- (item) => item.url == url || item.appCode == appCode || item.id == id
416
- );
417
- if (dialog) {
418
- this.$set(dialog, 'visible', false);
411
+ if (index) {
412
+ this.$set(this.dialogs, 'visible', false);
419
413
  this.dialogs.splice(dialog.index, 1);
414
+ } else {
415
+ let dialog = this.dialogs.find(
416
+ (item) => item.url == url || item.appCode == appCode || item.id == id
417
+ );
418
+
419
+ if (dialog) {
420
+ this.$set(dialog, 'visible', false);
421
+ this.dialogs.splice(dialog.index, 1);
422
+ }
420
423
  }
424
+ refresh && this.$refs.main.handleRefresh(refresh);
425
+ jumpMenu &&
426
+ (Array.isArray(jumpMenu)
427
+ ? this.$refs.main.jumpMenu(...jumpMenu)
428
+ : this.$refs.main.jumpMenu(jumpMenu));
421
429
  },
422
430
 
423
431
  /**
@@ -427,7 +435,6 @@ export default {
427
435
  **/
428
436
  handleMessage(e) {
429
437
  const { method, args } = e.data;
430
- const { index, refresh, jumpMenu } = args;
431
438
  switch (method) {
432
439
  case 'reLogin':
433
440
  this.handleReLogin(args);
@@ -446,46 +453,16 @@ export default {
446
453
  iframe.contentWindow.postMessage(data, origin ? origin : '*');
447
454
  break;
448
455
  case 'openDialog': //打开弹窗
449
- if (!args.appCode && !args.id) {
450
- console.error('参数错误,缺少appCode或者id');
451
- return;
452
- }
453
- args.index = this.dialogs.length;
454
- args.visible = false;
455
- this.dialogs.push(args);
456
- this.$nextTick(() => {
457
- this.$set(args, 'visible', true);
458
- });
456
+ this.winOpen(args);
459
457
  break;
460
458
  case 'closeDialog': //关闭弹窗
461
- this.$set(this.dialogs[index], 'visible', false);
462
- this.dialogs.splice(index, 1);
463
- refresh && this.$refs.main.handleRefresh(refresh);
464
- jumpMenu &&
465
- (Array.isArray(jumpMenu)
466
- ? this.$refs.main.jumpMenu(...jumpMenu)
467
- : this.$refs.main.jumpMenu(jumpMenu));
459
+ this.winClose(args);
468
460
  break;
469
461
  case 'windowOpen': //打开弹窗
470
- if (!args.appCode && !args.id) {
471
- console.error('参数错误,缺少appCode或者id');
472
- return;
473
- }
474
- args.index = this.dialogs.length;
475
- args.visible = false;
476
- this.dialogs.push(args);
477
- this.$nextTick(() => {
478
- this.$set(args, 'visible', true);
479
- });
462
+ this.winOpen(args);
480
463
  break;
481
464
  case 'windowClose': //关闭弹窗
482
- this.$set(this.dialogs[index], 'visible', false);
483
- this.dialogs.splice(index, 1);
484
- refresh && this.$refs.main.handleRefresh(refresh);
485
- jumpMenu &&
486
- (Array.isArray(jumpMenu)
487
- ? this.$refs.main.jumpMenu(...jumpMenu)
488
- : this.$refs.main.jumpMenu(jumpMenu));
465
+ this.winClose(args);
489
466
  break;
490
467
  }
491
468
  },
Binary file
package/src/.DS_Store CHANGED
Binary file
package/src/index.js CHANGED
@@ -125,7 +125,7 @@ if (typeof window !== 'undefined' && window.Vue) {
125
125
  }
126
126
 
127
127
  export default {
128
- version: '0.7.30',
128
+ version: '0.7.31',
129
129
  install,
130
130
  Button,
131
131
  ButtonGroup,
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file