eoss-ui 0.4.65 → 0.4.66

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 (51) hide show
  1. package/lib/button-group.js +17 -8
  2. package/lib/button.js +17 -8
  3. package/lib/checkbox-group.js +17 -8
  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 +17 -8
  8. package/lib/eoss-ui.common.js +6646 -6148
  9. package/lib/flow-group.js +17 -8
  10. package/lib/flow-list.js +17 -8
  11. package/lib/flow.js +22 -12
  12. package/lib/form.js +8648 -8278
  13. package/lib/handle-user.js +17 -8
  14. package/lib/handler.js +17 -8
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +17 -8
  17. package/lib/input.js +37 -15
  18. package/lib/login.js +22 -15
  19. package/lib/main.js +78 -60
  20. package/lib/nav.js +20 -11
  21. package/lib/page.js +17 -8
  22. package/lib/player.js +17 -8
  23. package/lib/qr-code.js +17 -8
  24. package/lib/radio-group.js +17 -8
  25. package/lib/retrial-auth.js +17 -8
  26. package/lib/select-ganged.js +17 -8
  27. package/lib/select.js +17 -8
  28. package/lib/selector-panel.js +17 -8
  29. package/lib/selector.js +17 -8
  30. package/lib/sizer.js +17 -8
  31. package/lib/steps.js +17 -8
  32. package/lib/switch.js +17 -8
  33. package/lib/table-form.js +1320 -1204
  34. package/lib/tabs.js +17 -8
  35. package/lib/tips.js +17 -8
  36. package/lib/tree-group.js +17 -8
  37. package/lib/tree.js +17 -8
  38. package/lib/upload.js +17 -8
  39. package/lib/utils/util.js +17 -8
  40. package/lib/wujie.js +17 -8
  41. package/lib/wxlogin.js +17 -8
  42. package/package.json +2 -2
  43. package/packages/flow/src/main.vue +6 -5
  44. package/packages/form/src/main.vue +1435 -1313
  45. package/packages/form/src/table.vue +375 -318
  46. package/packages/input/src/main.vue +20 -7
  47. package/packages/login/src/main.vue +3 -5
  48. package/packages/main/src/main.vue +60 -54
  49. package/packages/nav/src/main.vue +1 -1
  50. package/src/index.js +1 -1
  51. package/src/utils/util.js +18 -8
@@ -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"] = ({
package/lib/input.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"] = ({
@@ -2969,9 +2978,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2969
2978
  scope: {},
2970
2979
  exclude: Boolean
2971
2980
  },
2981
+ watch: {
2982
+ data: {
2983
+ immediate: true,
2984
+ deep: true,
2985
+ handler: function handler(val) {
2986
+ this.results = val;
2987
+ }
2988
+ }
2989
+ },
2972
2990
  data: function data() {
2973
2991
  return {
2974
- results: this.data
2992
+ results: []
2975
2993
  };
2976
2994
  },
2977
2995
 
@@ -3034,7 +3052,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3034
3052
  mounted: function mounted() {},
3035
3053
 
3036
3054
  methods: {
3037
- getData: function getData(query, callback) {
3055
+ getData: function getData(query, callback, isChange) {
3038
3056
  var _this2 = this;
3039
3057
 
3040
3058
  if (_typeof(this.url) && this.results.length === 0) {
@@ -3055,18 +3073,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3055
3073
  }
3056
3074
  });
3057
3075
  } else {
3058
- var results = query ? this.results.filter(this.searchFilter(query)) : this.results;
3076
+ var results = query ? this.results.filter(this.searchFilter(query, isChange)) : this.results;
3059
3077
  callback(results);
3060
3078
  }
3061
3079
  },
