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/player.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"] = ({
@@ -2737,7 +2746,7 @@ var formContents = '/config/admin/online/onlineForm/render';
2737
2746
 
2738
2747
  /***/ }),
2739
2748
 
2740
- /***/ 14:
2749
+ /***/ 15:
2741
2750
  /***/ (function(module, exports) {
2742
2751
 
2743
2752
  module.exports = require("video.js");
@@ -2912,7 +2921,7 @@ render._withStripped = true
2912
2921
  // CONCATENATED MODULE: ./packages/player/src/main.vue?vue&type=template&id=29c1659e&
2913
2922
 
2914
2923
  // EXTERNAL MODULE: external "video.js"
2915
- var external_video_js_ = __webpack_require__(14);
2924
+ var external_video_js_ = __webpack_require__(15);
2916
2925
  var external_video_js_default = /*#__PURE__*/__webpack_require__.n(external_video_js_);
2917
2926
 
2918
2927
  // EXTERNAL MODULE: external "video.js/dist/lang/zh-CN.json"
package/lib/qr-code.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"] = ({
@@ -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"] = ({
@@ -2870,7 +2879,7 @@ module.exports = require("axios");
2870
2879
  // ESM COMPAT FLAG
2871
2880
  __webpack_require__.r(__webpack_exports__);
2872
2881
 
2873
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio-group/src/main.vue?vue&type=template&id=34723cb0&
2882
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio-group/src/main.vue?vue&type=template&id=64807cce&
2874
2883
  var render = function () {
2875
2884
  var _vm = this
2876
2885
  var _h = _vm.$createElement
@@ -3003,7 +3012,7 @@ var staticRenderFns = []
3003
3012
  render._withStripped = true
3004
3013
 
3005
3014
 
3006
- // CONCATENATED MODULE: ./packages/radio-group/src/main.vue?vue&type=template&id=34723cb0&
3015
+ // CONCATENATED MODULE: ./packages/radio-group/src/main.vue?vue&type=template&id=64807cce&
3007
3016
 
3008
3017
  // EXTERNAL MODULE: ./src/config/api.js
3009
3018
  var api = __webpack_require__(1);
@@ -3081,6 +3090,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3081
3090
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
3082
3091
  name: 'EsRadioGroup',
3083
3092
  inheritAttrs: false,
3093
+ inject: {
3094
+ esForm: {
3095
+ default: ''
3096
+ },
3097
+ sysCodes: {
3098
+ default: ''
3099
+ }
3100
+ },
3084
3101
  props: {
3085
3102
  method: {
3086
3103
  type: String,
@@ -3142,11 +3159,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3142
3159
  isNoParamRequest: {
3143
3160
  type: Boolean,
3144
3161
  default: true
3145
- }
3162
+ },
3163
+ dataKey: String
3146
3164
  },
3147
3165
  data: function data() {
3148
3166
  return {
3149
- options: null
3167
+ options: null,
3168
+ canceled: false
3150
3169
  };
3151
3170
  },
3152
3171
 
@@ -3235,6 +3254,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3235
3254
  handler: function handler() {
3236
3255
  this.url && this.getData(this.url);
3237
3256
  }
3257
+ },
3258
+ sysCodes: {
3259
+ deep: true,
3260
+ handler: function handler(val) {
3261
+ if (this.canceled && val && (this.sysCode && val[this.sysCode] || this.dataKey && val[this.dataKey])) {
3262
+ if (this.parseData) {
3263
+ this.options = this.parseData(JSON.parse(JSON.stringify(val[this.sysCode || this.dataKey])));
3264
+ } else {
3265
+ this.options = JSON.parse(JSON.stringify(val[this.sysCode || this.dataKey]));
3266
+ }
3267
+ }
3268
+ }
3238
3269
  }
3239
3270
  },
3240
3271
  created: function created() {},
@@ -3261,16 +3292,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3261
3292
  data: params
3262
3293
  }).then(function (res) {
3263
3294
  _this2.loading = false;
3295
+ _this2.canceled = false;
3264
3296
  if (res.rCode === 0) {
3265
3297
  _this2.options = JSON.parse(JSON.stringify(res.results));
3266
- if (sysCode) {
3298
+ if (sysCode || _this2.dataKey) {
3299
+ _this2.esForm && _this2.esForm.setSysCodes(sysCode || _this2.dataKey, JSON.parse(JSON.stringify(_this2.options)));
3267
3300
  store["a" /* default */].set(sysCode, JSON.parse(JSON.stringify(res.results)));
3268
3301
  }
3269
3302
  }
3270
3303
  }).catch(function (err) {
3271
3304
  _this2.loading = false;
3272
- if (err.message && err.message !== 'canceled') {
3273
- _this2.$message.error(err.message);
3305
+ if (err.message) {
3306
+ if (err.message !== 'canceled') {
3307
+ _this2.$message.error(err.message);
3308
+ }
3309
+ if (err.message === 'canceled' && sysCode) {
3310
+ _this2.canceled = true;
3311
+ }
3274
3312
  }
3275
3313
  });
3276
3314
  },
@@ -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"] = ({
@@ -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"] = ({
@@ -2901,6 +2910,14 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2901
2910
  };
