eoss-ui 0.4.64 → 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 (56) hide show
  1. package/lib/button-group.js +33 -18
  2. package/lib/button.js +35 -20
  3. package/lib/checkbox-group.js +33 -18
  4. package/lib/data-table-form.js +33 -18
  5. package/lib/data-table.js +33 -18
  6. package/lib/date-picker.js +33 -18
  7. package/lib/dialog.js +36 -21
  8. package/lib/eoss-ui.common.js +7036 -6505
  9. package/lib/flow-group.js +33 -18
  10. package/lib/flow-list.js +33 -18
  11. package/lib/flow.js +38 -22
  12. package/lib/form.js +8659 -8284
  13. package/lib/handle-user.js +33 -18
  14. package/lib/handler.js +33 -18
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +33 -18
  17. package/lib/input.js +53 -25
  18. package/lib/login.js +38 -25
  19. package/lib/main.js +95 -70
  20. package/lib/nav.js +36 -21
  21. package/lib/page.js +33 -18
  22. package/lib/player.js +33 -18
  23. package/lib/qr-code.js +33 -18
  24. package/lib/radio-group.js +33 -18
  25. package/lib/retrial-auth.js +33 -18
  26. package/lib/select-ganged.js +33 -18
  27. package/lib/select.js +35 -19
  28. package/lib/selector-panel.js +33 -18
  29. package/lib/selector.js +33 -18
  30. package/lib/sizer.js +33 -18
  31. package/lib/steps.js +33 -18
  32. package/lib/switch.js +33 -18
  33. package/lib/table-form.js +1336 -1214
  34. package/lib/tabs.js +33 -18
  35. package/lib/tips.js +33 -18
  36. package/lib/tree-group.js +36 -21
  37. package/lib/tree.js +33 -18
  38. package/lib/upload.js +384 -343
  39. package/lib/utils/util.js +33 -18
  40. package/lib/wujie.js +33 -18
  41. package/lib/wxlogin.js +33 -18
  42. package/package.json +2 -2
  43. package/packages/button/src/main.vue +2 -2
  44. package/packages/dialog/src/main.vue +1 -1
  45. package/packages/flow/src/main.vue +6 -5
  46. package/packages/form/src/main.vue +1435 -1314
  47. package/packages/form/src/table.vue +375 -318
  48. package/packages/input/src/main.vue +20 -7
  49. package/packages/login/src/main.vue +3 -5
  50. package/packages/main/src/main.vue +61 -54
  51. package/packages/nav/src/main.vue +1 -1
  52. package/packages/select/src/main.vue +2 -1
  53. package/packages/tree-group/src/main.vue +1 -1
  54. package/packages/upload/src/main.vue +10 -1
  55. package/src/index.js +1 -1
  56. package/src/utils/util.js +33 -19