3062
- searchFilter: function searchFilter(query) {
3080
+ searchFilter: function searchFilter(query, isChange) {
3063
3081
  var _this3 = this;
3064
3082
 
3065
3083
  return function (state) {
3066
- if (_this3.exclude) {
3067
- return state.value.toLowerCase().indexOf(query.toLowerCase()) === -1;
3084
+ if (isChange) {
3085
+ return state.value.indexOf(query) > -1;
3068
3086
  } else {
3069
- return state.value.toLowerCase().indexOf(query.toLowerCase()) === 0;
3087
+ if (_this3.exclude) {
3088
+ return state.value !== query;
3089
+ } else {
3090
+ return state.value === query;
3091
+ }
3070
3092
  }
3071
3093
  };
3072
3094
  },
package/lib/login.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"] = ({
@@ -2881,7 +2890,7 @@ function normalizeComponent(
2881
2890
  // ESM COMPAT FLAG
2882
2891
  __webpack_require__.r(__webpack_exports__);
2883
2892
 
2884
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=cff92b8a&
2893
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=39507db1&
2885
2894
  var render = function () {
2886
2895
  var _vm = this
2887
2896
  var _h = _vm.$createElement
@@ -3021,7 +3030,7 @@ var render = function () {
3021
3030
  placeholder: _vm.username.placeholder,
3022
3031
  focusShow: _vm.focusShow,
3023
3032
  data: _vm.users,
3024
- autocomplete: "off",
3033
+ autocomplete: true,
3025
3034
  },
3026
3035
  on: { select: _vm.handleBlur },
3027
3036
  model: {
@@ -3739,7 +3748,7 @@ var staticRenderFns = []
3739
3748
  render._withStripped = true
3740
3749
 
3741
3750
 
3742
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=cff92b8a&
3751
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=39507db1&
3743
3752
 
3744
3753
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=4f5da52e&
3745
3754
  var resetPasswordvue_type_template_id_4f5da52e_render = function () {
@@ -4959,10 +4968,8 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4959
4968
  }
4960
4969
  }
4961
4970
  },
4962
- handleBlur: function handleBlur() {
4963
- if (this.formData.username && !this.formData.password) {
4964
- this.getRemember(this.formData.username);
4965
- }
4971
+ handleBlur: function handleBlur(res) {
4972
+ this.getRemember(res.value);
4966
4973
  },
4967
4974
  handleRemember: function handleRemember() {
4968
4975
  var values = localStorage.getItem('unpd');
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=9f517a06&
2946
2955
  var render = function () {
2947
2956
  var _vm = this
2948
2957
  var _h = _vm.$createElement
@@ -3368,7 +3377,7 @@ 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=9f517a06&
3372
3381
 
3373
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=c2c69d4a&
3374
3383
  var userinfovue_type_template_id_c2c69d4a_render = function () {
@@ -5875,13 +5884,16 @@ var log = util["a" /* default */].getParams('console');
5875
5884
  }
5876
5885
  },
5877
5886
  setTitle: function setTitle(id) {
5887
+ var node = void 0;
5878
5888
  for (var i = 0; i < this.menus.length; i++) {
5879
5889
  var item = this.menus[i];
5880
5890
  if (item.id == id) {
5881
5891
  this.title = item.text;
5882
- return item;
5892
+ node = item;
5893
+ break;
5883
5894
  }
5884
5895
  }
5896
+ return node;
5885
5897
  },
5886
5898
  renderMenu: function renderMenu() {
5887
5899
  if (this.data !== undefined && this.data.length) {
@@ -6351,6 +6363,7 @@ var log = util["a" /* default */].getParams('console');
6351
6363
 
6352
6364
  //设置默认导航页面
6353
6365
  setDefault: function setDefault(res, active) {
6366
+ this.navIds = JSON.parse(JSON.stringify(active));
6354
6367
  this.sysId = '';
6355
6368
  this.tabsId = '';
6356
6369
  this.active = '';
@@ -6448,14 +6461,9 @@ var log = util["a" /* default */].getParams('console');
6448
6461
 
6449
6462
  //应用导航交互
6450
6463
  handleSelect: function handleSelect(res, type, open) {
6451
- console.log(type, 11);
6452
6464
  var node = res.node,
6453
6465
  fourthTabs = res.fourthTabs;
6454
6466
 
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
6467
  if (!open) {
6460
6468
  if (node.extendData && node.extendData.businessStatus == 0 && node.extendData.businessWarnMsg) {
6461
6469
  this.$alert(node.extendData.businessWarnMsg, '提示', {
@@ -6475,7 +6483,7 @@ var log = util["a" /* default */].getParams('console');
6475
6483
  this.menu = node.children;
6476
6484
  this.title = node.text;
6477
6485
  if (this.setFirstAsDefault) {
6478
- var subNode = this.getFirst(node.children[openIdex]);
6486
+ var subNode = this.getFirst(node);
6479
6487
  if (subNode) {
6480
6488
  this.active = subNode.id;
6481
6489
  this.navIds = [node.id].concat(this.getId(node.children, subNode.url, true));
@@ -6494,7 +6502,11 @@ var log = util["a" /* default */].getParams('console');
6494
6502
  this.menu = node.children;
6495
6503
  this.title = node.text;
6496
6504
  if (this.setFirstAsDefault) {
6497
- this.active = this.getFirst(node.children[openIdex]).id;
6505
+ var _subNode = this.getFirst(node);
6506
+ if (_subNode) {
6507
+ this.active = _subNode.id;
6508
+ this.navIds = [node.id].concat(this.getId(node.children, _subNode.url, true));
6509
+ }
6498
6510
  }
6499
6511
  this.isSide = true;
6500
6512
  }
@@ -6505,55 +6517,66 @@ var log = util["a" /* default */].getParams('console');
6505
6517
  this.tabs = [];
6506
6518
  }
6507
6519
  if (this.setFirstAsDefault) {
6508
- var _subNode = this.getFirst(node);
6520
+ var _subNode2 = this.getFirst(node);
6509
6521
  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);
6522
+ if (_subNode2 && node.id !== _subNode2.id) {
6523
+ this.navIds = this.getId(this.menus, _subNode2.url, true);
6524
+ this.$set(this.active, 1, _subNode2.id);
6513
6525
  }
6514
6526
  }
6515
6527
  break;
6516
6528
  case 'menu':
6517
6529
  if (!open) {
6518
6530
  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
- }
6531
+ if (this.biserial) {
6532
+ this.$set(this.active, 1, node.id);
6533
+ } else {
6534
+ this.active = node.id;
6525
6535
  }
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);
6536
+ if (node.url) {
6537
+ if (node.children && node.children.length) {
6538
+ var tab = node.children.filter(function (item) {
6539
+ return item.url === node.url;
6540
+ })[0];
6541
+ if (tab) {
6542
+ if (this.biserial) {
6543
+ this.$set(this.active, 1, tab.id);
6544
+ } else {
6545
+ this.active = tab.id;
6546
+ }
6547
+ this.navIds = this.getId(this.menus, tab.url, true);
6548
+ }
6549
+ } else {
6550
+ var _tab = (node.fourthTabs || []).filter(function (item) {
6551
+ return item.url === node.url;
6552
+ })[0];
6553
+ if (_tab) {
6554
+ this.tabs = node.fourthTabs;
6555
+ this.tabsId = _tab.id;
6556
+ this.navIds = this.getId(this.menus, _tab.url, true);
6535
6557
  } else {
6536
- this.active = tab.id;
6558
+ this.navIds = this.getId(this.menus, node.url, true);
6537
6559
  }
6538
- this.navIds = this.getId(this.menus, tab.url, true);
6539
6560
  }
6540
6561
  } else {
6541
- var _tab = (node.fourthTabs || []).filter(function (item) {
6542
- return item.url === node.url;
6543
- })[0];
6544
- if (_tab) {
6562
+ if (node.fourthTabs.length) {
6545
6563
  this.tabs = node.fourthTabs;
6546
- this.tabsId = _tab.id;
6547
- this.navIds = this.getId(this.menus, _tab.url, true);
6564
+ this.tabsId = this.tabs[0].id;
6565
+ this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
6566
+ this.navIds = this.getId(this.menus, this.tabs[0].url, true);
6567
+ }
6568
+ }
6569
+ } else if (this.setFirstAsDefault) {
6570
+ this.tabs = [];
6571
+ var _subNode3 = this.getFirst(node);
6572
+ if (_subNode3) {
6573
+ if (this.biserial) {
6574
+ this.$set(this.active, 1, _subNode3.id);
6548
6575
  } else {
6549
- this.navIds = this.getId(this.menus, node.url, true);
6576
+ this.active = _subNode3.id;
6550
6577
  }
6578
+ this.navIds = this.getId(this.menus, _subNode3.url, true);
6551
6579
  }
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
6580
  }
6558
6581
  break;
6559
6582
  case 'tabs':
@@ -6772,17 +6795,12 @@ var log = util["a" /* default */].getParams('console');
6772
6795
  }
6773
6796
  }
6774
6797
  } 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
- }
6798
+ if (menus.fourthTabs && menus.fourthTabs.length && menus.id === id) {
6799
+ return menus;
6782
6800
  }
6783
6801
  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);
6802
+ for (var _i = 0; _i < menus.children.length; _i++) {
6803
+ var _fourth = this.getFourthTabs(menus.children[_i], id);
6786
6804
  if (_fourth) {
6787
6805
  return _fourth;
6788
6806
  }
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=57ae81a0&
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=57ae81a0&
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() {
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"] = ({