@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
package/lib/by-components.umd.js
CHANGED
|
@@ -74538,8 +74538,8 @@ var component = normalizeComponent(
|
|
|
74538
74538
|
)
|
|
74539
74539
|
|
|
74540
74540
|
/* harmony default export */ var pager = (component.exports);
|
|
74541
|
-
;// ./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-82.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=
|
|
74542
|
-
var
|
|
74541
|
+
;// ./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-82.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
|
|
74542
|
+
var tablevue_type_template_id_552fb22a_render = function render() {
|
|
74543
74543
|
var _vm = this,
|
|
74544
74544
|
_c = _vm._self._c;
|
|
74545
74545
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -74570,7 +74570,17 @@ var tablevue_type_template_id_f5e98ace_render = function render() {
|
|
|
74570
74570
|
on: {
|
|
74571
74571
|
"click": _vm.resetCachedTableColumns
|
|
74572
74572
|
}
|
|
74573
|
-
}, [_vm._v(" 重置列宽 ")]) : _vm._e()], 1), _c('by-pager', {
|
|
74573
|
+
}, [_vm._v(" 重置列宽 ")]) : _vm._e()], 1), _vm.useUnknownTotalPager ? _c('by-pager-unknown-total', {
|
|
74574
|
+
attrs: {
|
|
74575
|
+
"page": _vm.options.pagerConfig.currentPage,
|
|
74576
|
+
"limit": _vm.options.pagerConfig.pageSize,
|
|
74577
|
+
"page-sizes": _vm.options.pagerConfig.pageSizes,
|
|
74578
|
+
"current-count": _vm.currentPageDataCount
|
|
74579
|
+
},
|
|
74580
|
+
on: {
|
|
74581
|
+
"onChange": _vm.pageChange
|
|
74582
|
+
}
|
|
74583
|
+
}) : _c('by-pager', {
|
|
74574
74584
|
attrs: {
|
|
74575
74585
|
"page": _vm.options.pagerConfig.currentPage,
|
|
74576
74586
|
"limit": _vm.options.pagerConfig.pageSize,
|
|
@@ -74624,7 +74634,7 @@ var tablevue_type_template_id_f5e98ace_render = function render() {
|
|
|
74624
74634
|
}
|
|
74625
74635
|
}) : _vm._e()], 1);
|
|
74626
74636
|
};
|
|
74627
|
-
var
|
|
74637
|
+
var tablevue_type_template_id_552fb22a_staticRenderFns = [];
|
|
74628
74638
|
|
|
74629
74639
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
74630
74640
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -77299,6 +77309,160 @@ var custom_column_component = normalizeComponent(
|
|
|
77299
77309
|
)
|
|
77300
77310
|
|
|
77301
77311
|
/* harmony default export */ var custom_column = (custom_column_component.exports);
|
|
77312
|
+
;// ./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-82.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
|
|
77313
|
+
var pager_unknown_totalvue_type_template_id_1208560e_render = function render() {
|
|
77314
|
+
var _vm = this,
|
|
77315
|
+
_c = _vm._self._c;
|
|
77316
|
+
return _c('div', {
|
|
77317
|
+
staticClass: "by-pager-unknown-total"
|
|
77318
|
+
}, [_c('div', {
|
|
77319
|
+
staticClass: "by-pager-unknown-total__inner"
|
|
77320
|
+
}, [_vm.pager.page > 1 ? _c('button', {
|
|
77321
|
+
staticClass: "by-pager-unknown-total__btn-home",
|
|
77322
|
+
attrs: {
|
|
77323
|
+
"type": "button"
|
|
77324
|
+
},
|
|
77325
|
+
on: {
|
|
77326
|
+
"click": function ($event) {
|
|
77327
|
+
return _vm.changePage(1);
|
|
77328
|
+
}
|
|
77329
|
+
}
|
|
77330
|
+
}, [_c('span', {
|
|
77331
|
+
staticClass: "by-pager-unknown-total__btn-home-icon",
|
|
77332
|
+
attrs: {
|
|
77333
|
+
"aria-hidden": "true"
|
|
77334
|
+
}
|
|
77335
|
+
}, [_vm._v("‹")]), _vm._v("回首页 ")]) : _vm._e(), _c('button', {
|
|
77336
|
+
staticClass: "by-pager-unknown-total__btn",
|
|
77337
|
+
attrs: {
|
|
77338
|
+
"type": "button",
|
|
77339
|
+
"disabled": _vm.pager.page <= 1
|
|
77340
|
+
},
|
|
77341
|
+
on: {
|
|
77342
|
+
"click": function ($event) {
|
|
77343
|
+
return _vm.changePage(_vm.pager.page - 1);
|
|
77344
|
+
}
|
|
77345
|
+
}
|
|
77346
|
+
}, [_vm._v(" 上一页 ")]), _c('span', {
|
|
77347
|
+
staticClass: "by-pager-unknown-total__page"
|
|
77348
|
+
}, [_vm._v("第 " + _vm._s(_vm.pager.page) + " 页")]), _c('button', {
|
|
77349
|
+
staticClass: "by-pager-unknown-total__btn",
|
|
77350
|
+
attrs: {
|
|
77351
|
+
"type": "button",
|
|
77352
|
+
"disabled": _vm.isLastPage
|
|
77353
|
+
},
|
|
77354
|
+
on: {
|
|
77355
|
+
"click": function ($event) {
|
|
77356
|
+
return _vm.changePage(_vm.pager.page + 1);
|
|
77357
|
+
}
|
|
77358
|
+
}
|
|
77359
|
+
}, [_vm._v(" 下一页 ")]), _c('el-select', {
|
|
77360
|
+
staticClass: "by-pager-unknown-total__sizes",
|
|
77361
|
+
attrs: {
|
|
77362
|
+
"value": _vm.pager.limit,
|
|
77363
|
+
"popper-class": "by-pager-unknown-total__sizes-popper"
|
|
77364
|
+
},
|
|
77365
|
+
on: {
|
|
77366
|
+
"change": value => _vm.handleValueChange(value, 'limit')
|
|
77367
|
+
}
|
|
77368
|
+
}, _vm._l(_vm.pageSizes, function (size) {
|
|
77369
|
+
return _c('el-option', {
|
|
77370
|
+
key: size,
|
|
77371
|
+
attrs: {
|
|
77372
|
+
"label": `${size}条/页`,
|
|
77373
|
+
"value": size
|
|
77374
|
+
}
|
|
77375
|
+
});
|
|
77376
|
+
}), 1)], 1)]);
|
|
77377
|
+
};
|
|
77378
|
+
var pager_unknown_totalvue_type_template_id_1208560e_staticRenderFns = [];
|
|
77379
|
+
|
|
77380
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
77381
|
+
/* harmony default export */ var pager_unknown_totalvue_type_script_lang_js = ({
|
|
77382
|
+
name: 'ByPagerUnknownTotal',
|
|
77383
|
+
props: {
|
|
77384
|
+
limit: {
|
|
77385
|
+
type: Number,
|
|
77386
|
+
default: 15
|
|
77387
|
+
},
|
|
77388
|
+
page: {
|
|
77389
|
+
type: Number,
|
|
77390
|
+
default: 1
|
|
77391
|
+
},
|
|
77392
|
+
pageSizes: {
|
|
77393
|
+
type: Array,
|
|
77394
|
+
default: () => [10, 15, 20, 25, 30, 50, 100]
|
|
77395
|
+
},
|
|
77396
|
+
currentCount: {
|
|
77397
|
+
type: Number,
|
|
77398
|
+
default: 0
|
|
77399
|
+
}
|
|
77400
|
+
},
|
|
77401
|
+
data() {
|
|
77402
|
+
return {
|
|
77403
|
+
pager: {
|
|
77404
|
+
page: this.page,
|
|
77405
|
+
limit: this.limit
|
|
77406
|
+
}
|
|
77407
|
+
};
|
|
77408
|
+
},
|
|
77409
|
+
computed: {
|
|
77410
|
+
isLastPage() {
|
|
77411
|
+
return this.currentCount < this.pager.limit;
|
|
77412
|
+
}
|
|
77413
|
+
},
|
|
77414
|
+
watch: {
|
|
77415
|
+
page: {
|
|
77416
|
+
handler(val) {
|
|
77417
|
+
this.pager.page = val;
|
|
77418
|
+
},
|
|
77419
|
+
immediate: true
|
|
77420
|
+
},
|
|
77421
|
+
limit: {
|
|
77422
|
+
handler(val) {
|
|
77423
|
+
this.pager.limit = val;
|
|
77424
|
+
},
|
|
77425
|
+
immediate: true
|
|
77426
|
+
}
|
|
77427
|
+
},
|
|
77428
|
+
methods: {
|
|
77429
|
+
changePage(page) {
|
|
77430
|
+
if (page < 1 || page > this.pager.page && this.isLastPage) return;
|
|
77431
|
+
this.handleValueChange(page, 'page');
|
|
77432
|
+
},
|
|
77433
|
+
handleValueChange(value, field) {
|
|
77434
|
+
if (!value) return;
|
|
77435
|
+
const values = {
|
|
77436
|
+
...this.pager,
|
|
77437
|
+
[field]: value,
|
|
77438
|
+
page: field === 'limit' ? 1 : value
|
|
77439
|
+
};
|
|
77440
|
+
this.$emit('onChange', values);
|
|
77441
|
+
}
|
|
77442
|
+
}
|
|
77443
|
+
});
|
|
77444
|
+
;// ./src/components/pager-unknown-total/index.vue?vue&type=script&lang=js
|
|
77445
|
+
/* harmony default export */ var components_pager_unknown_totalvue_type_script_lang_js = (pager_unknown_totalvue_type_script_lang_js);
|
|
77446
|
+
;// ./src/components/pager-unknown-total/index.vue
|
|
77447
|
+
|
|
77448
|
+
|
|
77449
|
+
|
|
77450
|
+
|
|
77451
|
+
|
|
77452
|
+
/* normalize component */
|
|
77453
|
+
;
|
|
77454
|
+
var pager_unknown_total_component = normalizeComponent(
|
|
77455
|
+
components_pager_unknown_totalvue_type_script_lang_js,
|
|
77456
|
+
pager_unknown_totalvue_type_template_id_1208560e_render,
|
|
77457
|
+
pager_unknown_totalvue_type_template_id_1208560e_staticRenderFns,
|
|
77458
|
+
false,
|
|
77459
|
+
null,
|
|
77460
|
+
null,
|
|
77461
|
+
null
|
|
77462
|
+
|
|
77463
|
+
)
|
|
77464
|
+
|
|
77465
|
+
/* harmony default export */ var pager_unknown_total = (pager_unknown_total_component.exports);
|
|
77302
77466
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
77303
77467
|
|
|
77304
77468
|
|
|
@@ -77315,10 +77479,12 @@ var custom_column_component = normalizeComponent(
|
|
|
77315
77479
|
|
|
77316
77480
|
|
|
77317
77481
|
|
|
77482
|
+
|
|
77318
77483
|
/* harmony default export */ var tablevue_type_script_lang_js = ({
|
|
77319
77484
|
name: 'ByTable',
|
|
77320
77485
|
components: {
|
|
77321
|
-
CustomColumn: custom_column
|
|
77486
|
+
CustomColumn: custom_column,
|
|
77487
|
+
ByPagerUnknownTotal: pager_unknown_total
|
|
77322
77488
|
},
|
|
77323
77489
|
props: {
|
|
77324
77490
|
/**
|
|
@@ -77571,6 +77737,13 @@ var custom_column_component = normalizeComponent(
|
|
|
77571
77737
|
...otherConfigs
|
|
77572
77738
|
};
|
|
77573
77739
|
},
|
|
77740
|
+
useUnknownTotalPager() {
|
|
77741
|
+
const pagerConfig = this.gridOptions.pagerConfig;
|
|
77742
|
+
return !!(pagerConfig && pagerConfig.total === -1 && !pagerConfig.frontendPagination);
|
|
77743
|
+
},
|
|
77744
|
+
currentPageDataCount() {
|
|
77745
|
+
return (this.gridOptions.data || []).length;
|
|
77746
|
+
},
|
|
77574
77747
|
// 插槽集合
|
|
77575
77748
|
slotMap() {
|
|
77576
77749
|
var _this$gridOptions$cus, _this$gridOptions, _this$gridOptions$cus2;
|
|
@@ -78259,8 +78432,8 @@ var custom_column_component = normalizeComponent(
|
|
|
78259
78432
|
;
|
|
78260
78433
|
var table_component = normalizeComponent(
|
|
78261
78434
|
components_tablevue_type_script_lang_js,
|
|
78262
|
-
|
|
78263
|
-
|
|
78435
|
+
tablevue_type_template_id_552fb22a_render,
|
|
78436
|
+
tablevue_type_template_id_552fb22a_staticRenderFns,
|
|
78264
78437
|
false,
|
|
78265
78438
|
null,
|
|
78266
78439
|
null,
|
|
@@ -96025,8 +96198,8 @@ var ByCascaderPanel_component = normalizeComponent(
|
|
|
96025
96198
|
)
|
|
96026
96199
|
|
|
96027
96200
|
/* harmony default export */ var ByCascaderPanel = (ByCascaderPanel_component.exports);
|
|
96028
|
-
;// ./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-82.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=
|
|
96029
|
-
var
|
|
96201
|
+
;// ./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-82.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
|
|
96202
|
+
var ByCascaderPanelProvue_type_template_id_e4b10a08_render = function render() {
|
|
96030
96203
|
var _vm = this,
|
|
96031
96204
|
_c = _vm._self._c;
|
|
96032
96205
|
return _c('div', {
|
|
@@ -96268,7 +96441,7 @@ var ByCascaderPanelProvue_type_template_id_075d43fb_render = function render() {
|
|
|
96268
96441
|
staticClass: "empty-state"
|
|
96269
96442
|
}, [_vm._v("暂无选中项")])], 1)])])])]);
|
|
96270
96443
|
};
|
|
96271
|
-
var
|
|
96444
|
+
var ByCascaderPanelProvue_type_template_id_e4b10a08_staticRenderFns = [];
|
|
96272
96445
|
|
|
96273
96446
|
;// ./src/components/cascader-panel-pro/cascaderStorePro.js
|
|
96274
96447
|
|
|
@@ -98442,7 +98615,9 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98442
98615
|
// 紧凑模式下稳定的空 value 引用,避免 watch 误触发清空
|
|
98443
98616
|
searchDebounceTimer: null,
|
|
98444
98617
|
searchLeafSetCache: null,
|
|
98445
|
-
panelSyncTimer: null
|
|
98618
|
+
panelSyncTimer: null,
|
|
98619
|
+
// 外部 v-model 回显同步中,避免与用户操作冲突
|
|
98620
|
+
isExternalSync: false
|
|
98446
98621
|
};
|
|
98447
98622
|
},
|
|
98448
98623
|
computed: {
|
|
@@ -98577,6 +98752,8 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98577
98752
|
} else {
|
|
98578
98753
|
this.isAllSelected = this.selectedCount === this.totalCount;
|
|
98579
98754
|
}
|
|
98755
|
+
} else if (panel && panel.store && panel.selection && this.aggregationMode) {
|
|
98756
|
+
this.isAllSelected = panel.selection.size() === panel.store.totalLeafCount && panel.store.totalLeafCount > 0;
|
|
98580
98757
|
}
|
|
98581
98758
|
} else {
|
|
98582
98759
|
if (newVal.length > 1) {
|
|
@@ -98626,18 +98803,12 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98626
98803
|
} = panel;
|
|
98627
98804
|
if (this.aggregationMode) {
|
|
98628
98805
|
let items = CascaderUtilsPro.getAggregatedItemsFromSelection(store, selection, this.filteredOptions, this.cascaderProps);
|
|
98629
|
-
if (items.length === 0 && selection.size() > 0) {
|
|
98806
|
+
if (items.length === 0 && selection.size() > 0 && !selection.isCompactSelection()) {
|
|
98630
98807
|
const paths = selection.getCheckedPaths();
|
|
98631
98808
|
if (paths.length > 0) {
|
|
98632
98809
|
items = CascaderUtilsPro.getAggregatedSelectedItems(paths, this.filteredOptions, this.cascaderProps);
|
|
98633
98810
|
}
|
|
98634
98811
|
}
|
|
98635
|
-
if (items.length === 0 && this.hasExternalValue()) {
|
|
98636
|
-
const paths = this.resolveExternalValueToPaths();
|
|
98637
|
-
if (paths.length > 0) {
|
|
98638
|
-
items = CascaderUtilsPro.getAggregatedSelectedItems(paths, this.filteredOptions, this.cascaderProps);
|
|
98639
|
-
}
|
|
98640
|
-
}
|
|
98641
98812
|
this.selectedItems = items;
|
|
98642
98813
|
this.selectedCount = items.length;
|
|
98643
98814
|
this.isAllSelected = selection.size() === store.totalLeafCount && store.totalLeafCount > 0;
|
|
@@ -98658,18 +98829,18 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98658
98829
|
this.updateSelectedItems();
|
|
98659
98830
|
panel.bumpSelectionView();
|
|
98660
98831
|
},
|
|
98661
|
-
|
|
98662
|
-
|
|
98663
|
-
|
|
98664
|
-
|
|
98665
|
-
|
|
98666
|
-
|
|
98667
|
-
|
|
98668
|
-
|
|
98669
|
-
|
|
98670
|
-
|
|
98832
|
+
/**
|
|
98833
|
+
* 用户操作(勾选/全选/清除/删除)统一提交:更新展示 + emit,标记内部更新防回显覆盖
|
|
98834
|
+
*/
|
|
98835
|
+
commitUserSelectionChange() {
|
|
98836
|
+
this.isInternalUpdate = true;
|
|
98837
|
+
this.applyPanelSelectionChange();
|
|
98838
|
+
},
|
|
98839
|
+
/**
|
|
98840
|
+
* 向父组件 emit 当前选中(仅用户操作路径调用,外部回显走 syncPanelFromExternalValue 不 emit)
|
|
98841
|
+
*/
|
|
98842
|
+
emitSelectionToParent() {
|
|
98671
98843
|
if (this.aggregationMode) {
|
|
98672
|
-
this.isInternalUpdate = true;
|
|
98673
98844
|
let emitValue = CascaderUtilsPro.getAggregatedEmitValues(this.selectedItems, this.parentNodePrefix);
|
|
98674
98845
|
if (!this.isMultiple && emitValue.length > 0) {
|
|
98675
98846
|
emitValue = emitValue[0];
|
|
@@ -98678,25 +98849,28 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98678
98849
|
this.$emit('change', this.getSelectedData());
|
|
98679
98850
|
return;
|
|
98680
98851
|
}
|
|
98681
|
-
|
|
98682
|
-
|
|
98852
|
+
const panel = this.$refs.cascaderPanel;
|
|
98853
|
+
const isCompact = panel && panel.selection && panel.selection.isCompactSelection();
|
|
98854
|
+
if (isCompact) {
|
|
98683
98855
|
this.$emit('input', this.currentValue);
|
|
98684
98856
|
this.$emit('change', this.getSelectedData());
|
|
98685
98857
|
return;
|
|
98686
98858
|
}
|
|
98687
98859
|
this.$nextTick(() => {
|
|
98688
|
-
this.isInternalUpdate = true;
|
|
98689
98860
|
let emitValue = this.currentValue;
|
|
98690
|
-
if (this.aggregationMode) {
|
|
98691
|
-
emitValue = CascaderUtilsPro.getAggregatedEmitValues(this.selectedItems, this.parentNodePrefix);
|
|
98692
|
-
if (!this.isMultiple && emitValue.length > 0) {
|
|
98693
|
-
emitValue = emitValue[0];
|
|
98694
|
-
}
|
|
98695
|
-
}
|
|
98696
98861
|
this.$emit('input', emitValue);
|
|
98697
98862
|
this.$emit('change', this.getSelectedData());
|
|
98698
98863
|
});
|
|
98699
98864
|
},
|
|
98865
|
+
applyPanelSelectionChange() {
|
|
98866
|
+
const panel = this.$refs.cascaderPanel;
|
|
98867
|
+
if (panel && panel.store && panel.selection) {
|
|
98868
|
+
this.refreshSelectionDisplayFromPanel();
|
|
98869
|
+
} else if (!this.aggregationMode) {
|
|
98870
|
+
this.updateSelectedItems();
|
|
98871
|
+
}
|
|
98872
|
+
this.emitSelectionToParent();
|
|
98873
|
+
},
|
|
98700
98874
|
buildSelectedItemsFromValuesLazy(panel) {
|
|
98701
98875
|
if (!panel || !panel.selection) {
|
|
98702
98876
|
return [];
|
|
@@ -98711,6 +98885,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98711
98885
|
if (!panel || !panel.selection || !panel.store) {
|
|
98712
98886
|
return false;
|
|
98713
98887
|
}
|
|
98888
|
+
this.isExternalSync = true;
|
|
98714
98889
|
if (!this.hasExternalValue()) {
|
|
98715
98890
|
if (panel.selection) {
|
|
98716
98891
|
panel.selection.clear();
|
|
@@ -98718,6 +98893,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98718
98893
|
}
|
|
98719
98894
|
this.selectedItems = [];
|
|
98720
98895
|
this.selectedValues = [];
|
|
98896
|
+
this.isExternalSync = false;
|
|
98721
98897
|
return true;
|
|
98722
98898
|
}
|
|
98723
98899
|
panel.selection.clear();
|
|
@@ -98728,6 +98904,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98728
98904
|
panel.bumpSelectionView();
|
|
98729
98905
|
this.refreshSelectionDisplayFromPanel();
|
|
98730
98906
|
this.expandPanelToExternalValue(panel);
|
|
98907
|
+
this.isExternalSync = false;
|
|
98731
98908
|
return true;
|
|
98732
98909
|
},
|
|
98733
98910
|
hasExternalValue() {
|
|
@@ -98740,15 +98917,6 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98740
98917
|
}
|
|
98741
98918
|
return true;
|
|
98742
98919
|
},
|
|
98743
|
-
applyExternalValueToPanelSelection(panel) {
|
|
98744
|
-
const {
|
|
98745
|
-
store,
|
|
98746
|
-
selection
|
|
98747
|
-
} = panel;
|
|
98748
|
-
this.getExternalValueList().forEach(val => {
|
|
98749
|
-
CascaderUtilsPro.addValueToSelection(store, selection, val, this.filteredOptions, this.cascaderProps, this.parentNodePrefix);
|
|
98750
|
-
});
|
|
98751
|
-
},
|
|
98752
98920
|
getExternalValueList() {
|
|
98753
98921
|
const val = this.value;
|
|
98754
98922
|
if (val == null || val === '') {
|
|
@@ -98772,6 +98940,9 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
98772
98940
|
}
|
|
98773
98941
|
},
|
|
98774
98942
|
schedulePanelSyncFromExternalValue(retry = 0) {
|
|
98943
|
+
if (this.isInternalUpdate || this.isExternalSync) {
|
|
98944
|
+
return;
|
|
98945
|
+
}
|
|
98775
98946
|
this.clearPanelSyncTimer();
|
|
98776
98947
|
this.$nextTick(() => {
|
|
98777
98948
|
if (!this.hasExternalValue()) {
|
|
@@ -99019,7 +99190,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99019
99190
|
const paths = [];
|
|
99020
99191
|
panel.selection.selectedLeafSet.forEach(leaf => {
|
|
99021
99192
|
if (searchLeafSet.has(leaf)) {
|
|
99022
|
-
const path = panel.store
|
|
99193
|
+
const path = getStoreLeafPath(panel.store, leaf);
|
|
99023
99194
|
if (path) {
|
|
99024
99195
|
paths.push(path);
|
|
99025
99196
|
}
|
|
@@ -99059,9 +99230,9 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99059
99230
|
this.$refs.searchCascaderPanel.expandPathValues([firstOption[valueKey]], true);
|
|
99060
99231
|
}
|
|
99061
99232
|
},
|
|
99062
|
-
//
|
|
99233
|
+
// 值变化处理(面板勾选)
|
|
99063
99234
|
handleValueChange() {
|
|
99064
|
-
this.
|
|
99235
|
+
this.commitUserSelectionChange();
|
|
99065
99236
|
},
|
|
99066
99237
|
// 搜索模式值变化处理
|
|
99067
99238
|
handleSearchValueChange() {
|
|
@@ -99082,7 +99253,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99082
99253
|
});
|
|
99083
99254
|
mainPanel.selection._reconcileAllRoots();
|
|
99084
99255
|
mainPanel.bumpSelectionView();
|
|
99085
|
-
this.
|
|
99256
|
+
this.commitUserSelectionChange();
|
|
99086
99257
|
},
|
|
99087
99258
|
// 移除已选项
|
|
99088
99259
|
removeItem(item, index) {
|
|
@@ -99110,7 +99281,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99110
99281
|
panel.selection.toggleNode(node.id, false);
|
|
99111
99282
|
}
|
|
99112
99283
|
}
|
|
99113
|
-
this.
|
|
99284
|
+
this.commitUserSelectionChange();
|
|
99114
99285
|
if (this.isShowSearch) {
|
|
99115
99286
|
this.syncSearchPanelSelection();
|
|
99116
99287
|
}
|
|
@@ -99136,32 +99307,35 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99136
99307
|
this.$emit('input', emitValue);
|
|
99137
99308
|
});
|
|
99138
99309
|
},
|
|
99310
|
+
clearPanelSelectionState(panel) {
|
|
99311
|
+
if (!panel || !panel.selection) {
|
|
99312
|
+
return;
|
|
99313
|
+
}
|
|
99314
|
+
panel.selection.clear();
|
|
99315
|
+
panel.bumpSelectionView();
|
|
99316
|
+
},
|
|
99139
99317
|
// 全选/取消全选
|
|
99140
99318
|
handleSelectAll() {
|
|
99141
99319
|
if (!this.isMultiple) {
|
|
99142
|
-
// 单选模式下不支持全选
|
|
99143
99320
|
return;
|
|
99144
99321
|
}
|
|
99322
|
+
const panel = this.$refs.cascaderPanel;
|
|
99323
|
+
const searchPanel = this.$refs.searchCascaderPanel;
|
|
99145
99324
|
if (this.isAllSelected) {
|
|
99146
|
-
|
|
99147
|
-
|
|
99148
|
-
|
|
99149
|
-
|
|
99150
|
-
|
|
99151
|
-
|
|
99152
|
-
|
|
99153
|
-
|
|
99325
|
+
this.clearPanelSelectionState(panel);
|
|
99326
|
+
this.clearPanelSelectionState(searchPanel);
|
|
99327
|
+
this.selectedValues = [];
|
|
99328
|
+
this.searchSelectedValues = [];
|
|
99329
|
+
} else if (panel && panel.selection) {
|
|
99330
|
+
panel.selection.selectAll();
|
|
99331
|
+
panel.bumpSelectionView();
|
|
99332
|
+
if (searchPanel && searchPanel.selection) {
|
|
99333
|
+
this.syncSearchPanelSelection();
|
|
99154
99334
|
}
|
|
99155
99335
|
} else {
|
|
99156
|
-
|
|
99157
|
-
if (panel) {
|
|
99158
|
-
panel.selectAllLeaves();
|
|
99159
|
-
} else {
|
|
99160
|
-
this.selectedValues = CascaderUtilsPro.getAllLeafPaths(this.filteredOptions, this.disabledConfig, this.cascaderProps);
|
|
99161
|
-
this.updateSelectedItems();
|
|
99162
|
-
this.applyPanelSelectionChange();
|
|
99163
|
-
}
|
|
99336
|
+
this.selectedValues = CascaderUtilsPro.getAllLeafPaths(this.filteredOptions, this.disabledConfig, this.cascaderProps);
|
|
99164
99337
|
}
|
|
99338
|
+
this.commitUserSelectionChange();
|
|
99165
99339
|
},
|
|
99166
99340
|
// 获取选中的数据
|
|
99167
99341
|
getSelectedData() {
|
|
@@ -99187,14 +99361,12 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99187
99361
|
// 清空选择
|
|
99188
99362
|
clearSelection() {
|
|
99189
99363
|
const panel = this.$refs.cascaderPanel;
|
|
99190
|
-
|
|
99191
|
-
|
|
99192
|
-
|
|
99193
|
-
|
|
99194
|
-
|
|
99195
|
-
|
|
99196
|
-
this.applyPanelSelectionChange();
|
|
99197
|
-
}
|
|
99364
|
+
const searchPanel = this.$refs.searchCascaderPanel;
|
|
99365
|
+
this.clearPanelSelectionState(panel);
|
|
99366
|
+
this.clearPanelSelectionState(searchPanel);
|
|
99367
|
+
this.selectedValues = [];
|
|
99368
|
+
this.searchSelectedValues = [];
|
|
99369
|
+
this.commitUserSelectionChange();
|
|
99198
99370
|
},
|
|
99199
99371
|
// 设置选择值
|
|
99200
99372
|
setValue(values) {
|
|
@@ -99293,7 +99465,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99293
99465
|
});
|
|
99294
99466
|
panel.selection._reconcileAllRoots();
|
|
99295
99467
|
panel.bumpSelectionView();
|
|
99296
|
-
this.
|
|
99468
|
+
this.commitUserSelectionChange();
|
|
99297
99469
|
} else {
|
|
99298
99470
|
const newSelectedValues = [...this.selectedValues];
|
|
99299
99471
|
matchedPaths.forEach(path => {
|
|
@@ -99338,7 +99510,7 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99338
99510
|
});
|
|
99339
99511
|
|
|
99340
99512
|
// 检查是否为叶子节点且匹配且未禁用
|
|
99341
|
-
const isLeafNode =
|
|
99513
|
+
const isLeafNode = CascaderUtilsPro.isTreeLeafNode(option, this.cascaderProps);
|
|
99342
99514
|
const isNotDisabled = !this.isItemDisabled(option);
|
|
99343
99515
|
if (isMatched && isLeafNode && isNotDisabled) {
|
|
99344
99516
|
// 如果是叶子节点、匹配且未禁用,添加到结果中
|
|
@@ -99391,8 +99563,8 @@ var VirtualCascaderPanel_component = normalizeComponent(
|
|
|
99391
99563
|
;
|
|
99392
99564
|
var ByCascaderPanelPro_component = normalizeComponent(
|
|
99393
99565
|
cascader_panel_pro_ByCascaderPanelProvue_type_script_lang_js,
|
|
99394
|
-
|
|
99395
|
-
|
|
99566
|
+
ByCascaderPanelProvue_type_template_id_e4b10a08_render,
|
|
99567
|
+
ByCascaderPanelProvue_type_template_id_e4b10a08_staticRenderFns,
|
|
99396
99568
|
false,
|
|
99397
99569
|
null,
|
|
99398
99570
|
null,
|