package/lib/utils/util.js CHANGED
@@ -2002,19 +2002,16 @@ var startWith = function startWith(value, reg) {
2002
2002
  var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2003
2003
 
2004
2004
  if (Array.isArray(reg)) {
2005
- var flag = true;
2006
- for (var i = 0; i < reg.length; i++) {
2007
- var item = reg[i];
2008
- if (new RegExp('^' + item).test(value)) {
2009
- if (or) {
2010
- flag = true;
2011
- return true;
2012
- }
2013
- } else {
2014
- flag = false;
2015
- }
2005
+ if (!reg.length) {
2006
+ return true;
2016
2007
  }
2017
- return flag;
2008
+ var regs = reg.map(function (item) {
2009
+ return new RegExp('^' + item).test(value);
2010
+ });
2011
+ if (or) {
2012
+ return regs.indexOf(true) > -1;
2013
+ }
2014
+ return regs.indexOf(false) === -1;
2018
2015
  }
2019
2016
  if (new RegExp('^' + reg).test(value)) {
2020
2017
  return true;
@@ -2193,14 +2190,18 @@ var uuid = function uuid(len) {
2193
2190
  **/
2194
2191
  var watermark = function watermark(option) {
2195
2192
  // 默认设置
2193
+ var _width = parseInt(option.width || 480, 10);
2194
+ var _height = parseInt(option.width || 180, 10);
2195
+ var _rows = Math.round(document.body.clientHeight / _height);
2196
+ var _cols = Math.round(document.body.clientWidth / _width);
2196
2197
  var config = {
2197
- rows: 5, // 水印行数
2198
- cols: 5,
2198
+ rows: _rows, // 水印行数
2199
+ cols: _cols,
2199
2200
  html: '水印示例', // 水印文本内容
2200
2201
  angle: -15, // 旋转角度
2201
2202
  color: '#000', // 水印文字颜色
2202
- width: 100, // 水印宽度
2203
- height: 20, // 水印高度
2203
+ minWidth: _width, // 水印最小宽度
2204
+ height: _height, // 水印高度
2204
2205
  lineHeight: 20, // 水印行高
2205
2206
  opacity: 0.1, // 水印透明度
2206
2207
  fontSize: 14, // 水印文字字体大小
@@ -2210,7 +2211,13 @@ var watermark = function watermark(option) {
2210
2211
  zIndex: 999999 // 水印文字的层级
2211
2212
  };
2212
2213
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2213
- var wrap = document.createElement('div');
2214
+ var wrap = document.getElementById('watermark');
2215
+ if (!wrap) {
2216
+ wrap = document.createElement('div');
2217
+ wrap.id = 'watermark';
2218
+ } else {
2219
+ wrap.innerHTML = '';
2220
+ }
2214
2221
  // 禁止选择和复制
2215
2222
  wrap.onselectstart = wrap.oncontextmenu = function () {
2216
2223
  return false;
@@ -2221,6 +2228,7 @@ var watermark = function watermark(option) {
2221
2228
  html = options.html,
2222
2229
  angle = options.angle,
2223
2230
  color = options.color,
2231
+ minWidth = options.minWidth,
2224
2232
  height = options.height,
2225
2233
  lineHeight = options.lineHeight,
2226
2234
  opacity = options.opacity,
@@ -2236,11 +2244,18 @@ var watermark = function watermark(option) {
2236
2244
  for (var i = 0; i < num; i++) {
2237
2245
  var item = document.createElement('div');
2238
2246
  item.innerHTML = html;
2239
- 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 + ';';
2247
+ 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 + ';';
2240
2248
  docFrag.appendChild(item);
2241
2249
  }
2242
2250
  wrap.appendChild(docFrag);
2243
2251
  document.body.appendChild(wrap);
2252
+ var _timeout = void 0;
2253
+ window.onresize = function () {
2254
+ clearTimeout(_timeout);
2255
+ _timeout = setTimeout(function () {
2256
+ watermark(options);
2257
+ }, 1000);
2258
+ };
2244
2259
  };
2245
2260
 
2246
2261
  exports.default = {
package/lib/wujie.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;
@@ -2278,14 +2275,18 @@ var uuid = function uuid(len) {
2278
2275
  **/
2279
2276
  var watermark = function watermark(option) {
2280
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);
2281
2282
  var config = {
2282
- rows: 5, // 水印行数
2283
- cols: 5,
2283
+ rows: _rows, // 水印行数
2284
+ cols: _cols,
2284
2285
  html: '水印示例', // 水印文本内容
2285
2286
  angle: -15, // 旋转角度
2286
2287
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2288
+ minWidth: _width, // 水印最小宽度
2289
+ height: _height, // 水印高度
2289
2290
  lineHeight: 20, // 水印行高
2290
2291
  opacity: 0.1, // 水印透明度
2291
2292
  fontSize: 14, // 水印文字字体大小
@@ -2295,7 +2296,13 @@ var watermark = function watermark(option) {
2295
2296
  zIndex: 999999 // 水印文字的层级
2296
2297
  };
2297
2298
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2299
+ var wrap = document.getElementById('watermark');
2300
+ if (!wrap) {
2301
+ wrap = document.createElement('div');
2302
+ wrap.id = 'watermark';
2303
+ } else {
2304
+ wrap.innerHTML = '';
2305
+ }
2299
2306
  // 禁止选择和复制
2300
2307
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2308
  return false;
@@ -2306,6 +2313,7 @@ var watermark = function watermark(option) {
2306
2313
  html = options.html,
2307
2314
  angle = options.angle,
2308
2315
  color = options.color,
2316
+ minWidth = options.minWidth,
2309
2317
  height = options.height,
2310
2318
  lineHeight = options.lineHeight,
2311
2319
  opacity = options.opacity,
@@ -2321,11 +2329,18 @@ var watermark = function watermark(option) {
2321
2329
  for (var i = 0; i < num; i++) {
2322
2330
  var item = document.createElement('div');
2323
2331
  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 + ';';
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 + ';';
2325
2333
  docFrag.appendChild(item);
2326
2334
  }
2327
2335
  wrap.appendChild(docFrag);
2328
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
+ };
2329
2344
  };
2330
2345
 
2331
2346
  /* harmony default export */ __webpack_exports__["a"] = ({
package/lib/wxlogin.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;
@@ -2278,14 +2275,18 @@ var uuid = function uuid(len) {
2278
2275
  **/
2279
2276
  var watermark = function watermark(option) {
2280
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);
2281
2282
  var config = {
2282
- rows: 5, // 水印行数
2283
- cols: 5,
2283
+ rows: _rows, // 水印行数
2284
+ cols: _cols,
2284
2285
  html: '水印示例', // 水印文本内容
2285
2286
  angle: -15, // 旋转角度
2286
2287
  color: '#000', // 水印文字颜色
2287
- width: 100, // 水印宽度
2288
- height: 20, // 水印高度
2288
+ minWidth: _width, // 水印最小宽度
2289
+ height: _height, // 水印高度
2289
2290
  lineHeight: 20, // 水印行高
2290
2291
  opacity: 0.1, // 水印透明度
2291
2292
  fontSize: 14, // 水印文字字体大小
@@ -2295,7 +2296,13 @@ var watermark = function watermark(option) {
2295
2296
  zIndex: 999999 // 水印文字的层级
2296
2297
  };
2297
2298
  var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2298
- var wrap = document.createElement('div');
2299
+ var wrap = document.getElementById('watermark');
2300
+ if (!wrap) {
2301
+ wrap = document.createElement('div');
2302
+ wrap.id = 'watermark';
2303
+ } else {
2304
+ wrap.innerHTML = '';
2305
+ }
2299
2306
  // 禁止选择和复制
2300
2307
  wrap.onselectstart = wrap.oncontextmenu = function () {
2301
2308
  return false;
@@ -2306,6 +2313,7 @@ var watermark = function watermark(option) {
2306
2313
  html = options.html,
2307
2314
  angle = options.angle,
2308
2315
  color = options.color,
2316
+ minWidth = options.minWidth,
2309
2317
  height = options.height,
2310
2318
  lineHeight = options.lineHeight,
2311
2319
  opacity = options.opacity,
@@ -2321,11 +2329,18 @@ var watermark = function watermark(option) {
2321
2329
  for (var i = 0; i < num; i++) {
2322
2330
  var item = document.createElement('div');
2323
2331
  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 + ';';
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 + ';';
2325
2333
  docFrag.appendChild(item);
2326
2334
  }
2327
2335
  wrap.appendChild(docFrag);
2328
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
+ };
2329
2344
  };
2330
2345
 
2331
2346
  /* harmony default export */ __webpack_exports__["a"] = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.64",
3
+ "version": "0.4.66",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -93,7 +93,7 @@
93
93
  "cp-cli": "^1.0.2",
94
94
  "cross-env": "^3.1.3",
95
95
  "css-loader": "^2.1.0",
96
- "eoss-element": "^0.2.68",
96
+ "eoss-element": "^0.2.69",
97
97
  "es6-promise": "^4.0.5",
98
98
  "eslint": "4.18.2",
99
99
  "eslint-config-elemefe": "0.1.1",
@@ -233,8 +233,8 @@ export default {
233
233
  },
234
234
  render(h) {
235
235
  let useCaseCodes = util.getStorage('useCaseCodes');
236
- if (!this.btnGroup && useCaseCodes && this.useCaseCode) {
237
- if (useCaseCodes.indexOf(item.useCaseCode) == -1) {
236
+ if (useCaseCodes && this.useCaseCode) {
237
+ if (useCaseCodes.indexOf(this.useCaseCode) == -1) {
238
238
  return false;
239
239
  }
240
240
  }
@@ -447,7 +447,7 @@ export default {
447
447
  }
448
448
  },
449
449
  handleClose(reload = true) {
450
- this.$refs[this.wujieName].hide();
450
+ this.$refs[this.wujieName] && this.$refs[this.wujieName].hide();
451
451
  if (this.isReload !== false && reload !== 0 && reload !== false) {
452
452
  for (let i = 0; i < this.$parent.$children.length; i++) {
453
453
  let item = this.$parent.$children[i];
@@ -1011,7 +1011,7 @@ export default {
1011
1011
  }
1012
1012
  },
1013
1013
  setShrink() {
1014
- this.shrink = !this.shrink
1014
+ this.shrink = !this.shrink;
1015
1015
  this.$emit('shrink', this.shrink);
1016
1016
  },
1017
1017
  customLoading(type) {
@@ -1708,13 +1708,14 @@ export default {
1708
1708
  this.nextNode.isReturnRejectNode = 0;
1709
1709
  this.nextNode.isSerialSubmit = 0;
1710
1710
  this.nodeInfos = [];
1711
- this.operationList.map((item) => {
1711
+ this.operationList.forEach((item) => {
1712
1712
  if (item.key === val) {
1713
1713
  if (!item.taskNodeList) {
1714
1714
  this.nodeInfos = [];
1715
1715
  } else {
1716
1716
  this.nodeInfos = item.taskNodeList;
1717
1717
  }
1718
+ return;
1718
1719
  }
1719
1720
  });
1720
1721
  if (this.defaultNextNode) {
@@ -1865,8 +1866,8 @@ export default {
1865
1866
  }
1866
1867
  } = res;
1867
1868
  this.$emit('startTaskRead', res);
1868
- this.currentOrgName = currentOrgName
1869
- this.otherOrgName = otherOrgName
1869
+ this.currentOrgName = currentOrgName;
1870
+ this.otherOrgName = otherOrgName;
1870
1871
  this.endFlowInfo.choiceOrgId = choiceOrgId;
1871
1872
  this.endFlowInfo.choiceDeptId = choiceDeptId;
1872
1873
  this.endFlowInfo.pendingId = this.pendingId;
@@ -1874,7 +1875,7 @@ export default {
1874
1875
  this.endFlowInfo.pOrgId = pOrgId;
1875
1876
  this.canPresetRead = canPresetRead;
1876
1877
  this.isCdjxjTaskHandle = isCdjxjTaskHandle;
1877
- this.operationList = taskOperations;
1878
+ this.operationList = taskOperations || [];
1878
1879
  this.customPresetHintMessage = customPresetHintMessage;
1879
1880
  if (canPresetRead) {
1880
1881
  let ids =