eoss-ui 0.4.65 → 0.4.67

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.
Files changed (65) hide show
  1. package/lib/button-group.js +17 -8
  2. package/lib/button.js +17 -8
  3. package/lib/checkbox-group.js +53 -15
  4. package/lib/data-table-form.js +17 -8
  5. package/lib/data-table.js +17 -8
  6. package/lib/date-picker.js +17 -8
  7. package/lib/dialog.js +20 -11
  8. package/lib/editor.js +2 -2
  9. package/lib/eoss-ui.common.js +6479 -5844
  10. package/lib/flow-group.js +17 -8
  11. package/lib/flow-list.js +17 -8
  12. package/lib/flow.js +22 -12
  13. package/lib/form.js +6354 -5979
  14. package/lib/handle-user.js +17 -8
  15. package/lib/handler.js +17 -8
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +17 -8
  18. package/lib/input.js +37 -15
  19. package/lib/login.js +22 -15
  20. package/lib/main.js +138 -101
  21. package/lib/menu.js +7 -3
  22. package/lib/nav.js +21 -11
  23. package/lib/page.js +17 -8
  24. package/lib/player.js +19 -10
  25. package/lib/qr-code.js +17 -8
  26. package/lib/radio-group.js +53 -15
  27. package/lib/retrial-auth.js +17 -8
  28. package/lib/select-ganged.js +42 -13
  29. package/lib/select.js +72 -23
  30. package/lib/selector-panel.js +17 -8
  31. package/lib/selector.js +17 -8
  32. package/lib/sizer.js +17 -8
  33. package/lib/steps.js +17 -8
  34. package/lib/switch.js +17 -8
  35. package/lib/table-form.js +1320 -1204
  36. package/lib/tabs.js +17 -8
  37. package/lib/theme-chalk/index.css +1 -1
  38. package/lib/theme-chalk/main.css +1 -1
  39. package/lib/tips.js +17 -8
  40. package/lib/tree-group.js +17 -8
  41. package/lib/tree.js +17 -8
  42. package/lib/upload.js +17 -8
  43. package/lib/utils/util.js +17 -8
  44. package/lib/wujie.js +17 -8
  45. package/lib/wxlogin.js +17 -8
  46. package/package.json +2 -2
  47. package/packages/checkbox-group/src/main.vue +47 -5
  48. package/packages/flow/src/main.vue +6 -5
  49. package/packages/form/src/main.vue +1442 -1315
  50. package/packages/form/src/table.vue +375 -318
  51. package/packages/input/src/main.vue +20 -7
  52. package/packages/login/src/main.vue +3 -5
  53. package/packages/main/src/main.vue +82 -61
  54. package/packages/main/src/userinfo.vue +12 -2
  55. package/packages/menu/src/main.vue +19 -3
  56. package/packages/nav/src/main.vue +2 -1
  57. package/packages/radio-group/src/main.vue +47 -5
  58. package/packages/select/src/main.vue +66 -21
  59. package/packages/select-ganged/src/main.vue +42 -18
  60. package/packages/theme-chalk/lib/index.css +1 -1
  61. package/packages/theme-chalk/lib/main.css +1 -1
  62. package/packages/theme-chalk/src/main.scss +5 -1
  63. package/packages/theme-chalk/src/menu.scss +1 -1
  64. package/src/index.js +1 -1
  65. package/src/utils/util.js +18 -8
