eoss 0.1.0-alpha.44 → 0.1.0-alpha.46

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 (79) hide show
  1. package/lib/button-group.js +11 -9
  2. package/lib/button.js +5 -3
  3. package/lib/cascader.js +3 -3
  4. package/lib/color-picker.js +6 -3
  5. package/lib/data-table.js +60 -23
  6. package/lib/date-picker.js +5 -3
  7. package/lib/eoss.common.js +748 -332
  8. package/lib/flow.js +7 -9
  9. package/lib/form-editor.js +2 -3
  10. package/lib/index.js +1 -1
  11. package/lib/input-number.js +6 -2
  12. package/lib/input.js +148 -87
  13. package/lib/select.js +237 -15
  14. package/lib/selector.js +16 -4
  15. package/lib/switch.js +6 -3
  16. package/lib/table-column.js +49 -68
  17. package/lib/table.js +111 -90
  18. package/lib/tag.js +2 -0
  19. package/lib/theme-chalk/base.css +1 -1
  20. package/lib/theme-chalk/cascader.css +1 -1
  21. package/lib/theme-chalk/icons.css +1 -1
  22. package/lib/theme-chalk/index.css +1 -1
  23. package/lib/theme-chalk/main.css +1 -1
  24. package/lib/theme-chalk/pagination.css +1 -1
  25. package/lib/theme-chalk/select.css +1 -1
  26. package/lib/theme-chalk/table-column.css +1 -1
  27. package/lib/theme-chalk/table.css +1 -1
  28. package/lib/theme-chalk/tag.css +1 -1
  29. package/lib/time-picker.js +5 -3
  30. package/lib/time-select.js +5 -3
  31. package/lib/tree.js +17 -7
  32. package/lib/upload.js +85 -8
  33. package/package.json +1 -1
  34. package/packages/button/src/button-group.vue +9 -7
  35. package/packages/button/src/button.vue +7 -5
  36. package/packages/cascader/src/cascader.vue +1 -1
  37. package/packages/color-picker/src/color-picker.vue +4 -1
  38. package/packages/data-table/src/data-table.vue +32 -7
  39. package/packages/date-picker/src/picker.vue +3 -1
  40. package/packages/flow/src/selectUser.vue +12 -18
  41. package/packages/form-editor/src/form-editor.vue +0 -1
  42. package/packages/input/src/input.vue +94 -60
  43. package/packages/input-number/src/input-number.vue +5 -1
  44. package/packages/select/src/select.vue +208 -13
  45. package/packages/selector/src/selector.vue +10 -1
  46. package/packages/switch/src/switch.vue +4 -1
  47. package/packages/table/src/store/index.js +10 -1
  48. package/packages/table/src/table-column.js +7 -1
  49. package/packages/table/src/table-header.js +52 -7
  50. package/packages/table/src/util.js +35 -60
  51. package/packages/tag/src/tag.vue +2 -0
  52. package/packages/theme-chalk/src/base.scss +7 -0
  53. package/packages/theme-chalk/src/icons.scss +13 -1
  54. package/packages/theme-chalk/src/table.scss +18 -2
  55. package/packages/theme-chalk/src/tag.scss +303 -242
  56. package/packages/tree/src/tree.vue +13 -3
  57. package/packages/upload/src/index.vue +43 -8
  58. package/src/index.js +1 -1
  59. package/packages/flowOld/index.js +0 -7
  60. package/packages/flowOld/src/component/Circulate.vue +0 -464
  61. package/packages/flowOld/src/component/CustomPreset.vue +0 -343
  62. package/packages/flowOld/src/component/FileList.vue +0 -117
  63. package/packages/flowOld/src/component/FreeCirculation.vue +0 -278
  64. package/packages/flowOld/src/component/Preset.vue +0 -283
  65. package/packages/flowOld/src/component/SendMsg.vue +0 -309
  66. package/packages/flowOld/src/component/TimeLimit.vue +0 -223
  67. package/packages/flowOld/src/component/opinions-file.vue +0 -126
  68. package/packages/flowOld/src/component/opinions.vue +0 -429
  69. package/packages/flowOld/src/component/taskUnionExamine.vue +0 -832
  70. package/packages/flowOld/src/form.vue +0 -134
  71. package/packages/flowOld/src/freeStartFlow.vue +0 -2945
  72. package/packages/flowOld/src/main.vue +0 -4141
  73. package/packages/flowOld/src/processForm.vue +0 -1431
  74. package/packages/flowOld/src/processReject.vue +0 -338
  75. package/packages/flowOld/src/reset.vue +0 -964
  76. package/packages/flowOld/src/selectUser.vue +0 -520
  77. package/packages/flowOld/src/startTaskRead.vue +0 -737
  78. package/packages/flowOld/src/supervise.vue +0 -197
  79. package/packages/flowOld/src/table.vue +0 -71
