bkui-vue 0.0.1-beta.425 → 0.0.1-beta.427
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/dist/index.cjs.js +27 -27
- package/dist/index.esm.js +175 -55
- package/dist/index.umd.js +28 -28
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +1 -1
- package/lib/table/components/table-column.d.ts +18 -3
- package/lib/table/index.d.ts +42 -10
- package/lib/table/index.js +1 -1
- package/lib/table/props.d.ts +2 -2
- package/lib/table/use-column.d.ts +5 -4
- package/lib/table-column/index.d.ts +42 -10
- package/lib/table-column/index.js +1 -1
- package/lib/transfer/index.d.ts +57 -1
- package/lib/transfer/index.js +1 -1
- package/lib/transfer/props.d.ts +5 -0
- package/lib/transfer/transfer.css +70 -12
- package/lib/transfer/transfer.d.ts +22 -0
- package/lib/transfer/transfer.less +52 -2
- package/lib/transfer/transfer.variable.css +70 -12
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -10761,7 +10761,7 @@ const propsCollapsePanel = __spreadValues({
|
|
10761
10761
|
alone: PropTypes.bool.def(false),
|
10762
10762
|
icon: PropTypes.string.def("angle-right")
|
10763
10763
|
}, CollapsePanelEventProps);
|
10764
|
-
function _isSlot$
|
10764
|
+
function _isSlot$8(s2) {
|
10765
10765
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
10766
10766
|
}
|
10767
10767
|
var CollapsePanel = defineComponent({
|
@@ -10872,7 +10872,7 @@ var CollapsePanel = defineComponent({
|
|
10872
10872
|
"onClick": () => this.clickItem()
|
10873
10873
|
}, [this.renderHeader(createVNode(this.collapseIcon, {
|
10874
10874
|
"class": `bk-collapse-icon ${this.isActive && "rotate-icon" || ""}`
|
10875
|
-
}, null))]), createVNode(CollapseTransition, null, _isSlot$
|
10875
|
+
}, null))]), createVNode(CollapseTransition, null, _isSlot$8(_slot = this.renderPanel()) ? _slot : {
|
10876
10876
|
default: () => [_slot]
|
10877
10877
|
})])]);
|
10878
10878
|
}
|
@@ -11146,7 +11146,7 @@ const props$1 = __spreadProps(__spreadValues({}, propsMixin$1), {
|
|
11146
11146
|
dialogType: dialogTypeUnion(),
|
11147
11147
|
isLoading: PropTypes.bool.def(false)
|
11148
11148
|
});
|
11149
|
-
function _isSlot$
|
11149
|
+
function _isSlot$7(s2) {
|
11150
11150
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
11151
11151
|
}
|
11152
11152
|
var Dialog = defineComponent({
|
@@ -11399,7 +11399,7 @@ var Dialog = defineComponent({
|
|
11399
11399
|
"onClose": this.handleClose,
|
11400
11400
|
"isShow": this.isModalShow,
|
11401
11401
|
"style": this.data.moveStyle
|
11402
|
-
}), _isSlot$
|
11402
|
+
}), _isSlot$7(dialogSlot) ? dialogSlot : {
|
11403
11403
|
default: () => [dialogSlot]
|
11404
11404
|
});
|
11405
11405
|
}
|
@@ -14065,7 +14065,7 @@ const Line = (_2, {
|
|
14065
14065
|
"style": titleStyle
|
14066
14066
|
}, [showDefault()])])]), showDefault(false)]);
|
14067
14067
|
};
|
14068
|
-
function _isSlot$
|
14068
|
+
function _isSlot$6(s2) {
|
14069
14069
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
14070
14070
|
}
|
14071
14071
|
var Component$q = defineComponent({
|
@@ -14130,11 +14130,11 @@ var Component$q = defineComponent({
|
|
14130
14130
|
const $props = __spreadProps(__spreadValues({}, this.$props), {
|
14131
14131
|
percent: this.validPercent(this.percent)
|
14132
14132
|
});
|
14133
|
-
let progress2 = createVNode(Line, $props, _isSlot$
|
14133
|
+
let progress2 = createVNode(Line, $props, _isSlot$6(progressInfo) ? progressInfo : {
|
14134
14134
|
default: () => [progressInfo]
|
14135
14135
|
});
|
14136
14136
|
if (this.type === "circle" || this.type === "dashboard") {
|
14137
|
-
progress2 = createVNode(Circle, $props, _isSlot$
|
14137
|
+
progress2 = createVNode(Circle, $props, _isSlot$6(progressInfo) ? progressInfo : {
|
14138
14138
|
default: () => [progressInfo]
|
14139
14139
|
});
|
14140
14140
|
}
|
@@ -16849,7 +16849,7 @@ var Component$k = defineComponent({
|
|
16849
16849
|
}
|
16850
16850
|
});
|
16851
16851
|
const BkSelect = withInstallProps(Component$k, { Option: BkOption, Group: OptionGroup });
|
16852
|
-
function _isSlot$
|
16852
|
+
function _isSlot$5(s2) {
|
16853
16853
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
16854
16854
|
}
|
16855
16855
|
const {
|
@@ -16943,7 +16943,7 @@ var Component$j = defineComponent({
|
|
16943
16943
|
"onHidden": handleHidden,
|
16944
16944
|
"onShown": handleShown,
|
16945
16945
|
"onClose": handleClose
|
16946
|
-
}), _isSlot$
|
16946
|
+
}), _isSlot$5(dialogSlot) ? dialogSlot : {
|
16947
16947
|
default: () => [dialogSlot]
|
16948
16948
|
});
|
16949
16949
|
};
|
@@ -17488,10 +17488,11 @@ const tableProps = {
|
|
17488
17488
|
var Column = defineComponent({
|
17489
17489
|
name: "TableColumn",
|
17490
17490
|
props: __spreadProps(__spreadValues({}, IColumnType), {
|
17491
|
-
prop: PropTypes.oneOfType([PropTypes.func.def(() => ""), PropTypes.string.def("")])
|
17491
|
+
prop: PropTypes.oneOfType([PropTypes.func.def(() => ""), PropTypes.string.def("")]),
|
17492
|
+
index: PropTypes.number.def(void 0)
|
17492
17493
|
}),
|
17493
17494
|
setup(props2) {
|
17494
|
-
const initColumns = inject(PROVIDE_KEY_INIT_COL, (
|
17495
|
+
const initColumns = inject(PROVIDE_KEY_INIT_COL, (_col, _rm = false) => {
|
17495
17496
|
}, false);
|
17496
17497
|
const bkTableCache = inject(PROVIDE_KEY_TB_CACHE, {
|
17497
17498
|
queueStack: (_2, fn2) => fn2 == null ? void 0 : fn2()
|
@@ -17506,13 +17507,20 @@ var Column = defineComponent({
|
|
17506
17507
|
};
|
17507
17508
|
},
|
17508
17509
|
unmounted() {
|
17509
|
-
this.updateColumnDefine();
|
17510
|
+
this.updateColumnDefine(true);
|
17510
17511
|
},
|
17511
17512
|
mounted() {
|
17512
17513
|
this.updateColumnDefine();
|
17513
17514
|
},
|
17514
17515
|
methods: {
|
17515
|
-
updateColumnDefine() {
|
17516
|
+
updateColumnDefine(unmounted = false) {
|
17517
|
+
if (this.$props.index !== void 0 && typeof this.$props.index === "number") {
|
17518
|
+
this.updateColumnDefineByIndex(unmounted);
|
17519
|
+
return;
|
17520
|
+
}
|
17521
|
+
this.updateColumnDefineByParent();
|
17522
|
+
},
|
17523
|
+
updateColumnDefineByParent() {
|
17516
17524
|
const fn2 = () => {
|
17517
17525
|
const selfVnode = this._;
|
17518
17526
|
const colList = selfVnode.parent.vnode.children.default() || [];
|
@@ -17543,6 +17551,13 @@ var Column = defineComponent({
|
|
17543
17551
|
if (typeof this.bkTableCache.queueStack === "function") {
|
17544
17552
|
this.bkTableCache.queueStack(BK_COLUMN_UPDATE_DEFINE, fn2);
|
17545
17553
|
}
|
17554
|
+
},
|
17555
|
+
updateColumnDefineByIndex(unmounted = false) {
|
17556
|
+
const resolveProp = __spreadProps(__spreadValues({}, this.$props), {
|
17557
|
+
field: this.$props.prop || this.$props.field,
|
17558
|
+
render: this.$slots.default
|
17559
|
+
});
|
17560
|
+
this.initColumns(unref(resolveProp), unmounted);
|
17546
17561
|
}
|
17547
17562
|
},
|
17548
17563
|
render() {
|
@@ -17691,7 +17706,7 @@ var useScrollLoading = (props2, ctx) => {
|
|
17691
17706
|
renderScrollLoading
|
17692
17707
|
};
|
17693
17708
|
};
|
17694
|
-
function _isSlot$
|
17709
|
+
function _isSlot$4(s2) {
|
17695
17710
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
17696
17711
|
}
|
17697
17712
|
var useLimit = (t2) => {
|
@@ -17738,7 +17753,7 @@ var useLimit = (t2) => {
|
|
17738
17753
|
"modelValue": localLimit.value,
|
17739
17754
|
"onChange": handleLimitChange,
|
17740
17755
|
"disabled": proxy.disabled
|
17741
|
-
}, _isSlot$
|
17756
|
+
}, _isSlot$4(_slot = proxy.limitList.map((num, index2) => createVNode(BkOption, {
|
17742
17757
|
"value": num,
|
17743
17758
|
"label": `${num}`,
|
17744
17759
|
"key": `${index2}_${num}`
|
@@ -19321,7 +19336,7 @@ class TablePlugins {
|
|
19321
19336
|
this.ctx = ctx;
|
19322
19337
|
}
|
19323
19338
|
}
|
19324
|
-
function _isSlot$
|
19339
|
+
function _isSlot$3(s2) {
|
19325
19340
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
19326
19341
|
}
|
19327
19342
|
var Settings = defineComponent({
|
@@ -19505,7 +19520,7 @@ var Settings = defineComponent({
|
|
19505
19520
|
"class": "setting-body-fields",
|
19506
19521
|
"modelValue": checkedFields.value,
|
19507
19522
|
"onUpdate:modelValue": ($event) => checkedFields.value = $event
|
19508
|
-
}, _isSlot$
|
19523
|
+
}, _isSlot$3(_slot2 = renderFields.value.map((item, index2) => {
|
19509
19524
|
let _slot;
|
19510
19525
|
return createVNode("div", {
|
19511
19526
|
"class": "field-item"
|
@@ -19513,7 +19528,7 @@ var Settings = defineComponent({
|
|
19513
19528
|
"checked": checkedFields.value.includes(resolvedColVal(item, index2)),
|
19514
19529
|
"label": resolvedColVal(item, index2),
|
19515
19530
|
"disabled": isItemReadonly(item, index2)
|
19516
|
-
}, _isSlot$
|
19531
|
+
}, _isSlot$3(_slot = resolvePropVal(item, "label", [item, index2])) ? _slot : {
|
19517
19532
|
default: () => [_slot]
|
19518
19533
|
})]);
|
19519
19534
|
})) ? _slot2 : {
|
@@ -19624,7 +19639,7 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
|
|
19624
19639
|
resolveColumnClass
|
19625
19640
|
};
|
19626
19641
|
};
|
19627
|
-
function _isSlot$
|
19642
|
+
function _isSlot$2(s2) {
|
19628
19643
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
19629
19644
|
}
|
19630
19645
|
class TableRender {
|
@@ -19875,7 +19890,7 @@ class TableRender {
|
|
19875
19890
|
"title": showTitle,
|
19876
19891
|
"observerResize": this.props.observerResize,
|
19877
19892
|
"resizerWay": this.props.resizerWay
|
19878
|
-
}, _isSlot$
|
19893
|
+
}, _isSlot$2(cells) ? cells : {
|
19879
19894
|
default: () => [cells]
|
19880
19895
|
});
|
19881
19896
|
};
|
@@ -19983,7 +19998,7 @@ class TableRender {
|
|
19983
19998
|
"row": row,
|
19984
19999
|
"parentSetting": this.props.showOverflowTooltip,
|
19985
20000
|
"observerResize": this.props.observerResize
|
19986
|
-
}, _isSlot$
|
20001
|
+
}, _isSlot$2(_slot = this.renderCell(row, column, rowIndex, rows)) ? _slot : {
|
19987
20002
|
default: () => [_slot]
|
19988
20003
|
})]);
|
19989
20004
|
}
|
@@ -20139,15 +20154,27 @@ var useColumn = (props2, targetColumns) => {
|
|
20139
20154
|
resolveColumns = column;
|
20140
20155
|
}
|
20141
20156
|
if (!remove) {
|
20142
|
-
|
20143
|
-
|
20144
|
-
if (
|
20145
|
-
|
20157
|
+
let needToSort = false;
|
20158
|
+
resolveColumns.forEach((col) => {
|
20159
|
+
if (col.index !== void 0 && col.index >= 0) {
|
20160
|
+
needToSort = true;
|
20161
|
+
const oldIndex = targetColumns.findIndex((tc) => tc.label === col.label && tc.field === col.field);
|
20162
|
+
if (oldIndex >= 0) {
|
20163
|
+
targetColumns.splice(oldIndex, 1);
|
20164
|
+
}
|
20165
|
+
targetColumns.push(col);
|
20166
|
+
} else {
|
20167
|
+
const index2 = targetColumns.findIndex((tc) => tc.label === col.label && tc.field === col.field);
|
20168
|
+
if (index2 >= 0) {
|
20169
|
+
targetColumns.splice(index2, 1, col);
|
20170
|
+
} else {
|
20171
|
+
targetColumns.push(col);
|
20172
|
+
}
|
20146
20173
|
}
|
20147
|
-
return unref(col);
|
20148
20174
|
});
|
20149
|
-
|
20150
|
-
|
20175
|
+
if (needToSort) {
|
20176
|
+
targetColumns.sort((col1, col2) => col1.index - col2.index);
|
20177
|
+
}
|
20151
20178
|
} else {
|
20152
20179
|
resolveColumns.forEach((col) => {
|
20153
20180
|
const matchColIndex = targetColumns.findIndex((c2) => c2.label === col.label && c2.field === col.field);
|
@@ -29358,8 +29385,12 @@ const transferProps = {
|
|
29358
29385
|
sortable: PropTypes.bool.def(false),
|
29359
29386
|
sourceList: PropTypes.arrayOf(PropTypes.any).def([]),
|
29360
29387
|
targetList: PropTypes.arrayOf(PropTypes.any).def([]),
|
29361
|
-
emptyContent: PropTypes.arrayOf(PropTypes.string).def([])
|
29388
|
+
emptyContent: PropTypes.arrayOf(PropTypes.string).def([]),
|
29389
|
+
multiple: PropTypes.bool.def(false)
|
29362
29390
|
};
|
29391
|
+
function _isSlot$1(s2) {
|
29392
|
+
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
29393
|
+
}
|
29363
29394
|
function useTransferData(sourceData, targetList, settingCode) {
|
29364
29395
|
const selectList = ref([]);
|
29365
29396
|
const selectedList = ref([]);
|
@@ -29411,6 +29442,14 @@ var Component$a = defineComponent({
|
|
29411
29442
|
emit
|
29412
29443
|
}) {
|
29413
29444
|
const t2 = useLocale("transfer");
|
29445
|
+
const multipleSelectAllValue = ref({
|
29446
|
+
source: false,
|
29447
|
+
target: false
|
29448
|
+
});
|
29449
|
+
const multipleSelectList = ref({
|
29450
|
+
source: [],
|
29451
|
+
target: []
|
29452
|
+
});
|
29414
29453
|
const sourceListType = computed(() => {
|
29415
29454
|
if (Array.isArray(props2.sourceList)) {
|
29416
29455
|
const isObjectArray = props2.sourceList.every((s2) => s2.toString().includes("[object Object]"));
|
@@ -29459,7 +29498,9 @@ var Component$a = defineComponent({
|
|
29459
29498
|
});
|
29460
29499
|
});
|
29461
29500
|
watch(() => [selectList, selectedList], () => {
|
29462
|
-
|
29501
|
+
if (!props2.multiple) {
|
29502
|
+
handleEmitUpdateTargetList();
|
29503
|
+
}
|
29463
29504
|
}, {
|
29464
29505
|
deep: true
|
29465
29506
|
});
|
@@ -29501,6 +29542,25 @@ var Component$a = defineComponent({
|
|
29501
29542
|
emit("update:targetList", targetList2);
|
29502
29543
|
emit("change", sourceListType.value === ArrayType.BASE_ARRAY ? restList : selectList.value.map((v2) => toRaw(v2)), sourceListType.value === ArrayType.BASE_ARRAY ? targetList2 : selectedList.value.map((v2) => toRaw(v2)), targetList2);
|
29503
29544
|
};
|
29545
|
+
const handleItemChecked = (dirct) => {
|
29546
|
+
const target = dirct === "source" ? selectList : selectedList;
|
29547
|
+
multipleSelectAllValue.value[dirct] = multipleSelectList.value[dirct].length === target.value.length;
|
29548
|
+
};
|
29549
|
+
const handleAllChecked = (value, dirct) => {
|
29550
|
+
const target = dirct === "source" ? selectList : selectedList;
|
29551
|
+
multipleSelectList.value[dirct] = value ? target.value.map((item) => item[settingCode.value]) : [];
|
29552
|
+
};
|
29553
|
+
const handleMultipleChange = (dirct) => {
|
29554
|
+
const isLeft = dirct === "left";
|
29555
|
+
const from = isLeft ? selectList : selectedList;
|
29556
|
+
const to = isLeft ? selectedList : selectList;
|
29557
|
+
const checkeds = multipleSelectList.value[isLeft ? "source" : "target"];
|
29558
|
+
const items = from.value.filter((val) => checkeds.includes(val[settingCode.value]));
|
29559
|
+
from.value = from.value.filter((val) => !checkeds.includes(val[settingCode.value]));
|
29560
|
+
to.value.push(...items);
|
29561
|
+
multipleSelectList.value[isLeft ? "source" : "target"] = [];
|
29562
|
+
handleEmitUpdateTargetList();
|
29563
|
+
};
|
29504
29564
|
return {
|
29505
29565
|
selectSearchQuery,
|
29506
29566
|
selectListSearch,
|
@@ -29512,17 +29572,28 @@ var Component$a = defineComponent({
|
|
29512
29572
|
allToRight,
|
29513
29573
|
allToLeft,
|
29514
29574
|
handleItemClick,
|
29515
|
-
t: t2
|
29575
|
+
t: t2,
|
29576
|
+
handleAllChecked,
|
29577
|
+
multipleSelectAllValue,
|
29578
|
+
multipleSelectList,
|
29579
|
+
handleMultipleChange,
|
29580
|
+
handleItemChecked
|
29516
29581
|
};
|
29517
29582
|
},
|
29518
29583
|
render() {
|
29584
|
+
const {
|
29585
|
+
multiple
|
29586
|
+
} = this.$props;
|
29519
29587
|
const leftList = this.sortable ? this.selectListSort : this.selectListSearch;
|
29520
29588
|
const rightList = this.sortable ? this.selectedListSort : this.selectedList;
|
29521
29589
|
const getHeaderHtml = (dirct) => {
|
29522
29590
|
var _a, _b;
|
29523
29591
|
const isLeft = dirct === "left-header";
|
29592
|
+
const selectField = isLeft ? "source" : "target";
|
29524
29593
|
const titleText = isLeft ? `${(_a = this.title[0]) != null ? _a : this.t.sourceList}` : `${(_b = this.title[1]) != null ? _b : this.t.targetList}`;
|
29525
29594
|
const isDisabled = isLeft ? !leftList.length : !rightList.length;
|
29595
|
+
const isIndeterminate = !!this.multipleSelectList[selectField].length && !this.multipleSelectAllValue[selectField];
|
29596
|
+
const selectCount = this.multipleSelectList[selectField].length;
|
29526
29597
|
const headerClick = () => {
|
29527
29598
|
if (isDisabled)
|
29528
29599
|
return;
|
@@ -29532,8 +29603,24 @@ var Component$a = defineComponent({
|
|
29532
29603
|
"class": "slot-header"
|
29533
29604
|
}, [this.$slots[dirct]()]) : createVNode("div", {
|
29534
29605
|
"class": "header"
|
29535
|
-
}, [
|
29606
|
+
}, [this.multiple ? createVNode(BkCheckbox, {
|
29607
|
+
"class": "header-checkbox",
|
29608
|
+
"label": titleText,
|
29609
|
+
"modelValue": this.multipleSelectAllValue[selectField],
|
29610
|
+
"onUpdate:modelValue": ($event) => this.multipleSelectAllValue[selectField] = $event,
|
29611
|
+
"indeterminate": isIndeterminate,
|
29612
|
+
"onChange": (val) => this.handleAllChecked(val, selectField)
|
29613
|
+
}, null) : createVNode(Fragment, null, [`${titleText}\uFF08${isLeft ? leftList.length : rightList.length}\uFF09`]), this.multiple ? createVNode("div", {
|
29614
|
+
"class": "select-total-count"
|
29615
|
+
}, [createVNode("span", {
|
29616
|
+
"class": "select-count"
|
29617
|
+
}, [selectCount]), createVNode("span", {
|
29618
|
+
"class": "count-delimiter"
|
29619
|
+
}, [createTextVNode("/")]), createVNode("span", {
|
29620
|
+
"class": "total-count"
|
29621
|
+
}, [isLeft ? leftList.length : rightList.length])]) : createVNode("span", {
|
29536
29622
|
"class": {
|
29623
|
+
"select-all": true,
|
29537
29624
|
disabled: isDisabled
|
29538
29625
|
},
|
29539
29626
|
"onClick": () => headerClick()
|
@@ -29555,7 +29642,7 @@ var Component$a = defineComponent({
|
|
29555
29642
|
}, [createVNode("span", {
|
29556
29643
|
"class": "content-text",
|
29557
29644
|
"title": item[this.displayCode]
|
29558
|
-
}, [item[this.displayCode]]), createVNode("span", {
|
29645
|
+
}, [item[this.displayCode]]), !multiple && createVNode("span", {
|
29559
29646
|
"class": "icon-wrapper"
|
29560
29647
|
}, [isLeft ? createVNode(arrowsRight, {
|
29561
29648
|
"class": "bk-icon icon-move"
|
@@ -29564,11 +29651,28 @@ var Component$a = defineComponent({
|
|
29564
29651
|
}, null)])]);
|
29565
29652
|
};
|
29566
29653
|
const getListContentHtml = (dirct) => {
|
29654
|
+
let _slot;
|
29567
29655
|
const isLeft = dirct === "left";
|
29656
|
+
const selectField = dirct === "left" ? "source" : "target";
|
29568
29657
|
const list = isLeft ? leftList : rightList;
|
29569
29658
|
const slotName = isLeft ? "source-option" : "target-option";
|
29570
29659
|
const emptySlotName = isLeft ? "left-empty-content" : "right-empty-content";
|
29571
|
-
|
29660
|
+
const contentMode = multiple ? createVNode(BkCheckboxGroup, {
|
29661
|
+
"class": "content is-flex",
|
29662
|
+
"modelValue": this.multipleSelectList[selectField],
|
29663
|
+
"onUpdate:modelValue": ($event) => this.multipleSelectList[selectField] = $event,
|
29664
|
+
"onChange": () => this.handleItemChecked(selectField)
|
29665
|
+
}, _isSlot$1(_slot = list.map((item) => createVNode("div", null, [createVNode(BkCheckbox, {
|
29666
|
+
"class": "checkbox-item",
|
29667
|
+
"label": item[this.settingCode]
|
29668
|
+
}, {
|
29669
|
+
default: () => {
|
29670
|
+
var _a, _b, _c;
|
29671
|
+
return [(_c = (_b = (_a = this.$slots)[slotName]) == null ? void 0 : _b.call(_a, item)) != null ? _c : getDefaultListHtml(item, isLeft)];
|
29672
|
+
}
|
29673
|
+
})]))) ? _slot : {
|
29674
|
+
default: () => [_slot]
|
29675
|
+
}) : createVNode("ul", {
|
29572
29676
|
"class": ["content", this.searchable && isLeft ? "is-search" : ""]
|
29573
29677
|
}, [list.map((item) => {
|
29574
29678
|
var _a, _b, _c;
|
@@ -29577,7 +29681,8 @@ var Component$a = defineComponent({
|
|
29577
29681
|
"class": [this.$slots[slotName] ? "custom-item" : ""],
|
29578
29682
|
"onClick": () => this.handleItemClick(item, isLeft)
|
29579
29683
|
}, [(_c = (_b = (_a = this.$slots)[slotName]) == null ? void 0 : _b.call(_a, item)) != null ? _c : getDefaultListHtml(item, isLeft)]);
|
29580
|
-
})])
|
29684
|
+
})]);
|
29685
|
+
return list.length ? contentMode : getEmptyHtml(emptySlotName);
|
29581
29686
|
};
|
29582
29687
|
return createVNode("div", {
|
29583
29688
|
"class": ["bk-transfer", this.extCls]
|
@@ -29593,7 +29698,19 @@ var Component$a = defineComponent({
|
|
29593
29698
|
prefix: () => createVNode(search, {
|
29594
29699
|
"class": "icon-search"
|
29595
29700
|
}, null)
|
29596
|
-
}), getListContentHtml("left")]), createVNode(
|
29701
|
+
}), getListContentHtml("left")]), multiple ? createVNode("div", {
|
29702
|
+
"class": "transfer-button-group"
|
29703
|
+
}, [createVNode("div", {
|
29704
|
+
"class": ["transfer-button", {
|
29705
|
+
disabled: !this.multipleSelectList.source.length
|
29706
|
+
}],
|
29707
|
+
"onClick": () => this.handleMultipleChange("left")
|
29708
|
+
}, [createVNode(angleRight, null, null)]), createVNode("div", {
|
29709
|
+
"class": ["transfer-button", {
|
29710
|
+
disabled: !this.multipleSelectList.target.length
|
29711
|
+
}],
|
29712
|
+
"onClick": () => this.handleMultipleChange("right")
|
29713
|
+
}, [createVNode(angleLeft, null, null)])]) : createVNode(transfer, {
|
29597
29714
|
"class": "transfer"
|
29598
29715
|
}, null), createVNode("div", {
|
29599
29716
|
"class": "target-list"
|
@@ -32248,23 +32365,7 @@ var Component$8 = defineComponent({
|
|
32248
32365
|
}), [[resolveDirective("bk-tooltips"), collapseTooltip.join(", ")]])]);
|
32249
32366
|
};
|
32250
32367
|
const textRender = () => this.multiple ? null : createVNode("span", null, [this.selectedText]);
|
32251
|
-
|
32252
|
-
"class": [resolveClassName("cascader-wrapper"), this.floatMode ? "float-mode" : ""]
|
32253
|
-
}, [createVNode("div", {
|
32254
|
-
"class": [resolveClassName("cascader"), this.extCls, {
|
32255
|
-
"is-unselected": this.modelValue.length === 0,
|
32256
|
-
"is-hover": this.isHover,
|
32257
|
-
"is-filterable": this.filterable,
|
32258
|
-
"is-focus": this.isFocus,
|
32259
|
-
"is-disabled": this.disabled,
|
32260
|
-
"is-simplicity": this.behavior === "simplicity"
|
32261
|
-
}],
|
32262
|
-
"tabindex": "0",
|
32263
|
-
"data-placeholder": this.placeholder,
|
32264
|
-
"onMouseenter": this.setHover,
|
32265
|
-
"onMouseleave": this.cancelHover,
|
32266
|
-
"ref": "bkCascaderRef"
|
32267
|
-
}, [suffixIcon(), createVNode(BkPopover, {
|
32368
|
+
const popoverRender = () => createVNode(BkPopover, {
|
32268
32369
|
"placement": "bottom-start",
|
32269
32370
|
"theme": `light ${resolveClassName("cascader-popover")}`,
|
32270
32371
|
"trigger": "click",
|
@@ -32276,7 +32377,9 @@ var Component$8 = defineComponent({
|
|
32276
32377
|
"onAfterShow": this.popoverChangeEmitter,
|
32277
32378
|
"boundary": "body"
|
32278
32379
|
}, {
|
32279
|
-
default: () =>
|
32380
|
+
default: () => this.$slots.trigger ? this.$slots.trigger({
|
32381
|
+
selected: this.modelValue
|
32382
|
+
}) : createVNode("div", {
|
32280
32383
|
"class": [resolveClassName("cascader-name"), "bk-scroll-y"]
|
32281
32384
|
}, [this.multiple && this.selectedTags.length > 0 && renderTags(), this.filterable ? (this.isCollapse || this.selectedTags.length === 0) && createVNode("input", {
|
32282
32385
|
"class": [resolveClassName("cascader-search-input"), {
|
@@ -32307,7 +32410,24 @@ var Component$8 = defineComponent({
|
|
32307
32410
|
"class": resolveClassName("cascader-node-name")
|
32308
32411
|
}, [scope.node.name])
|
32309
32412
|
})])
|
32310
|
-
})
|
32413
|
+
});
|
32414
|
+
return createVNode("div", {
|
32415
|
+
"class": [resolveClassName("cascader-wrapper"), this.floatMode ? "float-mode" : ""]
|
32416
|
+
}, [this.$slots.trigger ? popoverRender() : createVNode("div", {
|
32417
|
+
"class": [resolveClassName("cascader"), this.extCls, {
|
32418
|
+
"is-unselected": this.modelValue.length === 0,
|
32419
|
+
"is-hover": this.isHover,
|
32420
|
+
"is-filterable": this.filterable,
|
32421
|
+
"is-focus": this.isFocus,
|
32422
|
+
"is-disabled": this.disabled,
|
32423
|
+
"is-simplicity": this.behavior === "simplicity"
|
32424
|
+
}],
|
32425
|
+
"tabindex": "0",
|
32426
|
+
"data-placeholder": this.placeholder,
|
32427
|
+
"onMouseenter": this.setHover,
|
32428
|
+
"onMouseleave": this.cancelHover,
|
32429
|
+
"ref": "bkCascaderRef"
|
32430
|
+
}, [suffixIcon(), popoverRender()])]);
|
32311
32431
|
}
|
32312
32432
|
});
|
32313
32433
|
const BkCascader = withInstallProps(Component$8, { CascaderPanel });
|