eoss-ui 0.4.64 → 0.4.65

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 +23 -17
  2. package/lib/button.js +25 -19
  3. package/lib/checkbox-group.js +23 -17
  4. package/lib/data-table-form.js +23 -17
  5. package/lib/data-table.js +23 -17
  6. package/lib/date-picker.js +23 -17
  7. package/lib/dialog.js +26 -20
  8. package/lib/eoss-ui.common.js +412 -379
  9. package/lib/flow-group.js +23 -17
  10. package/lib/flow-list.js +23 -17
  11. package/lib/flow.js +23 -17
  12. package/lib/form.js +25 -20
  13. package/lib/handle-user.js +23 -17
  14. package/lib/handler.js +23 -17
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +23 -17
  17. package/lib/input.js +23 -17
  18. package/lib/login.js +23 -17
  19. package/lib/main.js +26 -19
  20. package/lib/nav.js +23 -17
  21. package/lib/page.js +23 -17
  22. package/lib/player.js +23 -17
  23. package/lib/qr-code.js +23 -17
  24. package/lib/radio-group.js +23 -17
  25. package/lib/retrial-auth.js +23 -17
  26. package/lib/select-ganged.js +23 -17
  27. package/lib/select.js +25 -18
  28. package/lib/selector-panel.js +23 -17
  29. package/lib/selector.js +23 -17
  30. package/lib/sizer.js +23 -17
  31. package/lib/steps.js +23 -17
  32. package/lib/switch.js +23 -17
  33. package/lib/table-form.js +23 -17
  34. package/lib/tabs.js +23 -17
  35. package/lib/tips.js +23 -17
  36. package/lib/tree-group.js +26 -20
  37. package/lib/tree.js +23 -17
  38. package/lib/upload.js +374 -342
  39. package/lib/utils/util.js +23 -17
  40. package/lib/wujie.js +23 -17
  41. package/lib/wxlogin.js +23 -17
  42. package/package.json +1 -1
  43. package/packages/button/src/main.vue +2 -2
  44. package/packages/dialog/src/main.vue +1 -1
  45. package/packages/form/src/main.vue +0 -1
  46. package/packages/main/src/main.vue +1 -0
  47. package/packages/select/src/main.vue +2 -1
  48. package/packages/tree-group/src/main.vue +1 -1
  49. package/packages/upload/src/main.vue +10 -1
  50. package/src/index.js +1 -1
  51. package/src/utils/util.js +22 -18
