@weitutech/by-components 1.2.3 → 1.2.5
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/by-components.common.js +253 -81
- package/lib/by-components.umd.js +253 -81
- package/lib/by-components.umd.min.js +1 -1
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -74528,8 +74528,8 @@ var component = normalizeComponent(
|
|
|
74528
74528
|
)
|
|
74529
74529
|
|
|
74530
74530
|
/* harmony default export */ var pager = (component.exports);
|
|
74531
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
74532
|
-
var
|
|
74531
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=552fb22a
|
|
74532
|
+
var tablevue_type_template_id_552fb22a_render = function render() {
|
|
74533
74533
|
var _vm = this,
|
|
74534
74534
|
_c = _vm._self._c;
|
|
74535
74535
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -74560,7 +74560,17 @@ var tablevue_type_template_id_f5e98ace_render = function render() {
|
|
|
74560
74560
|
on: {
|
|
74561
74561
|
"click": _vm.resetCachedTableColumns
|
|
74562
74562
|
}
|
|
74563
|
-
}, [_vm._v(" 重置列宽 ")]) : _vm._e()], 1), _c('by-pager', {
|
|
74563
|
+
}, [_vm._v(" 重置列宽 ")]) : _vm._e()], 1), _vm.useUnknownTotalPager ? _c('by-pager-unknown-total', {
|
|
74564
|
+
attrs: {
|
|
74565
|
+
"page": _vm.options.pagerConfig.currentPage,
|
|
74566
|
+
"limit": _vm.options.pagerConfig.pageSize,
|
|
74567
|
+
"page-sizes": _vm.options.pagerConfig.pageSizes,
|
|
74568
|
+
"current-count": _vm.currentPageDataCount
|
|
74569
|
+
},
|
|
74570
|
+
on: {
|
|
74571
|
+
"onChange": _vm.pageChange
|
|
74572
|
+
}
|
|
74573
|
+
}) : _c('by-pager', {
|
|
74564
74574
|
attrs: {
|
|
74565
74575
|
"page": _vm.options.pagerConfig.currentPage,
|
|
74566
74576
|
"limit": _vm.options.pagerConfig.pageSize,
|
|
@@ -74614,7 +74624,7 @@ var tablevue_type_template_id_f5e98ace_render = function render() {
|
|
|
74614
74624
|
}
|
|
74615
74625
|
}) : _vm._e()], 1);
|
|
74616
74626
|
};
|
|
74617
|
-
var
|
|
74627
|
+
var tablevue_type_template_id_552fb22a_staticRenderFns = [];
|
|
74618
74628
|
|
|
74619
74629
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
74620
74630
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -77289,6 +77299,160 @@ var custom_column_component = normalizeComponent(
|
|
|
77289
77299
|
)
|
|
77290
77300
|
|
|
77291
77301
|
/* harmony default export */ var custom_column = (custom_column_component.exports);
|
|
77302
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/pager-unknown-total/index.vue?vue&type=template&id=1208560e
|
|
77303
|
+
var pager_unknown_totalvue_type_template_id_1208560e_render = function render() {
|
|
77304
|
+
var _vm = this,
|
|
77305
|
+
_c = _vm._self._c;
|
|
77306
|
+
return _c('div', {
|
|
77307
|
+
staticClass: "by-pager-unknown-total"
|
|
77308
|
+
}, [_c('div', {
|
|
77309
|
+
staticClass: "by-pager-unknown-total__inner"
|
|
77310
|
+
}, [_vm.pager.page > 1 ? _c('button', {
|
|
77311
|
+
staticClass: "by-pager-unknown-total__btn-home",
|
|
77312
|
+
attrs: {
|
|
77313
|
+
"type": "button"
|
|
77314
|
+
},
|
|
77315
|
+
on: {
|
|
77316
|
+
"click": function ($event) {
|
|
77317
|
+
return _vm.changePage(1);
|
|
77318
|
+
}
|
|
77319
|
+
}
|
|
77320
|
+
}, [_c('span', {
|
|
77321
|
+
staticClass: "by-pager-unknown-total__btn-home-icon",
|
|
77322
|
+
attrs: {
|
|
77323
|
+
"aria-hidden": "true"
|
|
77324
|
+
}
|
|
77325
|
+
}, [_vm._v("‹")]), _vm._v("回首页 ")]) : _vm._e(), _c('button', {
|
|
77326
|
+
staticClass: "by-pager-unknown-total__btn",
|
|
77327
|
+
attrs: {
|
|
77328
|
+
"type": "button",
|
|
77329
|
+
"disabled": _vm.pager.page <= 1
|
|
77330
|
+
},
|
|
77331
|
+
on: {
|
|
77332
|
+
"click": function ($event) {
|
|
77333
|
+
return _vm.changePage(_vm.pager.page - 1);
|
|
77334
|
+
}
|
|
77335
|
+
}
|
|
77336
|
+
}, [_vm._v(" 上一页 ")]), _c('span', {
|
|
77337
|
+
staticClass: "by-pager-unknown-total__page"
|
|
77338
|
+
}, [_vm._v("第 " + _vm._s(_vm.pager.page) + " 页")]), _c('button', {
|
|
77339
|
+
staticClass: "by-pager-unknown-total__btn",
|
|
77340
|
+
attrs: {
|
|
77341
|
+
"type": "button",
|
|
77342
|
+
"disabled": _vm.isLastPage
|
|
77343
|
+
},
|
|
77344
|
+
on: {
|
|
77345
|
+
"click": function ($event) {
|
|
77346
|
+
return _vm.changePage(_vm.pager.page + 1);
|
|
77347
|
+
}
|
|
77348
|
+
}
|
|
77349
|
+
}, [_vm._v(" 下一页 ")]), _c('el-select', {
|
|
77350
|
+
staticClass: "by-pager-unknown-total__sizes",
|
|
77351
|
+
attrs: {
|
|
77352
|
+
"value": _vm.pager.limit,
|
|
77353
|
+
"popper-class": "by-pager-unknown-total__sizes-popper"
|
|
77354
|
+
},
|
|
77355
|
+
on: {
|
|
77356
|
+
"change": value => _vm.handleValueChange(value, 'limit')
|
|
77357
|
+
}
|
|
77358
|
+
}, _vm._l(_vm.pageSizes, function (size) {
|
|
77359
|
+
return _c('el-option', {
|
|
77360
|
+
key: size,
|
|
77361
|
+
attrs: {
|
|
77362
|
+
"label": `${size}条/页`,
|
|
77363
|
+
"value": size
|
|
77364
|
+
}
|
|
77365
|
+
});
|
|
77366
|
+
}), 1)], 1)]);
|
|
77367
|
+
};
|
|
77368
|
+
var pager_unknown_totalvue_type_template_id_1208560e_staticRenderFns = [];
|
|
77369
|
+
|
|
77370
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/pager-unknown-total/index.vue?vue&type=script&lang=js
|
|
77371
|
+
/* harmony default export */ var pager_unknown_totalvue_type_script_lang_js = ({
|
|
77372
|
+
name: 'ByPagerUnknownTotal',
|
|
77373
|
+
props: {
|
|
77374
|
+
limit: {
|
|
77375
|
+
type: Number,
|
|
77376
|
+
default: 15
|
|
77377
|
+
},
|
|
77378
|
+
page: {
|
|
77379
|
+
type: Number,
|
|
77380
|
+
default: 1
|
|
77381
|
+
},
|
|
77382
|
+
pageSizes: {
|
|
77383
|
+
type: Array,
|
|
77384
|
+
default: () => [10, 15, 20, 25, 30, 50, 100]
|
|
77385
|
+
},
|
|
77386
|
+
currentCount: {
|
|
77387
|
+
type: Number,
|
|
77388
|
+
default: 0
|
|
77389
|
+
}
|
|
77390
|
+
},
|
|
77391
|
+
data() {
|
|
77392
|
+
return {
|
|
77393
|
+
pager: {
|
|
77394
|
+
page: this.page,
|
|
77395
|
+
limit: this.limit
|
|
77396
|
+
}
|
|
77397
|
+
};
|
|
77398
|
+
},
|
|
77399
|
+
computed: {
|
|
77400
|
+
isLastPage() {
|
|
77401
|
+
return this.currentCount < this.pager.limit;
|
|
77402
|
+
}
|
|
77403
|
+
},
|
|
77404
|
+
watch: {
|
|
77405
|
+
page: {
|
|
77406
|
+
handler(val) {
|
|
77407
|
+
this.pager.page = val;
|
|
77408
|
+
},
|
|
77409
|
+
immediate: true
|
|
77410
|
+
},
|
|
77411
|
+
limit: {
|
|
77412
|
+
handler(val) {
|
|
77413
|
+
this.pager.limit = val;
|
|
77414
|
+
},
|
|
77415
|
+
immediate: true
|
|
77416
|
+
}
|
|
77417
|
+
},
|
|
77418
|
+
methods: {
|
|
77419
|
+
changePage(page) {
|
|
77420
|
+
if (page < 1 || page > this.pager.page && this.isLastPage) return;
|
|
77421
|
+
this.handleValueChange(page, 'page');
|
|
77422
|
+
},
|
|
77423
|
+
handleValueChange(value, field) {
|
|
77424
|
+
if (!value) return;
|
|
77425
|
+
const values = {
|
|
77426
|
+
...this.pager,
|
|
77427
|
+
[field]: value,
|
|
77428
|
+
page: field === 'limit' ? 1 : value
|
|
77429
|
+
};
|
|
77430
|
+
this.$emit('onChange', values);
|
|
77431
|
+
}
|
|
77432
|
+
}
|
|
77433
|
+
});
|
|
77434
|
+
;// ./src/components/pager-unknown-total/index.vue?vue&type=script&lang=js
|
|
77435
|
+
/* harmony default export */ var components_pager_unknown_totalvue_type_script_lang_js = (pager_unknown_totalvue_type_script_lang_js);
|
|
77436
|
+
;// ./src/components/pager-unknown-total/index.vue
|
|
77437
|
+
|
|
77438
|
+
|
|
77439
|
+
|
|
77440
|
+
|
|
77441
|
+
|
|
77442
|
+
/* normalize component */
|
|
77443
|
+
;
|
|
77444
|
+
var pager_unknown_total_component = normalizeComponent(
|
|
77445
|
+
components_pager_unknown_totalvue_type_script_lang_js,
|
|
77446
|
+
pager_unknown_totalvue_type_template_id_1208560e_render,
|
|
77447
|
+
pager_unknown_totalvue_type_template_id_1208560e_staticRenderFns,
|
|
77448
|
+
false,
|
|
77449
|
+
null,
|
|
77450
|
+
null,
|
|
77451
|
+
null
|
|
77452
|
+
|
|
77453
|
+
)
|
|
77454
|
+
|
|
77455
|
+
/* harmony default export */ var pager_unknown_total = (pager_unknown_total_component.exports);
|
|
77292
77456
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=script&lang=js
|
|
77293
77457
|
|
|
77294
77458
|
|
|
@@ -77305,10 +77469,12 @@ var custom_column_component = normalizeComponent(
|
|
|
77305
77469
|
|
|
77306
77470
|
|
|
77307
77471
|
|
|
77472
|
+
|
|
77308
77473
|
/* harmony default export */ var tablevue_type_script_lang_js = ({
|
|
77309
77474
|
name: 'ByTable',
|
|
77310
77475
|
components: {
|
|
77311
|
-
CustomColumn: custom_column
|
|
77476
|
+
CustomColumn: custom_column,
|
|
77477
|
+
ByPagerUnknownTotal: pager_unknown_total
|
|
77312
77478
|
},
|
|
77313
77479
|
props: {
|
|
77314
77480
|
/**
|
|
@@ -77561,6 +77727,13 @@ var custom_column_component = normalizeComponent(
|
|
|
77561
77727
|
...otherConfigs
|
|
77562
77728
|
};
|
|
77563
77729
|
},
|
|
77730
|
+
useUnknownTotalPager() {
|
|
77731
|
+
const pagerConfig = this.gridOptions.pagerConfig;
|
|
77732
|
+
return !!(pagerConfig && pagerConfig.total === -1 && !pagerConfig.frontendPagination);
|
|
77733
|
+
},
|
|
77734
|
+
currentPageDataCount() {
|
|
77735
|
+
return (this.gridOptions.data || []).length;
|
|
77736
|
+
},
|
|
77564
77737
|
// 插槽集合
|
|
77565
77738
|
slotMap() {
|
|
77566
77739
|
var _this$gridOptions$cus, _this$gridOptions, _this$gridOptions$cus2;
|
|
@@ -78249,8 +78422,8 @@ var custom_column_component = normalizeComponent(
|
|
|
78249
78422
|
;
|
|
78250
78423
|
var table_component = normalizeComponent(
|
|
78251
78424
|
components_tablevue_type_script_lang_js,
|
|
78252
|
-
|
|
78253
|
-
|
|
78425
|
+
tablevue_type_template_id_552fb22a_render,
|
|
78426
|
+
tablevue_type_template_id_552fb22a_staticRenderFns,
|
|
78254
78427
|
false,
|
|
78255
78428
|
null,
|
|
78256
78429
|
null,
|
|
@@ -96015,8 +96188,8 @@ var ByCascaderPanel_component = normalizeComponent(
|
|
|
96015
96188
|
)
|
|
96016
96189
|
|
|
96017
96190
|
/* harmony default export */ var ByCascaderPanel = (ByCascaderPanel_component.exports);
|
|
96018
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cascader-panel-pro/ByCascaderPanelPro.vue?vue&type=template&id=
|
|
96019
|
-
var
|
|
96191
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/cascader-panel-pro/ByCascaderPanelPro.vue?vue&type=template&id=e4b10a08
|
|
96192
|
+
var ByCascaderPanelProvue_type_template_id_e4b10a08_render = function render() {
|
|
96020
96193
|
var _vm = this,
|
|
96021
96194
|
_c = _vm._self._c;
|
|
96022
96195
|
return _c('div', {
|
|
@@ -96258,7 +96431,7 @@ var ByCascaderPanelProvue_type_template_id_075d43fb_render = function render() {
|
|
|
96258
96431
|
staticClass: "empty-state"
|
|
96259
96432
|
}, [_vm._v("暂无选中项")])], 1)])])])]);
|
|
96260
96433
|
};
|
|
96261
|
-
var
|
|
96434
|
+
var ByCascaderPanelProvue_type_template_id_e4b10a08_staticRenderFns = [];
|
|
96262
96435
|
|
|
96263
96436
|
;// ./src/components/cascader-panel-pro/cascaderStorePro.js
|
|
96264
96437
|
|
|
@@ -98432,7 +98605,9 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98432
98605
|
// 紧凑模式下稳定的空 value 引用,避免 watch 误触发清空
|
|
98433
98606
|
searchDebounceTimer: null,
|
|
98434
98607
|
searchLeafSetCache: null,
|
|
98435
|
-
panelSyncTimer: null
|
|
98608
|
+
panelSyncTimer: null,
|
|
98609
|
+
// 外部 v-model 回显同步中,避免与用户操作冲突
|
|
98610
|
+
isExternalSync: false
|
|
98436
98611
|
};
|
|
98437
98612
|
},
|
|
98438
98613
|
computed: {
|
|
@@ -98567,6 +98742,8 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98567
98742
|
} else {
|
|
98568
98743
|
this.isAllSelected = this.selectedCount === this.totalCount;
|
|
98569
98744
|
}
|
|
98745
|
+
} else if (panel && panel.store && panel.selection && this.aggregationMode) {
|
|
98746
|
+
this.isAllSelected = panel.selection.size() === panel.store.totalLeafCount && panel.store.totalLeafCount > 0;
|
|
98570
98747
|
}
|
|
98571
98748
|
} else {
|
|
98572
98749
|
if (newVal.length > 1) {
|
|
@@ -98616,18 +98793,12 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98616
98793
|
} = panel;
|
|
98617
98794
|
if (this.aggregationMode) {
|
|
98618
98795
|
let items = CascaderUtilsPro.getAggregatedItemsFromSelection(store, selection, this.filteredOptions, this.cascaderProps);
|
|
98619
|
-
if (items.length === 0 && selection.size() > 0) {
|
|
98796
|
+
if (items.length === 0 && selection.size() > 0 && !selection.isCompactSelection()) {
|
|
98620
98797
|
const paths = selection.getCheckedPaths();
|
|
98621
98798
|
if (paths.length > 0) {
|
|
98622
98799
|
items = CascaderUtilsPro.getAggregatedSelectedItems(paths, this.filteredOptions, this.cascaderProps);
|
|
98623
98800
|
}
|
|
98624
98801
|
}
|
|
98625
|
-
if (items.length === 0 && this.hasExternalValue()) {
|
|
98626
|
-
const paths = this.resolveExternalValueToPaths();
|
|
98627
|
-
if (paths.length > 0) {
|
|
98628
|
-
items = CascaderUtilsPro.getAggregatedSelectedItems(paths, this.filteredOptions, this.cascaderProps);
|
|
98629
|
-
}
|
|
98630
|
-
}
|
|
98631
98802
|
this.selectedItems = items;
|
|
98632
98803
|
this.selectedCount = items.length;
|
|
98633
98804
|
this.isAllSelected = selection.size() === store.totalLeafCount && store.totalLeafCount > 0;
|
|
@@ -98648,18 +98819,18 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98648
98819
|
this.updateSelectedItems();
|
|
98649
98820
|
panel.bumpSelectionView();
|
|
98650
98821
|
},
|
|
98651
|
-
|
|
98652
|
-
|
|
98653
|
-
|
|
98654
|
-
|
|
98655
|
-
|
|
98656
|
-
|
|
98657
|
-
|
|
98658
|
-
|
|
98659
|
-
|
|
98660
|
-
|
|
98822
|
+
/**
|
|
98823
|
+
* 用户操作(勾选/全选/清除/删除)统一提交:更新展示 + emit,标记内部更新防回显覆盖
|
|
98824
|
+
*/
|
|
98825
|
+
commitUserSelectionChange() {
|
|
98826
|
+
this.isInternalUpdate = true;
|
|
98827
|
+
this.applyPanelSelectionChange();
|
|
98828
|
+
},
|
|
98829
|
+
/**
|
|
98830
|
+
* 向父组件 emit 当前选中(仅用户操作路径调用,外部回显走 syncPanelFromExternalValue 不 emit)
|
|
98831
|
+
*/
|
|
98832
|
+
emitSelectionToParent() {
|
|
98661
98833
|
if (this.aggregationMode) {
|
|
98662
|
-
this.isInternalUpdate = true;
|
|
98663
98834
|
let emitValue = CascaderUtilsPro.getAggregatedEmitValues(this.selectedItems, this.parentNodePrefix);
|
|
98664
98835
|
if (!this.isMultiple && emitValue.length > 0) {
|
|
98665
98836
|
emitValue = emitValue[0];
|
|
@@ -98668,25 +98839,28 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98668
98839
|
this.$emit('change', this.getSelectedData());
|
|
98669
98840
|
return;
|
|
98670
98841
|
}
|
|
98671
|
-
|
|
98672
|
-
|
|
98842
|
+
const panel = this.$refs.cascaderPanel;
|
|
98843
|
+
const isCompact = panel && panel.selection && panel.selection.isCompactSelection();
|
|
98844
|
+
if (isCompact) {
|
|
98673
98845
|
this.$emit('input', this.currentValue);
|
|
98674
98846
|
this.$emit('change', this.getSelectedData());
|
|
98675
98847
|
return;
|
|
98676
98848
|
}
|
|
98677
98849
|
this.$nextTick(() => {
|
|
98678
|
-
this.isInternalUpdate = true;
|
|
98679
98850
|
let emitValue = this.currentValue;
|
|
98680
|
-
if (this.aggregationMode) {
|
|
98681
|
-
emitValue = CascaderUtilsPro.getAggregatedEmitValues(this.selectedItems, this.parentNodePrefix);
|
|
98682
|
-
if (!this.isMultiple && emitValue.length > 0) {
|
|
98683
|
-
emitValue = emitValue[0];
|
|
98684
|
-
}
|
|
98685
|
-
}
|
|
98686
98851
|
this.$emit('input', emitValue);
|
|
98687
98852
|
this.$emit('change', this.getSelectedData());
|
|
98688
98853
|
});
|
|
98689
98854
|
},
|
|
98855
|
+
applyPanelSelectionChange() {
|
|
98856
|
+
const panel = this.$refs.cascaderPanel;
|
|
98857
|
+
if (panel && panel.store && panel.selection) {
|
|
98858
|
+
this.refreshSelectionDisplayFromPanel();
|
|
98859
|
+
} else if (!this.aggregationMode) {
|
|
98860
|
+
this.updateSelectedItems();
|
|
98861
|
+
}
|
|
98862
|
+
this.emitSelectionToParent();
|
|
98863
|
+
},
|
|
98690
98864
|
buildSelectedItemsFromValuesLazy(panel) {
|
|
98691
98865
|
if (!panel || !panel.selection) {
|
|
98692
98866
|
return [];
|
|
@@ -98701,6 +98875,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98701
98875
|
if (!panel || !panel.selection || !panel.store) {
|
|
98702
98876
|
return false;
|
|
98703
98877
|
}
|
|
98878
|
+
this.isExternalSync = true;
|
|
98704
98879
|
if (!this.hasExternalValue()) {
|
|
98705
98880
|
if (panel.selection) {
|
|
98706
98881
|
panel.selection.clear();
|
|
@@ -98708,6 +98883,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98708
98883
|
}
|
|
98709
98884
|
this.selectedItems = [];
|
|
98710
98885
|
this.selectedValues = [];
|
|
98886
|
+
this.isExternalSync = false;
|
|
98711
98887
|
return true;
|
|
98712
98888
|
}
|
|
98713
98889
|
panel.selection.clear();
|
|
@@ -98718,6 +98894,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98718
98894
|
panel.bumpSelectionView();
|
|
98719
98895
|
this.refreshSelectionDisplayFromPanel();
|
|
98720
98896
|
this.expandPanelToExternalValue(panel);
|
|
98897
|
+
this.isExternalSync = false;
|
|
98721
98898
|
return true;
|
|
98722
98899
|
},
|
|
98723
98900
|
hasExternalValue() {
|
|
@@ -98730,15 +98907,6 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98730
98907
|
}
|
|
98731
98908
|
return true;
|
|
98732
98909
|
},
|
|
98733
|
-
applyExternalValueToPanelSelection(panel) {
|
|
98734
|
-
const {
|
|
98735
|
-
store,
|
|
98736
|
-
selection
|
|
98737
|
-
} = panel;
|
|
98738
|
-
this.getExternalValueList().forEach(val => {
|
|
98739
|
-
CascaderUtilsPro.addValueToSelection(store, selection, val, this.filteredOptions, this.cascaderProps, this.parentNodePrefix);
|
|
98740
|
-
});
|
|
98741
|
-
},
|
|
98742
98910
|
getExternalValueList() {
|
|
98743
98911
|
const val = this.value;
|
|
98744
98912
|
if (val == null || val === '') {
|
|
@@ -98762,6 +98930,9 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98762
98930
|
}
|
|
98763
98931
|
},
|
|
98764
98932
|
schedulePanelSyncFromExternalValue(retry = 0) {
|
|
98933
|
+
if (this.isInternalUpdate || this.isExternalSync) {
|
|
98934
|
+
return;
|
|
98935
|
+
}
|
|
98765
98936
|
this.clearPanelSyncTimer();
|
|
98766
98937
|
this.$nextTick(() => {
|
|
98767
98938
|
if (!this.hasExternalValue()) {
|
|
@@ -99009,7 +99180,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99009
99180
|
const paths = [];
|
|
99010
99181
|
panel.selection.selectedLeafSet.forEach(leaf => {
|
|
99011
99182
|
if (searchLeafSet.has(leaf)) {
|
|
99012
|
-
const path = panel.store
|
|
99183
|
+
const path = getStoreLeafPath(panel.store, leaf);
|
|
99013
99184
|
if (path) {
|
|
99014
99185
|
paths.push(path);
|
|
99015
99186
|
}
|
|
@@ -99049,9 +99220,9 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99049
99220
|
this.$refs.searchCascaderPanel.expandPathValues([firstOption[valueKey]], true);
|
|
99050
99221
|
}
|
|
99051
99222
|
},
|
|
99052
|
-
//
|
|
99223
|
+
// 值变化处理(面板勾选)
|
|
99053
99224
|
handleValueChange() {
|
|
99054
|
-
this.
|
|
99225
|
+
this.commitUserSelectionChange();
|
|
99055
99226
|
},
|
|
99056
99227
|
// 搜索模式值变化处理
|
|
99057
99228
|
handleSearchValueChange() {
|
|
@@ -99072,7 +99243,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99072
99243
|
});
|
|
99073
99244
|
mainPanel.selection._reconcileAllRoots();
|
|
99074
99245
|
mainPanel.bumpSelectionView();
|
|
99075
|
-
this.
|
|
99246
|
+
this.commitUserSelectionChange();
|
|
99076
99247
|
},
|
|
99077
99248
|
// 移除已选项
|
|
99078
99249
|
removeItem(item, index) {
|
|
@@ -99100,7 +99271,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99100
99271
|
panel.selection.toggleNode(node.id, false);
|
|
99101
99272
|
}
|
|
99102
99273
|
}
|
|
99103
|
-
this.
|
|
99274
|
+
this.commitUserSelectionChange();
|
|
99104
99275
|
if (this.isShowSearch) {
|
|
99105
99276
|
this.syncSearchPanelSelection();
|
|
99106
99277
|
}
|
|
@@ -99126,32 +99297,35 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99126
99297
|
this.$emit('input', emitValue);
|
|
99127
99298
|
});
|
|
99128
99299
|
},
|
|
99300
|
+
clearPanelSelectionState(panel) {
|
|
99301
|
+
if (!panel || !panel.selection) {
|
|
99302
|
+
return;
|
|
99303
|
+
}
|
|
99304
|
+
panel.selection.clear();
|
|
99305
|
+
panel.bumpSelectionView();
|
|
99306
|
+
},
|
|
99129
99307
|
// 全选/取消全选
|
|
99130
99308
|
handleSelectAll() {
|
|
99131
99309
|
if (!this.isMultiple) {
|
|
99132
|
-
// 单选模式下不支持全选
|
|
99133
99310
|
return;
|
|
99134
99311
|
}
|
|
99312
|
+
const panel = this.$refs.cascaderPanel;
|
|
99313
|
+
const searchPanel = this.$refs.searchCascaderPanel;
|
|
99135
99314
|
if (this.isAllSelected) {
|
|
99136
|
-
|
|
99137
|
-
|
|
99138
|
-
|
|
99139
|
-
|
|
99140
|
-
|
|
99141
|
-
|
|
99142
|
-
|
|
99143
|
-
|
|
99315
|
+
this.clearPanelSelectionState(panel);
|
|
99316
|
+
this.clearPanelSelectionState(searchPanel);
|
|
99317
|
+
this.selectedValues = [];
|
|
99318
|
+
this.searchSelectedValues = [];
|
|
99319
|
+
} else if (panel && panel.selection) {
|
|
99320
|
+
panel.selection.selectAll();
|
|
99321
|
+
panel.bumpSelectionView();
|
|
99322
|
+
if (searchPanel && searchPanel.selection) {
|
|
99323
|
+
this.syncSearchPanelSelection();
|
|
99144
99324
|
}
|
|
99145
99325
|
} else {
|
|
99146
|
-
|
|
99147
|
-
if (panel) {
|
|
99148
|
-
panel.selectAllLeaves();
|
|
99149
|
-
} else {
|
|
99150
|
-
this.selectedValues = CascaderUtilsPro.getAllLeafPaths(this.filteredOptions, this.disabledConfig, this.cascaderProps);
|
|
99151
|
-
this.updateSelectedItems();
|
|
99152
|
-
this.applyPanelSelectionChange();
|
|
99153
|
-
}
|
|
99326
|
+
this.selectedValues = CascaderUtilsPro.getAllLeafPaths(this.filteredOptions, this.disabledConfig, this.cascaderProps);
|
|
99154
99327
|
}
|
|
99328
|
+
this.commitUserSelectionChange();
|
|
99155
99329
|
},
|
|
99156
99330
|
// 获取选中的数据
|
|
99157
99331
|
getSelectedData() {
|
|
@@ -99177,14 +99351,12 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99177
99351
|
// 清空选择
|
|
99178
99352
|
clearSelection() {
|
|
99179
99353
|
const panel = this.$refs.cascaderPanel;
|
|
99180
|
-
|
|
99181
|
-
|
|
99182
|
-
|
|
99183
|
-
|
|
99184
|
-
|
|
99185
|
-
|
|
99186
|
-
this.applyPanelSelectionChange();
|
|
99187
|
-
}
|
|
99354
|
+
const searchPanel = this.$refs.searchCascaderPanel;
|
|
99355
|
+
this.clearPanelSelectionState(panel);
|
|
99356
|
+
this.clearPanelSelectionState(searchPanel);
|
|
99357
|
+
this.selectedValues = [];
|
|
99358
|
+
this.searchSelectedValues = [];
|
|
99359
|
+
this.commitUserSelectionChange();
|
|
99188
99360
|
},
|
|
99189
99361
|
// 设置选择值
|
|
99190
99362
|
setValue(values) {
|
|
@@ -99283,7 +99455,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99283
99455
|
});
|
|
99284
99456
|
panel.selection._reconcileAllRoots();
|
|
99285
99457
|
panel.bumpSelectionView();
|
|
99286
|
-
this.
|
|
99458
|
+
this.commitUserSelectionChange();
|
|
99287
99459
|
} else {
|
|
99288
99460
|
const newSelectedValues = [...this.selectedValues];
|
|
99289
99461
|
matchedPaths.forEach(path => {
|
|
@@ -99328,7 +99500,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99328
99500
|
});
|
|
99329
99501
|
|
|
99330
99502
|
// 检查是否为叶子节点且匹配且未禁用
|
|
99331
|
-
const isLeafNode =
|
|
99503
|
+
const isLeafNode = CascaderUtilsPro.isTreeLeafNode(option, this.cascaderProps);
|
|
99332
99504
|
const isNotDisabled = !this.isItemDisabled(option);
|
|
99333
99505
|
if (isMatched && isLeafNode && isNotDisabled) {
|
|
99334
99506
|
// 如果是叶子节点、匹配且未禁用,添加到结果中
|
|
@@ -99381,8 +99553,8 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99381
99553
|
;
|
|
99382
99554
|
var ByCascaderPanelPro_component = normalizeComponent(
|
|
99383
99555
|
cascader_panel_pro_ByCascaderPanelProvue_type_script_lang_js,
|
|
99384
|
-
|
|
99385
|
-
|
|
99556
|
+
ByCascaderPanelProvue_type_template_id_e4b10a08_render,
|
|
99557
|
+
ByCascaderPanelProvue_type_template_id_e4b10a08_staticRenderFns,
|
|
99386
99558
|
false,
|
|
99387
99559
|
null,
|
|
99388
99560
|
null,
|