package/lib/main.js CHANGED
@@ -2274,16 +2274,19 @@ var uuid = function uuid(len) {
2274
2274
  **/
2275
2275
  var watermark = function watermark(option) {
2276
2276
  // 默认设置
2277
+ var _width = parseInt(option.width || 480, 10);
2278
+ var _height = parseInt(option.width || 180, 10);
2279
+ var _rows = Math.round(document.body.clientHeight / _height);
2280
+ var _cols = Math.round(document.body.clientWidth / _width);
2277
2281
  var config = {
2278
- rows: 5, // 水印行数
2279
- cols: 5,
2282
+ rows: _rows, // 水印行数
2283
+ cols: _cols,
2280
2284
  html: '水印示例', // 水印文本内容
2281
2285
  angle: -15, // 旋转角度
2282
2286
  color: '#000', // 水印文字颜色
2283
- width: '', // 水印宽度
2284
- minWidth: 300, // 水印最小宽度
2285
- height: 120, // 水印高度
2286
- lineHeight: 120, // 水印行高
2287
+ minWidth: _width, // 水印最小宽度
2288
+ height: _height, // 水印高度
2289
+ lineHeight: 20, // 水印行高
2287
2290
  opacity: 0.1, // 水印透明度
2288
2291
  fontSize: 14, // 水印文字字体大小
2289
2292
  fontWeight: 400, // 水印字体粗细
@@ -2309,7 +2312,6 @@ var watermark = function watermark(option) {
2309
2312
  html = options.html,
2310
2313
  angle = options.angle,
2311
2314
  color = options.color,
2312
- width = options.width,
2313
2315
  minWidth = options.minWidth,
2314
2316
  height = options.height,
2315
2317
  lineHeight = options.lineHeight,
@@ -2326,11 +2328,18 @@ var watermark = function watermark(option) {
2326
2328
  for (var i = 0; i < num; i++) {
2327
2329
  var item = document.createElement('div');
2328
2330
  item.innerHTML = html;
2329
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (width ? parseInt(width, 10) + 'px' : 100 / cols + '%') + ';min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2331
+ item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2330
2332
  docFrag.appendChild(item);
2331
2333
  }
2332
2334
  wrap.appendChild(docFrag);
2333
2335
  document.body.appendChild(wrap);
2336
+ var _timeout = void 0;
2337
+ window.onresize = function () {
2338
+ clearTimeout(_timeout);
2339
+ _timeout = setTimeout(function () {
2340
+ watermark(options);
2341
+ }, 1000);
2342
+ };
2334
2343
  };
2335
2344
 
2336
2345
  /* harmony default export */ __webpack_exports__["a"] = ({
@@ -2942,7 +2951,7 @@ module.exports = require("stompjs");
2942
2951
  // ESM COMPAT FLAG
2943
2952
  __webpack_require__.r(__webpack_exports__);
2944
2953
 
2945
- // 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=668e9750&
2954
+ // 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=3f8b642a&
2946
2955
  var render = function () {
2947
2956
  var _vm = this
2948
2957
  var _h = _vm.$createElement
@@ -3368,10 +3377,10 @@ var staticRenderFns = []
3368
3377
  render._withStripped = true
3369
3378
 
3370
3379
 
3371
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=668e9750&
3380
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=3f8b642a&
3372
3381
 
3373
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=c2c69d4a&
3374
- var userinfovue_type_template_id_c2c69d4a_render = function () {
3382
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=799780ee&
3383
+ var userinfovue_type_template_id_799780ee_render = function () {
3375
3384
  var _vm = this
3376
3385
  var _h = _vm.$createElement
3377
3386
  var _c = _vm._self._c || _h
@@ -3387,11 +3396,11 @@ var userinfovue_type_template_id_c2c69d4a_render = function () {
3387
3396
  2
3388
3397
  )
3389
3398
  }
3390
- var userinfovue_type_template_id_c2c69d4a_staticRenderFns = []
3391
- userinfovue_type_template_id_c2c69d4a_render._withStripped = true
3399
+ var userinfovue_type_template_id_799780ee_staticRenderFns = []
3400
+ userinfovue_type_template_id_799780ee_render._withStripped = true
3392
3401
 
3393
3402
 
3394
- // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=template&id=c2c69d4a&
3403
+ // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=template&id=799780ee&
3395
3404
 
3396
3405
  // EXTERNAL MODULE: ./src/config/api.js
3397
3406
  var api = __webpack_require__(1);
@@ -3427,6 +3436,10 @@ var util = __webpack_require__(0);
3427
3436
  showNotify: {
3428
3437
  type: Boolean,
3429
3438
  default: true
3439
+ },
3440
+ secret: {
3441
+ type: Boolean,
3442
+ default: true
3430
3443
  }
3431
3444
  },
3432
3445
  data: function data() {
@@ -3711,11 +3724,11 @@ var util = __webpack_require__(0);
3711
3724
  email: this.values.email,
3712
3725
  officeTel: this.values.officetel,
3713
3726
  phone: this.values.phone,
3714
- oldPassword: initLogin && initLogin.secret && this.values.oldpassword ? util["a" /* default */].esmEncrypt({
3727
+ oldPassword: this.secret && initLogin && initLogin.secret && this.values.oldpassword ? util["a" /* default */].esmEncrypt({
3715
3728
  data: this.values.oldpassword,
3716
3729
  key: initLogin.secret
3717
3730
  }) : this.values.oldpassword,
3718
- password: initLogin && initLogin.secret && this.values.password ? util["a" /* default */].esmEncrypt({
3731
+ password: this.secret && initLogin && initLogin.secret && this.values.password ? util["a" /* default */].esmEncrypt({
3719
3732
  data: this.values.password,
3720
3733
  key: initLogin.secret
3721
3734
  }) : this.values.password
@@ -3814,8 +3827,8 @@ var componentNormalizer = __webpack_require__(3);
3814
3827
 
3815
3828
  var component = Object(componentNormalizer["a" /* default */])(
3816
3829
  src_userinfovue_type_script_lang_js_,
3817
- userinfovue_type_template_id_c2c69d4a_render,
3818
- userinfovue_type_template_id_c2c69d4a_staticRenderFns,
3830
+ userinfovue_type_template_id_799780ee_render,
3831
+ userinfovue_type_template_id_799780ee_staticRenderFns,
3819
3832
  false,
3820
3833
  null,
3821
3834
  null,
@@ -5875,13 +5888,16 @@ var log = util["a" /* default */].getParams('console');
5875
5888
  }
5876
5889
  },
5877
5890
  setTitle: function setTitle(id) {
5891
+ var node = void 0;
5878
5892
  for (var i = 0; i < this.menus.length; i++) {
5879
5893
  var item = this.menus[i];
5880
5894
  if (item.id == id) {
5881
5895
  this.title = item.text;
5882
- return item;
5896
+ node = item;
5897
+ break;
5883
5898
  }
5884
5899
  }
5900
+ return node;
5885
5901
  },
5886
5902
  renderMenu: function renderMenu() {
5887
5903
  if (this.data !== undefined && this.data.length) {
@@ -5991,10 +6007,10 @@ var log = util["a" /* default */].getParams('console');
5991
6007
  this.homePage = results[i];
5992
6008
  if (this.isHomePage) {
5993
6009
  if (this.menus) {
5994
- var _ids4 = null;
5995
- this.homePage && (_ids4 = this.getId(this.menus, this.homePage));
5996
- if (_ids4) {
5997
- this.defaultActive = _ids4;
6010
+ var ids = null;
6011
+ this.homePage && (ids = this.getId(this.menus, this.homePage));
6012
+ if (ids) {
6013
+ this.defaultActive = ids;
5998
6014
  } else if (this.homePage) {
5999
6015
  this.handleJump(this.homePage);
6000
6016
  }
@@ -6144,9 +6160,9 @@ var log = util["a" /* default */].getParams('console');
6144
6160
  _this5.menus = JSON.parse(JSON.stringify(res.results));
6145
6161
  var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
6146
6162
  if (applicationid) {
6147
- var _ids5 = _this5.getId(_this5.menus, applicationid);
6148
- if (_ids5) {
6149
- _this5.defaultActive = _ids5;
6163
+ var ids = _this5.getId(_this5.menus, applicationid);
6164
+ if (ids) {
6165
+ _this5.defaultActive = ids;
6150
6166
  }
6151
6167
  } else if (util["a" /* default */].win.location.hash) {
6152
6168
  var hash = util["a" /* default */].win.location.hash;
@@ -6154,26 +6170,26 @@ var log = util["a" /* default */].getParams('console');
6154
6170
  hash = hash.split('?')[0];
6155
6171
  }
6156
6172
  if (hash !== '#/' && hash !== '#/main') {
6157
- var _ids6 = _this5.getId(_this5.menus, util["a" /* default */].win.location.hash, true);
6158
- if (_ids6) {
6159
- _this5.defaultActive = _ids6;
6160
- _this5.navIds = _ids6;
6161
- _this5.setTitle(_ids6[0]);
6173
+ var _ids4 = _this5.getId(_this5.menus, util["a" /* default */].win.location.hash, true);
6174
+ if (_ids4) {
6175
+ _this5.defaultActive = _ids4;
6176
+ _this5.navIds = _ids4;
6177
+ _this5.setTitle(_ids4[0]);
6162
6178
  }
6163
6179
  } else if (sessionStorage.getItem('jump') && _this5.history) {
6164
- var _ids7 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6165
- if (_ids7) {
6166
- _this5.defaultActive = _ids7;
6167
- _this5.navIds = _ids7;
6168
- _this5.setTitle(_ids7[0]);
6180
+ var _ids5 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6181
+ if (_ids5) {
6182
+ _this5.defaultActive = _ids5;
6183
+ _this5.navIds = _ids5;
6184
+ _this5.setTitle(_ids5[0]);
6169
6185
  }
6170
6186
  }
6171
6187
  } else if (sessionStorage.getItem('jump') && _this5.history) {
6172
- var _ids8 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6173
- if (_ids8) {
6174
- _this5.defaultActive = _ids8;
6175
- _this5.navIds = _ids8;
6176
- _this5.setTitle(_ids8[0]);
6188
+ var _ids6 = _this5.getId(_this5.menus, sessionStorage.getItem('jump'), true);
6189
+ if (_ids6) {
6190
+ _this5.defaultActive = _ids6;
6191
+ _this5.navIds = _ids6;
6192
+ _this5.setTitle(_ids6[0]);
6177
6193
  }
6178
6194
  }
6179
6195
  _this5.setTips(_this5.menus);
@@ -6199,9 +6215,9 @@ var log = util["a" /* default */].getParams('console');
6199
6215
  if (this.homePage || !util["a" /* default */].getStorage('mainConfig')) {
6200
6216
  this.isDefault = true;
6201
6217
  if (this.homePage && (!this.defaultActive || !this.defaultActive.length)) {
6202
- var _ids9 = this.getId(this.menus, this.homePage);
6203
- if (_ids9) {
6204
- this.defaultActive = _ids9;
6218
+ var ids = this.getId(this.menus, this.homePage);
6219
+ if (ids) {
6220
+ this.defaultActive = ids;
6205
6221
  this.isDefault = false;
6206
6222
  this.setDefault(res, this.defaultActive);
6207
6223
  return false;
@@ -6351,6 +6367,7 @@ var log = util["a" /* default */].getParams('console');
6351
6367
 
6352
6368
  //设置默认导航页面
6353
6369
  setDefault: function setDefault(res, active) {
6370
+ this.navIds = JSON.parse(JSON.stringify(active));
6354
6371
  this.sysId = '';
6355
6372
  this.tabsId = '';
6356
6373
  this.active = '';
@@ -6448,14 +6465,9 @@ var log = util["a" /* default */].getParams('console');
6448
6465
 
6449
6466
  //应用导航交互
6450
6467
  handleSelect: function handleSelect(res, type, open) {
6451
- console.log(type, 11);
6452
6468
  var node = res.node,
6453
6469
  fourthTabs = res.fourthTabs;
6454
6470
 
6455
- var openIdex = 0;
6456
- if (node.extendData && (node.extendData.subDefOpenIndex || node.extendData.subDefOpen)) {
6457
- openIdex = parseInt(node.extendData.subDefOpenIndex || node.extendData.subDefOpen, 10);
6458
- }
6459
6471
  if (!open) {
6460
6472
  if (node.extendData && node.extendData.businessStatus == 0 && node.extendData.businessWarnMsg) {
6461
6473
  this.$alert(node.extendData.businessWarnMsg, '提示', {
@@ -6469,13 +6481,16 @@ var log = util["a" /* default */].getParams('console');
6469
6481
  switch (type) {
6470
6482
  case 'nav':
6471
6483
  this.tabs = [];
6472
- this.active = '';
6484
+ //this.active = '';
6473
6485
  if (this.layout === 'topside') {
6474
- this.navIds = [node.id];
6475
- this.menu = node.children;
6476
- this.title = node.text;
6486
+ if (this.title !== node.text) {
6487
+ this.navIds = [node.id];
6488
+ this.menu = node.children;
6489
+ this.active = node.id;
6490
+ this.title = node.text;
6491
+ }
6477
6492
  if (this.setFirstAsDefault) {
6478
- var subNode = this.getFirst(node.children[openIdex]);
6493
+ var subNode = this.getFirst(node);
6479
6494
  if (subNode) {
6480
6495
  this.active = subNode.id;
6481
6496
  this.navIds = [node.id].concat(this.getId(node.children, subNode.url, true));
@@ -6483,7 +6498,7 @@ var log = util["a" /* default */].getParams('console');
6483
6498
  }
6484
6499
  } else {
6485
6500
  this.navIds = this.getId(this.menus, node.url, true);
6486
- this.setTitle(ids[0]);
6501
+ this.setTitle(this.navIds[0]);
6487
6502
  this.tabsId = fourthTabs ? node.id : '';
6488
6503
  }
6489
6504
  break;
@@ -6492,9 +6507,16 @@ var log = util["a" /* default */].getParams('console');
6492
6507
  this.navIds = [node.id];
6493
6508
  this.tabs = [];
6494
6509
  this.menu = node.children;
6495
- this.title = node.text;
6510
+ if (this.title !== node.text) {
6511
+ this.active = '';
6512
+ this.title = node.text;
6513
+ }
6496
6514
  if (this.setFirstAsDefault) {
6497
- this.active = this.getFirst(node.children[openIdex]).id;
6515
+ var _subNode = this.getFirst(node);
6516
+ if (_subNode) {
6517
+ this.active = _subNode.id;
6518
+ this.navIds = [node.id].concat(this.getId(node.children, _subNode.url, true));
6519
+ }
6498
6520
  }
6499
6521
  this.isSide = true;
6500
6522
  }
@@ -6504,56 +6526,73 @@ var log = util["a" /* default */].getParams('console');
6504
6526
  if (node.url) {
6505
6527
  this.tabs = [];
6506
6528
  }
6529
+ if (this.title !== node.text) {
6530
+ this.active = [node.id];
6531
+ this.title = node.text;
6532
+ }
6507
6533
  if (this.setFirstAsDefault) {
6508
- var _subNode = this.getFirst(node);
6534
+ var _subNode2 = this.getFirst(node);
6509
6535
  this.active = [node.id];
6510
- if (_subNode && node.id !== _subNode.id) {
6511
- this.navIds = this.getId(this.menus, _subNode.url, true);
6512
- this.$set(this.active, 1, _subNode.id);
6536
+ if (_subNode2 && node.id !== _subNode2.id) {
6537
+ this.navIds = this.getId(this.menus, _subNode2.url, true);
6538
+ this.$set(this.active, 1, _subNode2.id);
6513
6539
  }
6514
6540
  }
6515
6541
  break;
6516
6542
  case 'menu':
6517
6543
  if (!open) {
6518
6544
  this.tabs = [];
6519
- if (this.setFirstAsDefault) {
6520
- if (this.biserial) {
6521
- this.$set(this.active, 1, node.id);
6522
- } else {
6523
- this.active = node.id;
6524
- }
6545
+ if (this.biserial) {
6546
+ this.$set(this.active, 1, node.id);
6547
+ } else {
6548
+ this.active = node.id;
6525
6549
  }
6526
- }
6527
- if (node.url) {
6528
- if (node.children && node.children.length) {
6529
- var tab = node.children.filter(function (item) {
6530
- return item.url === node.url;
6531
- })[0];
6532
- if (tab) {
6533
- if (this.biserial) {
6534
- this.$set(this.active, 1, tab.id);
6550
+ if (node.url) {
6551
+ if (node.children && node.children.length) {
6552
+ var tab = node.children.filter(function (item) {
6553
+ return item.url === node.url;
6554
+ })[0];
6555
+ if (tab) {
6556
+ if (this.biserial) {
6557
+ this.$set(this.active, 1, tab.id);
6558
+ } else {
6559
+ this.active = tab.id;
6560
+ }
6561
+ this.navIds = this.getId(this.menus, tab.url, true);
6562
+ }
6563
+ } else {
6564
+ var _tab = (node.fourthTabs || []).filter(function (item) {
6565
+ return item.url === node.url;
6566
+ })[0];
6567
+ if (_tab) {
6568
+ this.tabs = node.fourthTabs;
6569
+ this.tabsId = _tab.id;
6570
+ this.navIds = this.getId(this.menus, _tab.url, true);
6535
6571
  } else {
6536
- this.active = tab.id;
6572
+ this.navIds = this.getId(this.menus, node.url, true);
6537
6573
  }
6538
- this.navIds = this.getId(this.menus, tab.url, true);
6539
6574
  }
6540
6575
  } else {
6541
- var _tab = (node.fourthTabs || []).filter(function (item) {
6542
- return item.url === node.url;
6543
- })[0];
6544
- if (_tab) {
6576
+ if (node.fourthTabs.length) {
6545
6577
  this.tabs = node.fourthTabs;
6546
- this.tabsId = _tab.id;
6547
- this.navIds = this.getId(this.menus, _tab.url, true);
6548
- } else {
6549
- this.navIds = this.getId(this.menus, node.url, true);
6578
+ this.tabsId = this.tabs[0].id;
6579
+ this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
6580
+ this.navIds = this.getId(this.menus, this.tabs[0].url, true);
6581
+ }
6582
+ }
6583
+ } else {
6584
+ if (this.setFirstAsDefault) {
6585
+ this.tabs = [];
6586
+ var _subNode3 = this.getFirst(node);
6587
+ if (_subNode3) {
6588
+ if (this.biserial) {
6589
+ this.$set(this.active, 1, _subNode3.id);
6590
+ } else {
6591
+ this.active = _subNode3.id;
6592
+ }
6593
+ this.navIds = this.getId(this.menus, _subNode3.url, true);
6550
6594
  }
6551
6595
  }
6552
- } else if (node.fourthTabs.length) {
6553
- this.tabs = node.fourthTabs;
6554
- this.tabsId = this.tabs[0].id;
6555
- this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
6556
- this.navIds = this.getId(this.menus, this.tabs[0].url, true);
6557
6596
  }
6558
6597
  break;
6559
6598
  case 'tabs':
@@ -6772,17 +6811,12 @@ var log = util["a" /* default */].getParams('console');
6772
6811
  }
6773
6812
  }
6774
6813
  } else {
6775
- if (menus.fourthTabs && menus.fourthTabs.length) {
6776
- for (var _i = 0; _i < menus.fourthTabs.length; _i++) {
6777
- var item = menus.fourthTabs[_i];
6778
- if (item.id === id) {
6779
- return item;
6780
- }
6781
- }
6814
+ if (menus.fourthTabs && menus.fourthTabs.length && menus.id === id) {
6815
+ return menus;
6782
6816
  }
6783
6817
  if (menus.children && menus.children.length) {
6784
- for (var _i2 = 0; _i2 < menus.children.length; _i2++) {
6785
- var _fourth = this.getFourthTabs(menus.children[_i2], id);
6818
+ for (var _i = 0; _i < menus.children.length; _i++) {
6819
+ var _fourth = this.getFourthTabs(menus.children[_i], id);
6786
6820
  if (_fourth) {
6787
6821
  return _fourth;
6788
6822
  }
@@ -6792,6 +6826,9 @@ var log = util["a" /* default */].getParams('console');
6792
6826
  return false;
6793
6827
  },
6794
6828
  handleLayout: function handleLayout(res, old) {
6829
+ if (res == old) {
6830
+ return;
6831
+ }
6795
6832
  this.layout = res;
6796
6833
  switch (res) {
6797
6834
  case 'topnav':
package/lib/menu.js CHANGED
@@ -292,7 +292,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
292
292
  return {
293
293
  maxH: '',
294
294
  maxW: '',
295
- menuId: null
295
+ menuId: null,
296
+ defaultOpeneds: [],
297
+ isChange: false
296
298
  };
297
299
  },
298
300
  mounted: function mounted() {},
@@ -314,6 +316,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
314
316
  handleSelect: function handleSelect(key, keyPath, item) {
315
317
  var _this2 = this;
316
318
 
319
+ this.isChange = true;
317
320
  if (this.menuId !== null && keyPath.indexOf(this.menuId) == -1) {
318
321
  this.$refs.menu.close(this.menuId);
319
322
  } else {
@@ -390,7 +393,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
390
393
  }
391
394
  }));
392
395
  return [h('el-submenu', {
393
- class: ['es-submenu', 'es-submenu-' + this.mode],
396
+ class: ['es-submenu', 'es-submenu-' + this.mode, item.id === this.active && !this.isChange ? 'es-menu-item-focus' : ''],
394
397
  props: {
395
398
  popperClass: popper,
396
399
  popperAppendToBody: true,
@@ -408,7 +411,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
408
411
  }
409
412
  }));
410
413
  return [h('el-submenu', {
411
- class: ['es-submenu', 'es-submenu-' + this.mode],
414
+ class: ['es-submenu', 'es-submenu-' + this.mode, item.id === this.active && !this.isChange ? 'es-menu-item-focus' : ''],
412
415
  props: {
413
416
  popperClass: popper,
414
417
  popperAppendToBody: true,
@@ -492,6 +495,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
492
495
  class: ['es-menu', 'es-menu-' + this.mode, { 'es-menu-collapse': this.collapse }, { 'es-menu-nav': this.subNav }],
493
496
  ref: 'menu',
494
497
  props: {
498
+ defaultOpeneds: this.defaultOpeneds,
495
499
  defaultActive: this.active,
496
500
  collapse: this.collapse,
497
501
  mode: this.mode,
package/lib/nav.js CHANGED
@@ -2275,16 +2275,19 @@ var uuid = function uuid(len) {
2275
2275
  **/
2276
2276
  var watermark = function watermark(option) {
2277
2277
  // 默认设置
2278
+ var _width = parseInt(option.width || 480, 10);
2279
+ var _height = parseInt(option.width || 180, 10);
2280
+ var _rows = Math.round(document.body.clientHeight / _height);
2281
+ var _cols = Math.round(document.body.clientWidth / _width);
2278
2282
  var config = {
2279
- rows: 5, // 水印行数
2280
- cols: 5,
2283
+ rows: _rows, // 水印行数
2284
+ cols: _cols,
2281
2285
  html: '水印示例', // 水印文本内容
2282
2286
  angle: -15, // 旋转角度
2283
2287
  color: '#000', // 水印文字颜色
2284
- width: '', // 水印宽度
2285
- minWidth: 300, // 水印最小宽度
2286
- height: 120, // 水印高度
2287
- lineHeight: 120, // 水印行高
2288
+ minWidth: _width, // 水印最小宽度
2289
+ height: _height, // 水印高度
2290
+ lineHeight: 20, // 水印行高
2288
2291
  opacity: 0.1, // 水印透明度
2289
2292
  fontSize: 14, // 水印文字字体大小
2290
2293
  fontWeight: 400, // 水印字体粗细
@@ -2310,7 +2313,6 @@ var watermark = function watermark(option) {
2310
2313
  html = options.html,
2311
2314
  angle = options.angle,
2312
2315
  color = options.color,
2313
- width = options.width,
2314
2316
  minWidth = options.minWidth,
2315
2317
  height = options.height,
2316
2318
  lineHeight = options.lineHeight,
@@ -2327,11 +2329,18 @@ var watermark = function watermark(option) {
2327
2329
  for (var i = 0; i < num; i++) {
2328
2330
  var item = document.createElement('div');
2329
2331
  item.innerHTML = html;
2330
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (width ? parseInt(width, 10) + 'px' : 100 / cols + '%') + ';min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2332
+ item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2331
2333
  docFrag.appendChild(item);
2332
2334
  }
2333
2335
  wrap.appendChild(docFrag);
2334
2336
  document.body.appendChild(wrap);
2337
+ var _timeout = void 0;
2338
+ window.onresize = function () {
2339
+ clearTimeout(_timeout);
2340
+ _timeout = setTimeout(function () {
2341
+ watermark(options);
2342
+ }, 1000);
2343
+ };
2335
2344
  };
2336
2345
 
2337
2346
  /* harmony default export */ __webpack_exports__["a"] = ({
@@ -2863,7 +2872,7 @@ module.exports = require("qs");
2863
2872
  // ESM COMPAT FLAG
2864
2873
  __webpack_require__.r(__webpack_exports__);
2865
2874
 
2866
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=fd9419ca&
2875
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/nav/src/main.vue?vue&type=template&id=1e79807a&
2867
2876
  var render = function () {
2868
2877
  var _vm = this
2869
2878
  var _h = _vm.$createElement
@@ -3006,7 +3015,7 @@ var staticRenderFns = []
3006
3015
  render._withStripped = true
3007
3016
 
3008
3017
 
3009
- // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=fd9419ca&
3018
+ // CONCATENATED MODULE: ./packages/nav/src/main.vue?vue&type=template&id=1e79807a&
3010
3019
 
3011
3020
  // EXTERNAL MODULE: ./src/utils/util.js
3012
3021
  var util = __webpack_require__(0);
@@ -3115,7 +3124,7 @@ var util = __webpack_require__(0);
3115
3124
  return active;
3116
3125
  },
3117
3126
  menuActive: function menuActive() {
3118
- var active = this.defaultActive === 'string' ? this.defaultActive : this.defaultActive.length ? this.defaultActive[this.defaultActive.length - 1] : undefined;
3127
+ var active = typeof this.defaultActive === 'string' ? this.defaultActive : this.defaultActive.length ? this.defaultActive[this.defaultActive.length - 1] : undefined;
3119
3128
  return active;
3120
3129
  },
3121
3130
  boxWidth: function boxWidth() {
@@ -3143,6 +3152,7 @@ var util = __webpack_require__(0);
3143
3152
  biserial: {
3144
3153
  handler: function handler(val) {
3145
3154
  this.isShow = !val;
3155
+ this.resetHeight();
3146
3156
  }
3147
3157
  },
3148
3158
  defaultActive: {
package/lib/page.js CHANGED
@@ -2275,16 +2275,19 @@ var uuid = function uuid(len) {
2275
2275
  **/
2276
2276
  var watermark = function watermark(option) {
2277
2277
  // 默认设置
2278
+ var _width = parseInt(option.width || 480, 10);
2279
+ var _height = parseInt(option.width || 180, 10);
2280
+ var _rows = Math.round(document.body.clientHeight / _height);
2281
+ var _cols = Math.round(document.body.clientWidth / _width);
2278
2282
  var config = {
2279
- rows: 5, // 水印行数
2280
- cols: 5,
2283
+ rows: _rows, // 水印行数
2284
+ cols: _cols,
2281
2285
  html: '水印示例', // 水印文本内容
2282
2286
  angle: -15, // 旋转角度
2283
2287
  color: '#000', // 水印文字颜色
2284
- width: '', // 水印宽度
2285
- minWidth: 300, // 水印最小宽度
2286
- height: 120, // 水印高度
2287
- lineHeight: 120, // 水印行高
2288
+ minWidth: _width, // 水印最小宽度
2289
+ height: _height, // 水印高度
2290
+ lineHeight: 20, // 水印行高
2288
2291
  opacity: 0.1, // 水印透明度
2289
2292
  fontSize: 14, // 水印文字字体大小
2290
2293
  fontWeight: 400, // 水印字体粗细
@@ -2310,7 +2313,6 @@ var watermark = function watermark(option) {
2310
2313
  html = options.html,
2311
2314
  angle = options.angle,
2312
2315
  color = options.color,
2313
- width = options.width,
2314
2316
  minWidth = options.minWidth,
2315
2317
  height = options.height,
2316
2318
  lineHeight = options.lineHeight,
@@ -2327,11 +2329,18 @@ var watermark = function watermark(option) {
2327
2329
  for (var i = 0; i < num; i++) {
2328
2330
  var item = document.createElement('div');
2329
2331
  item.innerHTML = html;
2330
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (width ? parseInt(width, 10) + 'px' : 100 / cols + '%') + ';min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2332
+ item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2331
2333
  docFrag.appendChild(item);
2332
2334
  }
2333
2335
  wrap.appendChild(docFrag);
2334
2336
  document.body.appendChild(wrap);
2337
+ var _timeout = void 0;
2338
+ window.onresize = function () {
2339
+ clearTimeout(_timeout);
2340
+ _timeout = setTimeout(function () {
2341
+ watermark(options);
2342
+ }, 1000);
2343
+ };
2335
2344
  };
2336
2345
 
2337
2346
  /* harmony default export */ __webpack_exports__["a"] = ({