package/lib/switch.js CHANGED
@@ -2087,19 +2087,16 @@ var startWith = function startWith(value, reg) {
2087
2087
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2088
2088
 
2089
2089
  if (Array.isArray(reg)) {
2090
- var flag = true;
2091
- for (var i = 0; i < reg.length; i++) {
2092
- var item = reg[i];
2093
- if (new RegExp('^' + item).test(value)) {
2094
- if (or) {
2095
- flag = true;
2096
- return true;
2097
- }
2098
- } else {
2099
- flag = false;
2100
- }
2090
+ if (!reg.length) {
2091
+ return true;
2101
2092
  }
2102
- return flag;
2093
+ var regs = reg.map(function (item) {
2094
+ return new RegExp('^' + item).test(value);
2095
+ });
2096
+ if (or) {
2097
+ return regs.indexOf(true) > -1;
2098
+ }
2099
+ return regs.indexOf(false) === -1;
2103
2100
  }
2104
2101
  if (new RegExp('^' + reg).test(value)) {
2105
2102
  return true;
@@ -2284,9 +2281,10 @@ var watermark = function watermark(option) {
2284
2281
  html: '水印示例', // 水印文本内容
2285
2282
  angle: -15, // 旋转角度
2286
2283
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2289
- lineHeight: 20, // 水印行高
2284
+ width: '', // 水印宽度
2285
+ minWidth: 300, // 水印最小宽度
2286
+ height: 120, // 水印高度
2287
+ lineHeight: 120, // 水印行高
2290
2288
  opacity: 0.1, // 水印透明度
2291
2289
  fontSize: 14, // 水印文字字体大小
2292
2290
  fontWeight: 400, // 水印字体粗细
@@ -2295,7 +2293,13 @@ var watermark = function watermark(option) {
2295
2293
  zIndex: 999999 // 水印文字的层级
2296
2294
  };
2297
2295
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2296
+ var wrap = document.getElementById('watermark');
2297
+ if (!wrap) {
2298
+ wrap = document.createElement('div');
2299
+ wrap.id = 'watermark';
2300
+ } else {
2301
+ wrap.innerHTML = '';
2302
+ }
2299
2303
  // 禁止选择和复制
2300
2304
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2305
  return false;
@@ -2306,6 +2310,8 @@ var watermark = function watermark(option) {
2306
2310
  html = options.html,
2307
2311
  angle = options.angle,
2308
2312
  color = options.color,
2313
+ width = options.width,
2314
+ minWidth = options.minWidth,
2309
2315
  height = options.height,
2310
2316
  lineHeight = options.lineHeight,
2311
2317
  opacity = options.opacity,
@@ -2321,7 +2327,7 @@ var watermark = function watermark(option) {
2321
2327
  for (var i = 0; i < num; i++) {
2322
2328
  var item = document.createElement('div');
2323
2329
  item.innerHTML = html;
2324
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;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
+ 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 + ';';
2325
2331
  docFrag.appendChild(item);
2326
2332
  }
2327
2333
  wrap.appendChild(docFrag);
package/lib/table-form.js CHANGED
@@ -2087,19 +2087,16 @@ var startWith = function startWith(value, reg) {
2087
2087
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2088
2088
 
2089
2089
  if (Array.isArray(reg)) {
2090
- var flag = true;
2091
- for (var i = 0; i < reg.length; i++) {
2092
- var item = reg[i];
2093
- if (new RegExp('^' + item).test(value)) {
2094
- if (or) {
2095
- flag = true;
2096
- return true;
2097
- }
2098
- } else {
2099
- flag = false;
2100
- }
2090
+ if (!reg.length) {
2091
+ return true;
2101
2092
  }
2102
- return flag;
2093
+ var regs = reg.map(function (item) {
2094
+ return new RegExp('^' + item).test(value);
2095
+ });
2096
+ if (or) {
2097
+ return regs.indexOf(true) > -1;
2098
+ }
2099
+ return regs.indexOf(false) === -1;
2103
2100
  }
2104
2101
  if (new RegExp('^' + reg).test(value)) {
2105
2102
  return true;
@@ -2284,9 +2281,10 @@ var watermark = function watermark(option) {
2284
2281
  html: '水印示例', // 水印文本内容
2285
2282
  angle: -15, // 旋转角度
2286
2283
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2289
- lineHeight: 20, // 水印行高
2284
+ width: '', // 水印宽度
2285
+ minWidth: 300, // 水印最小宽度
2286
+ height: 120, // 水印高度
2287
+ lineHeight: 120, // 水印行高
2290
2288
  opacity: 0.1, // 水印透明度
2291
2289
  fontSize: 14, // 水印文字字体大小
2292
2290
  fontWeight: 400, // 水印字体粗细
@@ -2295,7 +2293,13 @@ var watermark = function watermark(option) {
2295
2293
  zIndex: 999999 // 水印文字的层级
2296
2294
  };
2297
2295
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2296
+ var wrap = document.getElementById('watermark');
2297
+ if (!wrap) {
2298
+ wrap = document.createElement('div');
2299
+ wrap.id = 'watermark';
2300
+ } else {
2301
+ wrap.innerHTML = '';
2302
+ }
2299
2303
  // 禁止选择和复制
2300
2304
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2305
  return false;
@@ -2306,6 +2310,8 @@ var watermark = function watermark(option) {
2306
2310
  html = options.html,
2307
2311
  angle = options.angle,
2308
2312
  color = options.color,
2313
+ width = options.width,
2314
+ minWidth = options.minWidth,
2309
2315
  height = options.height,
2310
2316
  lineHeight = options.lineHeight,
2311
2317
  opacity = options.opacity,
@@ -2321,7 +2327,7 @@ var watermark = function watermark(option) {
2321
2327
  for (var i = 0; i < num; i++) {
2322
2328
  var item = document.createElement('div');
2323
2329
  item.innerHTML = html;
2324
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;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
+ 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 + ';';
2325
2331
  docFrag.appendChild(item);
2326
2332
  }
2327
2333
  wrap.appendChild(docFrag);
package/lib/tabs.js CHANGED
@@ -2087,19 +2087,16 @@ var startWith = function startWith(value, reg) {
2087
2087
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2088
2088
 
2089
2089
  if (Array.isArray(reg)) {
2090
- var flag = true;
2091
- for (var i = 0; i < reg.length; i++) {
2092
- var item = reg[i];
2093
- if (new RegExp('^' + item).test(value)) {
2094
- if (or) {
2095
- flag = true;
2096
- return true;
2097
- }
2098
- } else {
2099
- flag = false;
2100
- }
2090
+ if (!reg.length) {
2091
+ return true;
2101
2092
  }
2102
- return flag;
2093
+ var regs = reg.map(function (item) {
2094
+ return new RegExp('^' + item).test(value);
2095
+ });
2096
+ if (or) {
2097
+ return regs.indexOf(true) > -1;
2098
+ }
2099
+ return regs.indexOf(false) === -1;
2103
2100
  }
2104
2101
  if (new RegExp('^' + reg).test(value)) {
2105
2102
  return true;
@@ -2284,9 +2281,10 @@ var watermark = function watermark(option) {
2284
2281
  html: '水印示例', // 水印文本内容
2285
2282
  angle: -15, // 旋转角度
2286
2283
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2289
- lineHeight: 20, // 水印行高
2284
+ width: '', // 水印宽度
2285
+ minWidth: 300, // 水印最小宽度
2286
+ height: 120, // 水印高度
2287
+ lineHeight: 120, // 水印行高
2290
2288
  opacity: 0.1, // 水印透明度
2291
2289
  fontSize: 14, // 水印文字字体大小
2292
2290
  fontWeight: 400, // 水印字体粗细
@@ -2295,7 +2293,13 @@ var watermark = function watermark(option) {
2295
2293
  zIndex: 999999 // 水印文字的层级
2296
2294
  };
2297
2295
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2296
+ var wrap = document.getElementById('watermark');
2297
+ if (!wrap) {
2298
+ wrap = document.createElement('div');
2299
+ wrap.id = 'watermark';
2300
+ } else {
2301
+ wrap.innerHTML = '';
2302
+ }
2299
2303
  // 禁止选择和复制
2300
2304
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2305
  return false;
@@ -2306,6 +2310,8 @@ var watermark = function watermark(option) {
2306
2310
  html = options.html,
2307
2311
  angle = options.angle,
2308
2312
  color = options.color,
2313
+ width = options.width,
2314
+ minWidth = options.minWidth,
2309
2315
  height = options.height,
2310
2316
  lineHeight = options.lineHeight,
2311
2317
  opacity = options.opacity,
@@ -2321,7 +2327,7 @@ var watermark = function watermark(option) {
2321
2327
  for (var i = 0; i < num; i++) {
2322
2328
  var item = document.createElement('div');
2323
2329
  item.innerHTML = html;
2324
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;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
+ 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 + ';';
2325
2331
  docFrag.appendChild(item);
2326
2332
  }
2327
2333
  wrap.appendChild(docFrag);
package/lib/tips.js CHANGED
@@ -2087,19 +2087,16 @@ var startWith = function startWith(value, reg) {
2087
2087
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2088
2088
 
2089
2089
  if (Array.isArray(reg)) {
2090
- var flag = true;
2091
- for (var i = 0; i < reg.length; i++) {
2092
- var item = reg[i];
2093
- if (new RegExp('^' + item).test(value)) {
2094
- if (or) {
2095
- flag = true;
2096
- return true;
2097
- }
2098
- } else {
2099
- flag = false;
2100
- }
2090
+ if (!reg.length) {
2091
+ return true;
2101
2092
  }
2102
- return flag;
2093
+ var regs = reg.map(function (item) {
2094
+ return new RegExp('^' + item).test(value);
2095
+ });
2096
+ if (or) {
2097
+ return regs.indexOf(true) > -1;
2098
+ }
2099
+ return regs.indexOf(false) === -1;
2103
2100
  }
2104
2101
  if (new RegExp('^' + reg).test(value)) {
2105
2102
  return true;
@@ -2284,9 +2281,10 @@ var watermark = function watermark(option) {
2284
2281
  html: '水印示例', // 水印文本内容
2285
2282
  angle: -15, // 旋转角度
2286
2283
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2289
- lineHeight: 20, // 水印行高
2284
+ width: '', // 水印宽度
2285
+ minWidth: 300, // 水印最小宽度
2286
+ height: 120, // 水印高度
2287
+ lineHeight: 120, // 水印行高
2290
2288
  opacity: 0.1, // 水印透明度
2291
2289
  fontSize: 14, // 水印文字字体大小
2292
2290
  fontWeight: 400, // 水印字体粗细
@@ -2295,7 +2293,13 @@ var watermark = function watermark(option) {
2295
2293
  zIndex: 999999 // 水印文字的层级
2296
2294
  };
2297
2295
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2296
+ var wrap = document.getElementById('watermark');
2297
+ if (!wrap) {
2298
+ wrap = document.createElement('div');
2299
+ wrap.id = 'watermark';
2300
+ } else {
2301
+ wrap.innerHTML = '';
2302
+ }
2299
2303
  // 禁止选择和复制
2300
2304
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2305
  return false;
@@ -2306,6 +2310,8 @@ var watermark = function watermark(option) {
2306
2310
  html = options.html,
2307
2311
  angle = options.angle,
2308
2312
  color = options.color,
2313
+ width = options.width,
2314
+ minWidth = options.minWidth,
2309
2315
  height = options.height,
2310
2316
  lineHeight = options.lineHeight,
2311
2317
  opacity = options.opacity,
@@ -2321,7 +2327,7 @@ var watermark = function watermark(option) {
2321
2327
  for (var i = 0; i < num; i++) {
2322
2328
  var item = document.createElement('div');
2323
2329
  item.innerHTML = html;
2324
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;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
+ 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 + ';';
2325
2331
  docFrag.appendChild(item);
2326
2332
  }
2327
2333
  wrap.appendChild(docFrag);
package/lib/tree-group.js CHANGED
@@ -2087,19 +2087,16 @@ var startWith = function startWith(value, reg) {
2087
2087
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2088
2088
 
2089
2089
  if (Array.isArray(reg)) {
2090
- var flag = true;
2091
- for (var i = 0; i < reg.length; i++) {
2092
- var item = reg[i];
2093
- if (new RegExp('^' + item).test(value)) {
2094
- if (or) {
2095
- flag = true;
2096
- return true;
2097
- }
2098
- } else {
2099
- flag = false;
2100
- }
2090
+ if (!reg.length) {
2091
+ return true;
2101
2092
  }
2102
- return flag;
2093
+ var regs = reg.map(function (item) {
2094
+ return new RegExp('^' + item).test(value);
2095
+ });
2096
+ if (or) {
2097
+ return regs.indexOf(true) > -1;
2098
+ }
2099
+ return regs.indexOf(false) === -1;
2103
2100
  }
2104
2101
  if (new RegExp('^' + reg).test(value)) {
2105
2102
  return true;
@@ -2284,9 +2281,10 @@ var watermark = function watermark(option) {
2284
2281
  html: '水印示例', // 水印文本内容
2285
2282
  angle: -15, // 旋转角度
2286
2283
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2289
- lineHeight: 20, // 水印行高
2284
+ width: '', // 水印宽度
2285
+ minWidth: 300, // 水印最小宽度
2286
+ height: 120, // 水印高度
2287
+ lineHeight: 120, // 水印行高
2290
2288
  opacity: 0.1, // 水印透明度
2291
2289
  fontSize: 14, // 水印文字字体大小
2292
2290
  fontWeight: 400, // 水印字体粗细
@@ -2295,7 +2293,13 @@ var watermark = function watermark(option) {
2295
2293
  zIndex: 999999 // 水印文字的层级
2296
2294
  };
2297
2295
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2296
+ var wrap = document.getElementById('watermark');
2297
+ if (!wrap) {
2298
+ wrap = document.createElement('div');
2299
+ wrap.id = 'watermark';
2300
+ } else {
2301
+ wrap.innerHTML = '';
2302
+ }
2299
2303
  // 禁止选择和复制
2300
2304
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2305
  return false;
@@ -2306,6 +2310,8 @@ var watermark = function watermark(option) {
2306
2310
  html = options.html,
2307
2311
  angle = options.angle,
2308
2312
  color = options.color,
2313
+ width = options.width,
2314
+ minWidth = options.minWidth,
2309
2315
  height = options.height,
2310
2316
  lineHeight = options.lineHeight,
2311
2317
  opacity = options.opacity,
@@ -2321,7 +2327,7 @@ var watermark = function watermark(option) {
2321
2327
  for (var i = 0; i < num; i++) {
2322
2328
  var item = document.createElement('div');
2323
2329
  item.innerHTML = html;
2324
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;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
+ 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 + ';';
2325
2331
  docFrag.appendChild(item);
2326
2332
  }
2327
2333
  wrap.appendChild(docFrag);
@@ -2871,7 +2877,7 @@ module.exports = require("json-bigint");
2871
2877
  // ESM COMPAT FLAG
2872
2878
  __webpack_require__.r(__webpack_exports__);
2873
2879
 
2874
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=04a8be9a&
2880
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=8d1a3b86&
2875
2881
  var render = function () {
2876
2882
  var _vm = this
2877
2883
  var _h = _vm.$createElement
@@ -3183,7 +3189,7 @@ var staticRenderFns = []
3183
3189
  render._withStripped = true
3184
3190
 
3185
3191
 
3186
- // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=04a8be9a&
3192
+ // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=8d1a3b86&
3187
3193
 
3188
3194
  // EXTERNAL MODULE: ./src/utils/util.js
3189
3195
  var util = __webpack_require__(0);
@@ -3562,7 +3568,7 @@ var util = __webpack_require__(0);
3562
3568
  }
3563
3569
  if (tree) {
3564
3570
  var ref = this.tabs && this.tabs.length ? this.tabs[Number(this.active)].ref ? this.tabs[Number(this.active)].ref : 'groupTree' + this.active : 'groupTree';
3565
- this.$refs[ref].getTreeData();
3571
+ this.$refs[ref] && this.$refs[ref].getTreeData();
3566
3572
  }
3567
3573
  },
3568
3574
 
package/lib/tree.js CHANGED
@@ -2087,19 +2087,16 @@ var startWith = function startWith(value, reg) {
2087
2087
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2088
2088
 
2089
2089
  if (Array.isArray(reg)) {
2090
- var flag = true;
2091
- for (var i = 0; i < reg.length; i++) {
2092
- var item = reg[i];
2093
- if (new RegExp('^' + item).test(value)) {
2094
- if (or) {
2095
- flag = true;
2096
- return true;
2097
- }
2098
- } else {
2099
- flag = false;
2100
- }
2090
+ if (!reg.length) {
2091
+ return true;
2101
2092
  }
2102
- return flag;
2093
+ var regs = reg.map(function (item) {
2094
+ return new RegExp('^' + item).test(value);
2095
+ });
2096
+ if (or) {
2097
+ return regs.indexOf(true) > -1;
2098
+ }
2099
+ return regs.indexOf(false) === -1;
2103
2100
  }
2104
2101
  if (new RegExp('^' + reg).test(value)) {
2105
2102
  return true;
@@ -2284,9 +2281,10 @@ var watermark = function watermark(option) {
2284
2281
  html: '水印示例', // 水印文本内容
2285
2282
  angle: -15, // 旋转角度
2286
2283
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2289
- lineHeight: 20, // 水印行高
2284
+ width: '', // 水印宽度
2285
+ minWidth: 300, // 水印最小宽度
2286
+ height: 120, // 水印高度
2287
+ lineHeight: 120, // 水印行高
2290
2288
  opacity: 0.1, // 水印透明度
2291
2289
  fontSize: 14, // 水印文字字体大小
2292
2290
  fontWeight: 400, // 水印字体粗细
@@ -2295,7 +2293,13 @@ var watermark = function watermark(option) {
2295
2293
  zIndex: 999999 // 水印文字的层级
2296
2294
  };
2297
2295
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2296
+ var wrap = document.getElementById('watermark');
2297
+ if (!wrap) {
2298
+ wrap = document.createElement('div');
2299
+ wrap.id = 'watermark';
2300
+ } else {
2301
+ wrap.innerHTML = '';
2302
+ }
2299
2303
  // 禁止选择和复制
2300
2304
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2305
  return false;
@@ -2306,6 +2310,8 @@ var watermark = function watermark(option) {
2306
2310
  html = options.html,
2307
2311
  angle = options.angle,
2308
2312
  color = options.color,
2313
+ width = options.width,
2314
+ minWidth = options.minWidth,
2309
2315
  height = options.height,
2310
2316
  lineHeight = options.lineHeight,
2311
2317
  opacity = options.opacity,
@@ -2321,7 +2327,7 @@ var watermark = function watermark(option) {
2321
2327
  for (var i = 0; i < num; i++) {
2322
2328
  var item = document.createElement('div');
2323
2329
  item.innerHTML = html;
2324
- item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;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
+ 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 + ';';
2325
2331
  docFrag.appendChild(item);
2326
2332
  }
2327
2333
  wrap.appendChild(docFrag);