2902
2911
  },
2903
2912
 
2913
+ inject: {
2914
+ esForm: {
2915
+ default: ''
2916
+ },
2917
+ sysCodes: {
2918
+ default: ''
2919
+ }
2920
+ },
2904
2921
  props: {
2905
2922
  method: {
2906
2923
  type: String,
@@ -2994,7 +3011,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2994
3011
  type: String,
2995
3012
  default: 'hasSub'
2996
3013
  },
2997
- defaultValue: Boolean
3014
+ defaultValue: Boolean,
3015
+ dataKey: String
2998
3016
  },
2999
3017
  data: function data() {
3000
3018
  return {
@@ -3006,7 +3024,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3006
3024
  wheres: [{}],
3007
3025
  first: true,
3008
3026
  height: undefined,
3009
- gangedNum: null
3027
+ gangedNum: null,
3028
+ canceled: false
3010
3029
  };
3011
3030
  },
3012
3031
 
@@ -3119,13 +3138,23 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3119
3138
  params: this.param,
3120
3139
  data: this.param
3121
3140
  }).then(function (res) {
3141
+ _this.canceled = false;
3122
3142
  if (res.rCode === 0) {
3123
3143
  _this.lists = res.results;
3124
3144
  _this.getChildren(_this.results, _this.values);
3145
+ if (sysCode || _this.dataKey) {
3146
+ _this.esForm && _this.esForm.setSysCodes(sysCode || _this.dataKey, JSON.parse(JSON.stringify(_this.lists)));
3147
+ store.set(sysCode, JSON.parse(JSON.stringify(_this.lists)));
3148
+ }
3125
3149
  }
3126
- }).catch(function (e) {
3127
- if (err.message && err.message !== 'canceled') {
3128
- _this.$message.error(err.message);
3150
+ }).catch(function (err) {
3151
+ if (err.message) {
3152
+ if (err.message !== 'canceled') {
3153
+ _this.$message.error(err.message);
3154
+ }
3155
+ if (err.message === 'canceled' && sysCode) {
3156
+ _this.canceled = true;
3157
+ }
3129
3158
  }
3130
3159
  });
3131
3160
  },
package/lib/select.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"] = ({
@@ -2737,6 +2746,13 @@ var formContents = '/config/admin/online/onlineForm/render';
2737
2746
 
2738
2747
  /***/ }),
2739
2748
 
2749
+ /***/ 14:
2750
+ /***/ (function(module, exports) {
2751
+
2752
+ module.exports = require("slate");
2753
+
2754
+ /***/ }),
2755
+
2740
2756
  /***/ 2:
2741
2757
  /***/ (function(module, exports) {
2742
2758
 
@@ -2893,6 +2909,9 @@ var store = __webpack_require__(8);
2893
2909
  // EXTERNAL MODULE: ./src/utils/util.js
2894
2910
  var util = __webpack_require__(0);
2895
2911
 
2912
+ // EXTERNAL MODULE: external "slate"
2913
+ var external_slate_ = __webpack_require__(14);
2914
+
2896
2915
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/main.vue?vue&type=script&lang=js&
2897
2916
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2898
2917
 
@@ -2901,6 +2920,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2901
2920
 
2902
2921
 
2903
2922
 
2923
+
2904
2924
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
2905
2925
  name: 'EsSelect',
2906
2926
  componentName: 'EsSelect',
@@ -2911,6 +2931,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2911
2931
  };
2912
2932
  },
2913
2933
 
2934
+ inject: {
2935
+ esForm: {
2936
+ default: ''
2937
+ },
2938
+ sysCodes: {
2939
+ default: ''
2940
+ }
2941
+ },
2914
2942
  props: {
2915
2943
  value: [String, Array, Object, Number],
2916
2944
  method: {
@@ -3019,7 +3047,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3019
3047
  isNoParamRequest: {
3020
3048
  type: Boolean,
3021
3049
  default: true
3022
- }
3050
+ },
3051
+ dataKey: String
3023
3052
  },