@@ -101,7 +101,7 @@ module.exports = require("eoss/lib/button");
101
101
  // ESM COMPAT FLAG
102
102
  __webpack_require__.r(__webpack_exports__);
103
103
 
104
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=fcac0d6a&
104
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=68a3f6ee&
105
105
  var render = function () {
106
106
  var _vm = this
107
107
  var _h = _vm.$createElement
@@ -125,7 +125,7 @@ var render = function () {
125
125
  {
126
126
  key: _vm.getItemKey(item, index),
127
127
  on: {
128
- click: function (data, el, evt) {
128
+ click: function (evt) {
129
129
  return _vm.handleClick(item, evt, index)
130
130
  },
131
131
  },
@@ -159,7 +159,7 @@ var staticRenderFns = []
159
159
  render._withStripped = true
160
160
 
161
161
 
162
- // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=fcac0d6a&
162
+ // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=68a3f6ee&
163
163
 
164
164
  // EXTERNAL MODULE: external "eoss/lib/button"
165
165
  var button_ = __webpack_require__(13);
@@ -309,7 +309,9 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
309
309
  stop: {
310
310
  type: Boolean,
311
311
  default: false
312
- }
312
+ },
313
+ // table行数据
314
+ rowData: Object
313
315
  },
314
316
  computed: {
315
317
  /**
@@ -369,7 +371,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
369
371
  var visibleButtons = this.contents.filter(function (item) {
370
372
  var rules = item.rules;
371
373
  if (rules && typeof rules === 'function') {
372
- return rules(_this.data);
374
+ return rules(_this.data, _this.rowData);
373
375
  }
374
376
  return item.hide !== true;
375
377
  });
@@ -426,14 +428,14 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
426
428
  */
427
429
  handleClick: function handleClick(item, evt, index) {
428
430
  if (item.event && typeof item.event === 'function') {
429
- if (this.data) {
430
- item.event(this.data, item, evt, index);
431
+ if (this.data && this.rowData) {
432
+ item.event(this.data, this.rowData, item, evt, index);
431
433
  return;
432
434
  }
433
435
  item.event(item, evt, index);
434
436
  } else {
435
- if (this.data) {
436
- this.$emit('click', this.data, item, evt, index);
437
+ if (this.data && this.rowData) {
438
+ this.$emit('click', this.data, this.rowData, item, evt, index);
437
439
  return;
438
440
  }
439
441
  this.$emit('click', item, evt, index);
package/lib/button.js CHANGED
@@ -248,7 +248,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
248
248
  // 点击事件回调函数
249
249
  event: [Function, String],
250
250
  // 传递给点击事件的参数
251
- param: [Object, String, Number, Array]
251
+ param: [Object, String, Number, Array],
252
+ // table行数据
253
+ rowData: Object
252
254
  },
253
255
 
254
256
  computed: {
@@ -314,12 +316,12 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
314
316
 
315
317
  // 调用自定义事件处理函数(如果提供)
316
318
  if (this.event && typeof this.event === 'function') {
317
- this.event(this.param, this, evt);
319
+ this.event(this.param, this.rowData, this, evt);
318
320
  return;
319
321
  }
320
322
 
321
323
  // 触发组件的click事件
322
- this.$emit('click', evt, this.param, this);
324
+ this.$emit('click', evt, this, this.param, this.rowData);
323
325
  }
324
326
  },
325
327
 
package/lib/cascader.js CHANGED
@@ -4013,7 +4013,7 @@ function scrollMove(wrap) {
4013
4013
  // ESM COMPAT FLAG
4014
4014
  __webpack_require__.r(__webpack_exports__);
4015
4015
 
4016
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=template&id=51872262&
4016
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=template&id=2e83a4a2&
4017
4017
  var render = function () {
4018
4018
  var _vm = this
4019
4019
  var _h = _vm.$createElement
@@ -4058,7 +4058,7 @@ var render = function () {
4058
4058
  attrs: {
4059
4059
  size: _vm.realSize,
4060
4060
  placeholder: _vm.placeholder,
4061
- readonly: _vm.inputReadonly,
4061
+ "native-readonly": _vm.inputReadonly,
4062
4062
  disabled: _vm.isDisabled,
4063
4063
  "validate-event": false,
4064
4064
  },
@@ -4329,7 +4329,7 @@ var staticRenderFns = []
4329
4329
  render._withStripped = true
4330
4330
 
4331
4331
 
4332
- // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=template&id=51872262&
4332
+ // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=template&id=2e83a4a2&
4333
4333
 
4334
4334
  // EXTERNAL MODULE: ./src/utils/vue-popper.js
4335
4335
  var vue_popper = __webpack_require__(34);
@@ -368,7 +368,7 @@ function _broadcast(componentName, eventName, params) {
368
368
  // ESM COMPAT FLAG
369
369
  __webpack_require__.r(__webpack_exports__);
370
370
 
371
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/color-picker.vue?vue&type=template&id=41a44425&
371
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/color-picker.vue?vue&type=template&id=41259020&
372
372
  var render = function () {
373
373
  var _vm = this
374
374
  var _h = _vm.$createElement
@@ -468,7 +468,7 @@ var staticRenderFns = []
468
468
  render._withStripped = true
469
469
 
470
470
 
471
- // CONCATENATED MODULE: ./packages/color-picker/src/color-picker.vue?vue&type=template&id=41a44425&
471
+ // CONCATENATED MODULE: ./packages/color-picker/src/color-picker.vue?vue&type=template&id=41259020&
472
472
 
473
473
  // CONCATENATED MODULE: ./packages/color-picker/src/color.js
474
474
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -2106,7 +2106,10 @@ var emitter = __webpack_require__(15);
2106
2106
  if (value) {
2107
2107
  this.color.fromString(value);
2108
2108
  }
2109
- this.popperElm = this.$refs.dropdown.$el;
2109
+ // 只读态下 dropdown 被 v-if 移除,需防护
2110
+ if (this.$refs.dropdown) {
2111
+ this.popperElm = this.$refs.dropdown.$el;
2112
+ }
2110
2113
  },
2111
2114
  data: function data() {
2112
2115
  var color = new src_color({
package/lib/data-table.js CHANGED
@@ -4827,7 +4827,7 @@ module.exports = require("fetch-request-source");
4827
4827
  // ESM COMPAT FLAG
4828
4828
  __webpack_require__.r(__webpack_exports__);
4829
4829
 
4830
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/data-table.vue?vue&type=template&id=14342fc0&
4830
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/data-table.vue?vue&type=template&id=a0d290e2&
4831
4831
  var render = function () {
4832
4832
  var _vm = this
4833
4833
  var _h = _vm.$createElement
@@ -4888,7 +4888,7 @@ var render = function () {
4888
4888
  _vm.$attrs,
4889
4889
  false
4890
4890
  ),
4891
- _vm.$listeners
4891
+ _vm.tableListeners
4892
4892
  )
4893
4893
  ),
4894
4894
  ],
@@ -4922,7 +4922,7 @@ var staticRenderFns = []
4922
4922
  render._withStripped = true
4923
4923
 
4924
4924
 
4925
- // CONCATENATED MODULE: ./packages/data-table/src/data-table.vue?vue&type=template&id=14342fc0&
4925
+ // CONCATENATED MODULE: ./packages/data-table/src/data-table.vue?vue&type=template&id=a0d290e2&
4926
4926
 
4927
4927
  // EXTERNAL MODULE: external "eoss/lib/table"
4928
4928
  var table_ = __webpack_require__(99);
@@ -5074,10 +5074,10 @@ var external_throttle_debounce_ = __webpack_require__(25);
5074
5074
  }
5075
5075
  });
5076
5076
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/data-table.vue?vue&type=script&lang=js&
5077
- 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; };
5078
-
5079
5077
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5080
5078
 
5079
+ 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; };
5080
+
5081
5081
  //
5082
5082
  //
5083
5083
  //
@@ -5320,6 +5320,33 @@ var DEFAULT_PAGES = {
5320
5320
  return false;
5321
5321
  }
5322
5322
  return true;
5323
+ },
5324
+
5325
+ /**
5326
+ * es-table 事件透传:在 $listeners 基础上挂内部 change 钩子——
5327
+ * 单元格编辑回写是提交级事件(select 选中、input 失焦等),
5328
+ * 此时才对外同步最新 datas;父级原 change 监听照常调用
5329
+ */
5330
+ tableListeners: function tableListeners() {
5331
+ var _this = this;
5332
+
5333
+ var listeners = _extends({}, this.$listeners);
5334
+ var originChange = listeners.change;
5335
+ listeners.change = function () {
5336
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
5337
+ args[_key] = arguments[_key];
5338
+ }
5339
+
5340
+ _this.emitDataUpdate();
5341
+ if (Array.isArray(originChange)) {
5342
+ originChange.forEach(function (fn) {
5343
+ return fn.apply(undefined, args);
5344
+ });
5345
+ } else if (typeof originChange === 'function') {
5346
+ originChange.apply(undefined, args);
5347
+ }
5348
+ };
5349
+ return listeners;
5323
5350
  }
5324
5351
  },
5325
5352
  watch: {
@@ -5362,12 +5389,11 @@ var DEFAULT_PAGES = {
5362
5389
  }
5363
5390
  }
5364
5391
  },
5365
- datas: {
5366
- deep: true,
5367
- handler: function handler(val) {
5368
- this.$emit('update:data', val);
5369
- this.$emit('input', val);
5370
- }
5392
+ // 仅 datas 数组整体替换(取数/翻页/外部数据换引用)时对外通知;
5393
+ // 单元格编辑回写由 tableListeners 的 change 提交级事件通知,
5394
+ // 不用 deep watch,避免渲染期间嵌套响应式变化导致误触发多次
5395
+ datas: function datas(val) {
5396
+ this.emitDataUpdate(val);
5371
5397
  },
5372
5398
  infiniteScrollDisabled: function infiniteScrollDisabled(val) {
5373
5399
  this.isInfiniteScrollDisabled = val;
@@ -5394,21 +5420,32 @@ var DEFAULT_PAGES = {
5394
5420
  this.getData();
5395
5421
  },
5396
5422
  mounted: function mounted() {
5397
- var _this = this;
5423
+ var _this2 = this;
5398
5424
 
5399
5425
  this.$nextTick(function () {
5400
- _this.getHeight();
5426
+ _this2.getHeight();
5401
5427
  });
5402
5428
  },
5403
5429
 
5404
5430
  methods: {
5431
+ /**
5432
+ * 对外抛数据变化通知(:data.sync / v-model 承接)
5433
+ * @param {Array} val - 最新表格数据,默认当前 datas
5434
+ */
5435
+ emitDataUpdate: function emitDataUpdate() {
5436
+ var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.datas;
5437
+
5438
+ this.$emit('update:data', val);
5439
+ this.$emit('input', val);
5440
+ },
5441
+
5405
5442
  /**
5406
5443
  * 获取表格数据
5407
5444
  * @param {Object} param - 请求参数
5408
5445
  * @returns {Array} 表格数据
5409
5446
  */
5410
5447
  getDatas: function getDatas() {
5411
- var _this2 = this;
5448
+ var _this3 = this;
5412
5449
 
5413
5450
  var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5414
5451
 
@@ -5425,15 +5462,15 @@ var DEFAULT_PAGES = {
5425
5462
  }).then(function (res) {
5426
5463
  var results = res.results;
5427
5464
 
5428
- _this2.$set(_this2.pages, 'pageCount', results.pageCount || 0);
5429
- _this2.$set(_this2.pages, 'total', results.totalCount);
5430
- if (_this2.isInfiniteScroll) {
5431
- _this2.datas = _this2.datas.concat(results.records || results.data || []);
5465
+ _this3.$set(_this3.pages, 'pageCount', results.pageCount || 0);
5466
+ _this3.$set(_this3.pages, 'total', results.totalCount);
5467
+ if (_this3.isInfiniteScroll) {
5468
+ _this3.datas = _this3.datas.concat(results.records || results.data || []);
5432
5469
  if (results.pageCount <= results.pageNum) {
5433
- _this2.isInfiniteScrollDisabled = true;
5470
+ _this3.isInfiniteScrollDisabled = true;
5434
5471
  }
5435
5472
  } else {
5436
- _this2.datas = results.records || results.data || [];
5473
+ _this3.datas = results.records || results.data || [];
5437
5474
  }
5438
5475
  }).catch(function () {});
5439
5476
  }
@@ -5495,13 +5532,13 @@ var DEFAULT_PAGES = {
5495
5532
  * @param {Object} values - 工具栏当前搜索/高级搜索取值
5496
5533
  */
5497
5534
  handleToolbarInput: function handleToolbarInput() {
5498
- var _this3 = this;
5535
+ var _this4 = this;
5499
5536
 
5500
5537
  var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5501
5538
 
5502
5539
  Object.keys(values).forEach(function (key) {
5503
- if (_this3.param[key] !== values[key]) {
5504
- _this3.$set(_this3.param, key, values[key]);
5540
+ if (_this4.param[key] !== values[key]) {
5541
+ _this4.$set(_this4.param, key, values[key]);
5505
5542
  }
5506
5543
  });
5507
5544
  this.searchParams = _extends({}, values);
@@ -3697,7 +3697,7 @@ var component = Object(componentNormalizer["a" /* default */])(
3697
3697
 
3698
3698
  "use strict";
3699
3699
 
3700
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=41ad8826&
3700
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=3bc027b2&
3701
3701
  var render = function () {
3702
3702
  var _vm = this
3703
3703
  var _h = _vm.$createElement
@@ -3723,7 +3723,7 @@ var render = function () {
3723
3723
  staticClass: "es-date-editor",
3724
3724
  class: "es-date-editor--" + _vm.type,
3725
3725
  attrs: {
3726
- readonly:
3726
+ "native-readonly":
3727
3727
  !_vm.editable ||
3728
3728
  _vm.readonly ||
3729
3729
  _vm.type === "dates" ||
@@ -3881,7 +3881,7 @@ var staticRenderFns = []
3881
3881
  render._withStripped = true
3882
3882
 
3883
3883
 
3884
- // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=41ad8826&
3884
+ // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=3bc027b2&
3885
3885
 
3886
3886
  // EXTERNAL MODULE: external "vue"
3887
3887
  var external_vue_ = __webpack_require__(2);
@@ -4006,6 +4006,8 @@ var merge = __webpack_require__(23);
4006
4006
  //
4007
4007
  //
4008
4008
  //
4009
+ //
4010
+ //
4009
4011
 
4010
4012
  /**
4011
4013
  * 日期时间选择器基础组件