eoss-ui 0.4.70 → 0.4.71

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
@@ -2886,7 +2886,7 @@ module.exports = require("json-bigint");
2886
2886
  // ESM COMPAT FLAG
2887
2887
  __webpack_require__.r(__webpack_exports__);
2888
2888
 
2889
- // 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&
2889
+ // 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=2522b075&
2890
2890
  var render = function () {
2891
2891
  var _vm = this
2892
2892
  var _h = _vm.$createElement
@@ -3002,7 +3002,8 @@ var render = function () {
3002
3002
  on: {
3003
3003
  "node-click": _vm.handleNodeClick,
3004
3004
  "check-change": _vm.handleCheckChange,
3005
- "current-first": _vm.handleCurrentFirst,
3005
+ results: _vm.handleResults,
3006
+ "sub-results": _vm.handleSubResults,
3006
3007
  },
3007
3008
  },
3008
3009
  "es-tree",
@@ -3198,7 +3199,7 @@ var staticRenderFns = []
3198
3199
  render._withStripped = true
3199
3200
 
3200
3201
 
3201
- // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=8d1a3b86&
3202
+ // CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=2522b075&
3202
3203
 
3203
3204
  // EXTERNAL MODULE: ./src/utils/util.js
3204
3205
  var util = __webpack_require__(0);
@@ -3353,6 +3354,7 @@ var util = __webpack_require__(0);
3353
3354
  //
3354
3355
  //
3355
3356
  //
3357
+ //
3356
3358
 
3357
3359
 
3358
3360
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -3397,7 +3399,11 @@ var util = __webpack_require__(0);
3397
3399
  type: String,
3398
3400
  default: '#/empty'
3399
3401
  },
3400
- zoom: false
3402
+ zoom: false,
3403
+ checkedsAsSearch: {
3404
+ type: Boolean,
3405
+ default: true
3406
+ }
3401
3407
  },
3402
3408
  computed: {
3403
3409
  wujieName: function wujieName() {
@@ -3595,11 +3601,14 @@ var util = __webpack_require__(0);
3595
3601
  },
3596
3602
  handleCheckChange: function handleCheckChange() {
3597
3603
  var ref = this.tabs && this.tabs.length ? this.tabs[Number(this.active)].ref ? this.tabs[Number(this.active)].ref : 'groupTree' + this.active : 'groupTree';
3598
- this.checkeds = this.$refs[ref].getCheckedNodes();
3604
+ var checkeds = this.$refs[ref].getCheckedNodes();
3605
+ if (this.checkedsAsSearch) {
3606
+ this.checkeds = checkeds;
3607
+ }
3599
3608
  if (this.onCheckChange) {
3600
- this.onCheckChange.apply(this, [this].concat(Array.prototype.slice.call(arguments)));
3609
+ this.onCheckChange.apply(this, [checkeds].concat(Array.prototype.slice.call(arguments), [this]));
3601
3610
  } else {
3602
- this.$emit.apply(this, ['check-change', this].concat(Array.prototype.slice.call(arguments)));
3611
+ this.$emit.apply(this, ['check-change', checkeds].concat(Array.prototype.slice.call(arguments), [this]));
3603
3612
  }
3604
3613
  },
3605
3614
  handleChange: function handleChange(res) {
@@ -3609,9 +3618,14 @@ var util = __webpack_require__(0);
3609
3618
  this.checkeds = res;
3610
3619
  this.$emit('enterprise-confirm', res);
3611
3620
  },
3612
- handleCurrentFirst: function handleCurrentFirst(res) {
3613
- this.checkeds = res.children[0];
3614
- this.$emit('current-first', res);
3621
+ handleResults: function handleResults(res) {
3622
+ if (this.tree.showCheckbox && this.tree.checkedFirst && this.checkedsAsSearch || this.tree.currentFirst) {
3623
+ this.checkeds = res.children[0];
3624
+ }
3625
+ this.$emit('results', res);
3626
+ },
3627
+ handleSubResults: function handleSubResults(res) {
3628
+ this.$emit('sub-results', res);
3615
3629
  },
3616
3630
  setCurrentKey: function setCurrentKey(keys, leafOnly) {
3617
3631
  var _this2 = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.70",
3
+ "version": "0.4.71",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -49,7 +49,8 @@
49
49
  ref="groupTree"
50
50
  @node-click="handleNodeClick"
51
51
  @check-change="handleCheckChange"
52
- @current-first="handleCurrentFirst"
52
+ @results="handleResults"
53
+ @sub-results="handleSubResults"
53
54
  v-on="tree.events ? tree.events : {}"
54
55
  >
55
56
  <template v-if="enterprise" slot="filtrate">
@@ -191,7 +192,11 @@ export default {
191
192
  type: String,
192
193
  default: '#/empty'
193
194
  },
194
- zoom: false
195
+ zoom: false,
196
+ checkedsAsSearch: {
197
+ type: Boolean,
198
+ default: true
199
+ }
195
200
  },
196
201
  computed: {
197
202
  wujieName() {
@@ -419,11 +424,14 @@ export default {
419
424
  ? this.tabs[Number(this.active)].ref
420
425
  : 'groupTree' + this.active
421
426
  : 'groupTree';
422
- this.checkeds = this.$refs[ref].getCheckedNodes();
427
+ let checkeds = this.$refs[ref].getCheckedNodes();
428
+ if (this.checkedsAsSearch) {
429
+ this.checkeds = checkeds;
430
+ }
423
431
  if (this.onCheckChange) {
424
- this.onCheckChange(this, ...arguments);
432
+ this.onCheckChange(checkeds, ...arguments, this);
425
433
  } else {
426
- this.$emit('check-change', this, ...arguments);
434
+ this.$emit('check-change', checkeds, ...arguments, this);
427
435
  }
428
436
  },
429
437
  handleChange(res) {
@@ -433,9 +441,19 @@ export default {
433
441
  this.checkeds = res;
434
442
  this.$emit('enterprise-confirm', res);
435
443
  },
436
- handleCurrentFirst(res) {
437
- this.checkeds = res.children[0];
438
- this.$emit('current-first', res);
444
+ handleResults(res) {
445
+ if (
446
+ (this.tree.showCheckbox &&
447
+ this.tree.checkedFirst &&
448
+ this.checkedsAsSearch) ||
449
+ this.tree.currentFirst
450
+ ) {
451
+ this.checkeds = res.children[0];
452
+ }
453
+ this.$emit('results', res);
454
+ },
455
+ handleSubResults(res) {
456
+ this.$emit('sub-results', res);
439
457
  },
440
458
  setCurrentKey(keys, leafOnly) {
441
459
  let ref =
package/src/index.js CHANGED
@@ -115,7 +115,7 @@ if (typeof window !== 'undefined' && window.Vue) {
115
115
  }
116
116
 
117
117
  export default {
118
- version: '0.4.70',
118
+ version: '0.4.71',
119
119
  install,
120
120
  Button,
121
121
  ButtonGroup,