3024
3053
  data: function data() {
3025
3054
  return {
@@ -3027,7 +3056,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3027
3056
  options: '',
3028
3057
  valKey: this.valueKey,
3029
3058
  label: this.labelKey,
3030
- hidden: false
3059
+ hidden: false,
3060
+ canceled: false
3031
3061
  };
3032
3062
  },
3033
3063
 
@@ -3110,6 +3140,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3110
3140
  this.getData(this.sysCode);
3111
3141
  }
3112
3142
  }
3143
+ },
3144
+ sysCodes: {
3145
+ deep: true,
3146
+ handler: function handler(val) {
3147
+ if (this.canceled && val && (this.sysCode && val[this.sysCode] || this.dataKey && val[this.dataKey])) {
3148
+ if (this.parseData) {
3149
+ this.options = this.parseData(JSON.parse(JSON.stringify(val[this.sysCode || this.dataKey])));
3150
+ } else {
3151
+ this.options = JSON.parse(JSON.stringify(val[this.sysCode || this.dataKey]));
3152
+ }
3153
+ }
3154
+ }
3113
3155
  }
3114
3156
  },
3115
3157
  mounted: function mounted() {
@@ -3192,13 +3234,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3192
3234
  data: params
3193
3235
  }).then(function (res) {
3194
3236
  _this3.loading = false;
3237
+ _this3.canceled = false;
3195
3238
  if (res.rCode === 0) {
3196
3239
  if (_this3.parseData) {
3197
- _this3.options = _this3.parseData(res.results);
3240
+ _this3.options = _this3.parseData(JSON.parse(JSON.stringify(res.results)));
3198
3241
  } else {
3199
3242
  _this3.options = JSON.parse(JSON.stringify(res.results));
3200
3243
  }
3201
- if (sysCode) {
3244
+ if (sysCode || _this3.dataKey) {
3245
+ _this3.esForm && _this3.esForm.setSysCodes(sysCode || _this3.dataKey, JSON.parse(JSON.stringify(_this3.options)));
3202
3246
  store["a" /* default */].set(sysCode, JSON.parse(JSON.stringify(_this3.options)));
3203
3247
  }
3204
3248
  } else {
@@ -3206,16 +3250,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3206
3250
  }
3207
3251
  }).catch(function (err) {
3208
3252
  _this3.loading = false;
3209
- if (err.message && err.message !== 'canceled') {
3210
- _this3.$message.error(err.message);
3253
+ if (err.message) {
3254
+ if (err.message !== 'canceled') {
3255
+ _this3.$message.error(err.message);
3256
+ }
3257
+ if (err.message === 'canceled' && sysCode) {
3258
+ _this3.canceled = true;
3259
+ }
3211
3260
  }
3212
3261
  });
3213
3262
  },
3214
3263
  search: function search(query) {
3215
3264
  var _this4 = this;
3216
3265
 
3217
- if (query !== '') {
3218
- if (this.url !== '') {
3266
+ if (query && query !== '') {
3267
+ if (this.url && this.url !== '') {
3219
3268
  this.loading = true;
3220
3269
  var params = {};
3221
3270
  params[this.remoteKey] = query;
@@ -3228,13 +3277,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3228
3277
  }).then(function (res) {
3229
3278
  _this4.loading = false;
3230
3279
  if (res.rCode === 0) {
3231
- _this4.options = res.results.filter(function (item) {
3232
- if (item[_this4.label]) {
3233
- return item[_this4.label].toLowerCase().indexOf(query.toLowerCase()) > -1;
3234
- } else {
3235
- return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
3236
- }
3237
- });
3280
+ _this4.options = JSON.parse(JSON.stringify(res.results));
3238
3281
  }
3239
3282
  }).catch(function (err) {
3240
3283
  _this4.loading = false;
@@ -3349,6 +3392,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3349
3392
  this.onLoadsub({ data: data, params: params, node: node }).then(function (res) {
3350
3393
  _this6.loading = false;
3351
3394
  _this6.$set(data, 'children', JSON.parse(JSON.stringify(res)));
3395
+ if (_this6.dataKey && _this6.esForm) {
3396
+ _this6.esForm.setSysCodes(_this6.dataKey, JSON.parse(JSON.stringify(_this6.options)));
3397
+ }
3352
3398
  }).catch(function (e) {
3353
3399
  _this6.loading = false;
3354
3400
  });
@@ -3373,6 +3419,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3373
3419
  } else {
3374
3420
  console.error('tree数据格式错误');
3375
3421
  }
3422
+ if (_this6.dataKey && _this6.esForm) {
3423
+ _this6.esForm.setSysCodes(_this6.dataKey, JSON.parse(JSON.stringify(_this6.options)));
3424
+ }
3376
3425
  }
3377
3426
  }).catch(function (err) {
3378
3427
  _this6.loading = false;