eoss-ui 0.4.90 → 0.4.91

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.
package/lib/tree-group.js CHANGED
@@ -3419,7 +3419,7 @@ module.exports = require("json-bigint");
3419
3419
  // ESM COMPAT FLAG
3420
3420
  __webpack_require__.r(__webpack_exports__);
3421
3421
 
3422
- // 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=11d86630&
3422
+ // 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=29d92df1&
3423
3423
  var render = function () {
3424
3424
  var _vm = this
3425
3425
  var _h = _vm.$createElement
@@ -3462,6 +3462,10 @@ var render = function () {
3462
3462
  },
3463
3463
  },
3464
3464
  _vm._l(_vm.tabs, function (item, index) {
3465
+ var arguments$1 = arguments
3466
+ var i = arguments.length,
3467
+ argsArray = Array(i)
3468
+ while (i--) argsArray[i] = arguments[i]
3465
3469
  return _c(
3466
3470
  "el-tab-pane",
3467
3471
  {
@@ -3477,9 +3481,24 @@ var render = function () {
3477
3481
  ref: item.ref ? item.ref : "groupTree" + index,
3478
3482
  refInFor: true,
3479
3483
  on: {
3480
- "node-click": _vm.handleNodeClick,
3481
- "check-change": _vm.handleCheckChange,
3482
- "current-first": _vm.handleCurrentFirst,
3484
+ "node-click": function (data, node) {
3485
+ _vm.handleNodeClick(data, node, item)
3486
+ },
3487
+ "check-change": function () {
3488
+ _vm.handleCheckChange.apply(
3489
+ void 0,
3490
+ arguments$1.concat([item])
3491
+ )
3492
+ },
3493
+ results: function (res) {
3494
+ _vm.handleResults(res, item)
3495
+ },
3496
+ "sub-results": function (res) {
3497
+ _vm.handleSubResults(res, item)
3498
+ },
3499
+ "current-first": function (type, res) {
3500
+ _vm.handleCurrentFirst(type, res, item)
3501
+ },
3483
3502
  },
3484
3503
  },
3485
3504
  "es-tree",
@@ -3537,6 +3556,7 @@ var render = function () {
3537
3556
  "check-change": _vm.handleCheckChange,
3538
3557
  results: _vm.handleResults,
3539
3558
  "sub-results": _vm.handleSubResults,
3559
+ "current-first": _vm.handleCurrentFirst,
3540
3560
  },
3541
3561
  },
3542
3562
  "es-tree",
@@ -3732,7 +3752,7 @@ var staticRenderFns = []
3732
3752
  render._withStripped = true
3733
3753
 
3734
3754
 
3735
- // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=11d86630&
3755
+ // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=29d92df1&
3736
3756
 
3737
3757
  // EXTERNAL MODULE: ./src/utils/util.js
3738
3758
  var util = __webpack_require__(0);
@@ -3888,6 +3908,29 @@ var util = __webpack_require__(0);
3888
3908
  //
3889
3909
  //
3890
3910
  //
3911
+ //
3912
+ //
3913
+ //
3914
+ //
3915
+ //
3916
+ //
3917
+ //
3918
+ //
3919
+ //
3920
+ //
3921
+ //
3922
+ //
3923
+ //
3924
+ //
3925
+ //
3926
+ //
3927
+ //
3928
+ //
3929
+ //
3930
+ //
3931
+ //
3932
+ //
3933
+ //
3891
3934
 
3892
3935
 
3893
3936
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -4128,14 +4171,14 @@ var util = __webpack_require__(0);
4128
4171
  handleSelect: function handleSelect() {
4129
4172
  this.$emit('tab-click', this.tabs[parseInt(this.active, 10)]);
4130
4173
  },
4131
- handleNodeClick: function handleNodeClick(data, node) {
4174
+ handleNodeClick: function handleNodeClick(data, node, tabs) {
4132
4175
  if (this.clickedAsSearch) {
4133
4176
  this.checkeds = data;
4134
4177
  }
4135
4178
  if (this.onNodeClick) {
4136
- this.onNodeClick(this, data, node);
4179
+ this.onNodeClick(this, data, node, tabs);
4137
4180
  } else {
4138
- this.$emit('node-click', this, data, node);
4181
+ this.$emit('node-click', this, data, node, tabs);
4139
4182
  }
4140
4183
  },
4141
4184
  handleCheckChange: function handleCheckChange() {
@@ -4157,14 +4200,14 @@ var util = __webpack_require__(0);
4157
4200
  this.checkeds = res;
4158
4201
  this.$emit('enterprise-confirm', res);
4159
4202
  },
4160
- handleResults: function handleResults(res) {
4203
+ handleResults: function handleResults(res, tabs) {
4161
4204
  if (this.tree.showCheckbox && this.tree.checkedFirst && this.checkedAsSearch || this.tree.currentFirst) {
4162
4205
  this.checkeds = res[0];
4163
4206
  }
4164
- this.$emit('results', res);
4207
+ this.$emit('results', res, tabs);
4165
4208
  },
4166
- handleSubResults: function handleSubResults(res) {
4167
- this.$emit('sub-results', res);
4209
+ handleSubResults: function handleSubResults(res, tabs) {
4210
+ this.$emit('sub-results', res, tabs);
4168
4211
  },
4169
4212
  setCurrentKey: function setCurrentKey(keys, leafOnly) {
4170
4213
  var _this2 = this;
@@ -4177,6 +4220,9 @@ var util = __webpack_require__(0);
4177
4220
  getTree: function getTree() {
4178
4221
  var ref = this.tabs && this.tabs.length ? this.tabs[Number(this.active)].ref ? this.tabs[Number(this.active)].ref : 'groupTree' + this.active : 'groupTree';
4179
4222
  return this.$refs[ref];
4223
+ },
4224
+ handleCurrentFirst: function handleCurrentFirst(type, res, tabs) {
4225
+ this.$emit('current-first', type, res, tabs);
4180
4226
  }
4181
4227
  }
4182
4228
  });
package/lib/tree.js CHANGED
@@ -3419,7 +3419,7 @@ module.exports = require("json-bigint");
3419
3419
  // ESM COMPAT FLAG
3420
3420
  __webpack_require__.r(__webpack_exports__);
3421
3421
 
3422
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=1caf3025&
3422
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=ad13099c&
3423
3423
  var render = function () {
3424
3424
  var _vm = this
3425
3425
  var _h = _vm.$createElement
@@ -3613,7 +3613,7 @@ var staticRenderFns = []
3613
3613
  render._withStripped = true
3614
3614
 
3615
3615
 
3616
- // CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=1caf3025&
3616
+ // CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=ad13099c&
3617
3617
 
3618
3618
  // EXTERNAL MODULE: ./src/config/api.js
3619
3619
  var api = __webpack_require__(1);
@@ -3781,10 +3781,6 @@ var util = __webpack_require__(0);
3781
3781
  type: String,
3782
3782
  default: api["H" /* getOrgMainTree */]
3783
3783
  },
3784
- currentFirstNode: {
3785
- type: Boolean,
3786
- default: false
3787
- },
3788
3784
  system: {
3789
3785
  type: Boolean,
3790
3786
  default: false
@@ -4014,6 +4010,7 @@ var util = __webpack_require__(0);
4014
4010
  if (_this.currentFirst) {
4015
4011
  var currentNode = treeList[0].id;
4016
4012
  if (!_this.currentNodeKey && _this.currentNodeKey != 0) {
4013
+ _this.$emit('current-first', 'current', treeList[0]);
4017
4014
  _this.$nextTick(function () {
4018
4015
  _this.$refs.oaTree.setCurrentKey(currentNode);
4019
4016
  });
@@ -4022,6 +4019,7 @@ var util = __webpack_require__(0);
4022
4019
  if (_this.checkedFirst) {
4023
4020
  var checkedNode = treeList[0].id;
4024
4021
  if (_this.defaultCheckedKeys && _this.defaultCheckedKeys.indexOf(checkedNode) == -1) {
4022
+ _this.$emit('current-first', 'checked', treeList[0]);
4025
4023
  _this.checkedKeys = [checkedNode];
4026
4024
  }
4027
4025
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.90",
3
+ "version": "0.4.91",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -95,7 +95,7 @@
95
95
  "cp-cli": "^1.0.2",
96
96
  "cross-env": "^3.1.3",
97
97
  "css-loader": "^2.1.0",
98
- "eoss-element": "^0.2.71",
98
+ "eoss-element": "^0.2.73",
99
99
  "es6-promise": "^4.0.5",
100
100
  "eslint": "4.18.2",
101
101
  "eslint-config-elemefe": "0.1.1",
@@ -175,10 +175,6 @@ export default {
175
175
  type: String,
176
176
  default: getOrgMainTree
177
177
  },
178
- currentFirstNode: {
179
- type: Boolean,
180
- default: false
181
- },
182
178
  system: {
183
179
  type: Boolean,
184
180
  default: false
@@ -405,6 +401,7 @@ export default {
405
401
  if (this.currentFirst) {
406
402
  let currentNode = treeList[0].id;
407
403
  if (!this.currentNodeKey && this.currentNodeKey != 0) {
404
+ this.$emit('current-first', 'current', treeList[0]);
408
405
  this.$nextTick(() => {
409
406
  this.$refs.oaTree.setCurrentKey(currentNode);
410
407
  });
@@ -416,6 +413,7 @@ export default {
416
413
  this.defaultCheckedKeys &&
417
414
  this.defaultCheckedKeys.indexOf(checkedNode) == -1
418
415
  ) {
416
+ this.$emit('current-first', 'checked', treeList[0]);
419
417
  this.checkedKeys = [checkedNode];
420
418
  }
421
419
  }
@@ -23,9 +23,31 @@
23
23
  <es-tree
24
24
  v-bind="item.tree"
25
25
  :ref="item.ref ? item.ref : 'groupTree' + index"
26
- @node-click="handleNodeClick"
27
- @check-change="handleCheckChange"
28
- @current-first="handleCurrentFirst"
26
+ @node-click="
27
+ (data, node) => {
28
+ handleNodeClick(data, node, item);
29
+ }
30
+ "
31
+ @check-change="
32
+ () => {
33
+ handleCheckChange(...arguments, item);
34
+ }
35
+ "
36
+ @results="
37
+ (res) => {
38
+ handleResults(res, item);
39
+ }
40
+ "
41
+ @sub-results="
42
+ (res) => {
43
+ handleSubResults(res, item);
44
+ }
45
+ "
46
+ @current-first="
47
+ (type, res) => {
48
+ handleCurrentFirst(type, res, item);
49
+ }
50
+ "
29
51
  v-on="item.tree && item.tree.events ? item.tree.events : {}"
30
52
  >
31
53
  <template v-if="item.enterprise" slot="filtrate">
@@ -51,6 +73,7 @@
51
73
  @check-change="handleCheckChange"
52
74
  @results="handleResults"
53
75
  @sub-results="handleSubResults"
76
+ @current-first="handleCurrentFirst"
54
77
  v-on="tree.events ? tree.events : {}"
55
78
  >
56
79
  <template v-if="enterprise" slot="filtrate">
@@ -413,14 +436,14 @@ export default {
413
436
  handleSelect() {
414
437
  this.$emit('tab-click', this.tabs[parseInt(this.active, 10)]);
415
438
  },
416
- handleNodeClick(data, node) {
439
+ handleNodeClick(data, node, tabs) {
417
440
  if (this.clickedAsSearch) {
418
441
  this.checkeds = data;
419
442
  }
420
443
  if (this.onNodeClick) {
421
- this.onNodeClick(this, data, node);
444
+ this.onNodeClick(this, data, node, tabs);
422
445
  } else {
423
- this.$emit('node-click', this, data, node);
446
+ this.$emit('node-click', this, data, node, tabs);
424
447
  }
425
448
  },
426
449
  handleCheckChange() {
@@ -447,7 +470,7 @@ export default {
447
470
  this.checkeds = res;
448
471
  this.$emit('enterprise-confirm', res);
449
472
  },
450
- handleResults(res) {
473
+ handleResults(res, tabs) {
451
474
  if (
452
475
  (this.tree.showCheckbox &&
453
476
  this.tree.checkedFirst &&
@@ -456,10 +479,10 @@ export default {
456
479
  ) {
457
480
  this.checkeds = res[0];
458
481
  }
459
- this.$emit('results', res);
482
+ this.$emit('results', res, tabs);
460
483
  },
461
- handleSubResults(res) {
462
- this.$emit('sub-results', res);
484
+ handleSubResults(res, tabs) {
485
+ this.$emit('sub-results', res, tabs);
463
486
  },
464
487
  setCurrentKey(keys, leafOnly) {
465
488
  let ref =
@@ -480,6 +503,9 @@ export default {
480
503
  : 'groupTree' + this.active
481
504
  : 'groupTree';
482
505
  return this.$refs[ref];
506
+ },
507
+ handleCurrentFirst(type, res, tabs) {
508
+ this.$emit('current-first', type, res, tabs);
483
509
  }
484
510
  }
485
511
  };
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.90',
120
+ version: '0.4.91',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,