bkui-vue 0.0.1-beta.30 → 0.0.1-beta.33
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/bkui-vue.cjs.js +141 -139
- package/dist/bkui-vue.esm.js +141 -139
- package/dist/bkui-vue.umd.js +141 -139
- package/dist/style.css +154 -3
- package/lib/code-diff/code-diff.css +72 -1
- package/lib/code-diff/code-diff.d.ts +9 -0
- package/lib/code-diff/code-diff.less +94 -1
- package/lib/code-diff/code-diff.variable.css +72 -1
- package/lib/code-diff/index.d.ts +151 -3
- package/lib/code-diff/index.js +1 -0
- package/lib/components.d.ts +1 -1
- package/lib/divider/index.js +1 -1
- package/lib/divider/props.d.ts +21 -0
- package/lib/loading/index.d.ts +27 -10
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +8 -2
- package/lib/loading/loading.d.ts +18 -4
- package/lib/loading/loading.less +10 -10
- package/lib/loading/loading.variable.css +8 -2
- package/lib/pagination/index.d.ts +7 -7
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/slider/index.js +2 -2
- package/lib/slider/slider-button.d.ts +5 -0
- package/lib/slider/slider.d.ts +12 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/index.js +1 -1
- package/lib/tab/index.d.ts +96 -205
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +191 -0
- package/lib/tab/tab-nav.d.ts +59 -84
- package/lib/tab/tab-panel.d.ts +39 -14
- package/lib/tab/tab.css +2 -1
- package/lib/tab/tab.d.ts +14 -37
- package/lib/tab/tab.less +2 -1
- package/lib/tab/tab.variable.css +2 -1
- package/lib/table/index.d.ts +29 -9
- package/lib/table/index.js +2 -2
- package/lib/table/props.d.ts +0 -1
- package/lib/table/render.d.ts +10 -3
- package/lib/table/table.d.ts +8 -4
- package/lib/tree/index.d.ts +15 -7
- package/lib/tree/tree.d.ts +6 -16
- package/package.json +1 -1
package/dist/bkui-vue.umd.js
CHANGED
@@ -81,6 +81,7 @@ var __publicField = (obj, key, value) => {
|
|
81
81
|
var transfer = "";
|
82
82
|
var pagination = "";
|
83
83
|
var timeline = "";
|
84
|
+
var codeDiff = "";
|
84
85
|
var resizeLayout = "";
|
85
86
|
var tagInput = "";
|
86
87
|
const BKLAYERD_INDEX_EFAULT_VALUE = {
|
@@ -8462,6 +8463,7 @@ ${$(r2)}`), n2;
|
|
8462
8463
|
type: Function
|
8463
8464
|
},
|
8464
8465
|
loading: PropTypes.bool,
|
8466
|
+
inline: PropTypes.bool.def(true),
|
8465
8467
|
theme: PropTypes.theme(["white", "primary", "warning", "success", "danger"]),
|
8466
8468
|
title: PropTypes.string.def(""),
|
8467
8469
|
size: PropTypes.commonType(Object.values(BkLoadingSize)).def(BkLoadingSize.Normal),
|
@@ -8480,9 +8482,9 @@ ${$(r2)}`), n2;
|
|
8480
8482
|
"class": `oval oval-${i2}`
|
8481
8483
|
}, null))]);
|
8482
8484
|
const loadingWrapperCls = vue.computed(() => classes({
|
8485
|
+
"bk-loading-wrapper": props.loading,
|
8483
8486
|
"bk-nested-loading": !!ctx.slots.default
|
8484
|
-
}
|
8485
|
-
console.log(props.theme);
|
8487
|
+
}));
|
8486
8488
|
const containerCls = vue.computed(() => classes({
|
8487
8489
|
[`bk-loading-size-${props.size}`]: !!props.size,
|
8488
8490
|
[`bk-loading-${props.theme}`]: !!props.theme
|
@@ -8500,15 +8502,15 @@ ${$(r2)}`), n2;
|
|
8500
8502
|
});
|
8501
8503
|
return () => {
|
8502
8504
|
var _a, _b;
|
8503
|
-
return
|
8505
|
+
return vue.createVNode("div", {
|
8504
8506
|
"class": loadingWrapperCls.value
|
8505
|
-
}, [vue.createVNode("div", {
|
8507
|
+
}, [props.loading && vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
8506
8508
|
"class": containerCls.value
|
8507
8509
|
}, [indicator.value, hasTitle.value && vue.createVNode("div", {
|
8508
8510
|
"class": "bk-loading-title"
|
8509
8511
|
}, [props.title])]), ctx.slots.default && vue.createVNode("div", {
|
8510
8512
|
"class": "bk-loading-mask"
|
8511
|
-
},
|
8513
|
+
}, null)]), (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
8512
8514
|
};
|
8513
8515
|
}
|
8514
8516
|
});
|
@@ -11712,7 +11714,7 @@ ${$(r2)}`), n2;
|
|
11712
11714
|
}
|
11713
11715
|
});
|
11714
11716
|
const BkSwitcher = withInstall(Component$7);
|
11715
|
-
const EventProps
|
11717
|
+
const EventProps = {
|
11716
11718
|
onContentScroll: Function
|
11717
11719
|
};
|
11718
11720
|
const virtualRenderProps = __spreadValues({
|
@@ -11735,7 +11737,7 @@ ${$(r2)}`), n2;
|
|
11735
11737
|
scrollPosition: PropTypes.string.def("content"),
|
11736
11738
|
abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
|
11737
11739
|
throttleDelay: PropTypes.number.def(60)
|
11738
|
-
}, EventProps
|
11740
|
+
}, EventProps);
|
11739
11741
|
function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
11740
11742
|
let startIndex = 0;
|
11741
11743
|
let height = 0;
|
@@ -11964,10 +11966,7 @@ ${$(r2)}`), n2;
|
|
11964
11966
|
});
|
11965
11967
|
const BkVirtualRender = withInstall(Component$6);
|
11966
11968
|
const BORDER_OPRIONS = ["none", "row", "col", "outer"];
|
11967
|
-
const
|
11968
|
-
onRowClick: Function
|
11969
|
-
};
|
11970
|
-
const tableProps = __spreadValues({
|
11969
|
+
const tableProps = {
|
11971
11970
|
data: PropTypes.arrayOf(PropTypes.any).def([]),
|
11972
11971
|
columns: PropTypes.arrayOf(PropTypes.shape({
|
11973
11972
|
label: PropTypes.oneOfType([PropTypes.func.def(() => ""), PropTypes.string.def("")]),
|
@@ -11986,7 +11985,7 @@ ${$(r2)}`), n2;
|
|
11986
11985
|
border: PropTypes.arrayOf(PropTypes.commonType(BORDER_OPRIONS, "border")).def(["row"]),
|
11987
11986
|
pagination: PropTypes.oneOfType([PropTypes.bool.def(false), PropTypes.object.def({})]).def(false),
|
11988
11987
|
remotePagination: PropTypes.bool.def(false)
|
11989
|
-
}
|
11988
|
+
};
|
11990
11989
|
function _isSlot(s2) {
|
11991
11990
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !vue.isVNode(s2);
|
11992
11991
|
}
|
@@ -12367,7 +12366,7 @@ ${$(r2)}`), n2;
|
|
12367
12366
|
var Component$5 = vue.defineComponent({
|
12368
12367
|
name: "Pagination",
|
12369
12368
|
props: paginationProps,
|
12370
|
-
emits: ["update:modelValue", "change", "update:limit", "
|
12369
|
+
emits: ["update:modelValue", "change", "update:limit", "limitChange"],
|
12371
12370
|
setup(props, context) {
|
12372
12371
|
const totalPageNum = vue.ref(0);
|
12373
12372
|
const {
|
@@ -12402,7 +12401,7 @@ ${$(r2)}`), n2;
|
|
12402
12401
|
context.emit("change", smallListCurrent2);
|
12403
12402
|
});
|
12404
12403
|
vue.watch(localLimit, (localLimit2) => {
|
12405
|
-
context.emit("
|
12404
|
+
context.emit("limitChange", localLimit2);
|
12406
12405
|
});
|
12407
12406
|
return {
|
12408
12407
|
totalPageNum,
|
@@ -12607,14 +12606,14 @@ ${$(r2)}`), n2;
|
|
12607
12606
|
Object.assign(this.props.pagination, {
|
12608
12607
|
limit
|
12609
12608
|
});
|
12610
|
-
this.context.emit("
|
12609
|
+
this.context.emit("pageLimitChange", limit);
|
12611
12610
|
}
|
12612
12611
|
hanlePageChange(current) {
|
12613
12612
|
Object.assign(this.props.pagination, {
|
12614
12613
|
current,
|
12615
12614
|
value: current
|
12616
12615
|
});
|
12617
|
-
this.context.emit("
|
12616
|
+
this.context.emit("pageValueChange", current);
|
12618
12617
|
}
|
12619
12618
|
setColumnActive(index, single = false) {
|
12620
12619
|
const col = this.propActiveCols.find((item) => item.index === index);
|
@@ -12659,7 +12658,8 @@ ${$(r2)}`), n2;
|
|
12659
12658
|
};
|
12660
12659
|
return vue.createVNode("tr", {
|
12661
12660
|
"style": rowStyle,
|
12662
|
-
"onClick": (e) => this.handleRowClick(e, row, index, rows)
|
12661
|
+
"onClick": (e) => this.handleRowClick(e, row, index, rows),
|
12662
|
+
"onDblclick": (e) => this.handleRowDblClick(e, row, index, rows)
|
12663
12663
|
}, [this.props.columns.map((column) => vue.createVNode("td", {
|
12664
12664
|
"colspan": 1,
|
12665
12665
|
"rowspan": 1
|
@@ -12669,7 +12669,10 @@ ${$(r2)}`), n2;
|
|
12669
12669
|
})]);
|
12670
12670
|
}
|
12671
12671
|
handleRowClick(e, row, index, rows) {
|
12672
|
-
this.context.emit("
|
12672
|
+
this.context.emit("rowClick", e, row, index, rows, this);
|
12673
|
+
}
|
12674
|
+
handleRowDblClick(e, row, index, rows) {
|
12675
|
+
this.context.emit("rowDblClick", e, row, index, rows, this);
|
12673
12676
|
}
|
12674
12677
|
renderCell(row, column, index, rows) {
|
12675
12678
|
const cell = row[resolvePropVal(column, "field", [column, row])];
|
@@ -12699,7 +12702,7 @@ ${$(r2)}`), n2;
|
|
12699
12702
|
var Component$4 = vue.defineComponent({
|
12700
12703
|
name: "Table",
|
12701
12704
|
props: tableProps,
|
12702
|
-
emits: ["
|
12705
|
+
emits: ["columnPick", "rowClick", "rowDblClick", "pageLimitChange", "pageValueChange"],
|
12703
12706
|
setup(props, ctx) {
|
12704
12707
|
const activeCols = vue.reactive(resolveActiveColumns(props));
|
12705
12708
|
const colgroups = vue.reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
|
@@ -13765,15 +13768,16 @@ ${$(r2)}`), n2;
|
|
13765
13768
|
TagInput.install = (Vue) => {
|
13766
13769
|
Vue.component(TagInput.name, TagInput);
|
13767
13770
|
};
|
13771
|
+
const dividerProps = {
|
13772
|
+
direction: PropTypes.commonType(["horizontal", "vertical"], "direction").def("horizontal"),
|
13773
|
+
align: PropTypes.commonType(["left", "center", "right"], "align").def("center"),
|
13774
|
+
color: PropTypes.string.def("#dde4eb"),
|
13775
|
+
width: PropTypes.number.def(1),
|
13776
|
+
type: PropTypes.commonType(["dashed", "solid"], "lineType").def("dashed")
|
13777
|
+
};
|
13768
13778
|
var bkDivider = vue.defineComponent({
|
13769
13779
|
name: "Divider",
|
13770
|
-
props:
|
13771
|
-
direction: PropTypes.commonType(["horizontal", "vertical"], "direction").def("horizontal"),
|
13772
|
-
align: PropTypes.commonType(["left", "center", "right"], "align").def("center"),
|
13773
|
-
color: PropTypes.string.def("#dde4eb"),
|
13774
|
-
width: PropTypes.number.def(1),
|
13775
|
-
type: PropTypes.commonType(["dashed", "solid"], "lineType").def("dashed")
|
13776
|
-
},
|
13780
|
+
props: dividerProps,
|
13777
13781
|
render() {
|
13778
13782
|
const styles = () => {
|
13779
13783
|
if (this.direction === "vertical") {
|
@@ -13798,46 +13802,73 @@ ${$(r2)}`), n2;
|
|
13798
13802
|
}
|
13799
13803
|
});
|
13800
13804
|
const BkDivider = withInstall(bkDivider);
|
13805
|
+
const tabNavEventProps = {
|
13806
|
+
tabAdd: {
|
13807
|
+
type: Function,
|
13808
|
+
default: () => ({})
|
13809
|
+
},
|
13810
|
+
tabChange: {
|
13811
|
+
type: Function,
|
13812
|
+
default: (name) => name
|
13813
|
+
},
|
13814
|
+
tabRemove: {
|
13815
|
+
type: Function,
|
13816
|
+
default: (name) => name
|
13817
|
+
},
|
13818
|
+
tabSort: {
|
13819
|
+
type: Function,
|
13820
|
+
default: () => ({})
|
13821
|
+
},
|
13822
|
+
tabDrag: {
|
13823
|
+
type: Function,
|
13824
|
+
default: () => ({})
|
13825
|
+
}
|
13826
|
+
};
|
13827
|
+
const tabProps = {
|
13828
|
+
active: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13829
|
+
type: PropTypes.commonType(["card", "border-card", "unborder-card"], "type").def("border-card"),
|
13830
|
+
tabPosition: PropTypes.commonType(["left", "right", "top"], "position").def("top"),
|
13831
|
+
closable: Boolean,
|
13832
|
+
addable: Boolean,
|
13833
|
+
sortable: Boolean,
|
13834
|
+
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13835
|
+
labelHeight: PropTypes.number.def(50),
|
13836
|
+
scrollStep: PropTypes.number.def(200),
|
13837
|
+
extCls: PropTypes.string.def(""),
|
13838
|
+
validateActive: PropTypes.bool.def(true),
|
13839
|
+
showHeader: PropTypes.bool.def(true),
|
13840
|
+
changeOnHover: PropTypes.bool.def(false),
|
13841
|
+
changeOnHoverDelay: PropTypes.number.def(1e3)
|
13842
|
+
};
|
13843
|
+
const tabNavProps = __spreadValues({
|
13844
|
+
active: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13845
|
+
panels: {
|
13846
|
+
type: Array,
|
13847
|
+
default: () => []
|
13848
|
+
},
|
13849
|
+
closable: Boolean,
|
13850
|
+
addable: Boolean,
|
13851
|
+
sortable: Boolean,
|
13852
|
+
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13853
|
+
labelHeight: PropTypes.number.def(50),
|
13854
|
+
scrollStep: PropTypes.number.def(200),
|
13855
|
+
validateActive: PropTypes.bool.def(true),
|
13856
|
+
changeOnHover: PropTypes.bool.def(false),
|
13857
|
+
changeOnHoverDelay: PropTypes.number.def(1e3)
|
13858
|
+
}, tabNavEventProps);
|
13859
|
+
const tabPanelProps = {
|
13860
|
+
name: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13861
|
+
label: PropTypes.string || PropTypes.func,
|
13862
|
+
closable: PropTypes.bool,
|
13863
|
+
visible: PropTypes.bool.def(true),
|
13864
|
+
disabled: PropTypes.bool,
|
13865
|
+
sortable: PropTypes.bool,
|
13866
|
+
renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
|
13867
|
+
panel: PropTypes.string || PropTypes.func
|
13868
|
+
};
|
13801
13869
|
var TabNav = vue.defineComponent({
|
13802
13870
|
name: "TabNav",
|
13803
|
-
props:
|
13804
|
-
active: {
|
13805
|
-
type: String || Number
|
13806
|
-
},
|
13807
|
-
panels: {
|
13808
|
-
type: Array,
|
13809
|
-
default: () => []
|
13810
|
-
},
|
13811
|
-
closable: PropTypes.bool.def(false),
|
13812
|
-
addable: PropTypes.bool.def(false),
|
13813
|
-
sortable: PropTypes.bool.def(false),
|
13814
|
-
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13815
|
-
labelHeight: PropTypes.number.def(50),
|
13816
|
-
scrollStep: PropTypes.number.def(200),
|
13817
|
-
validateActive: PropTypes.bool.def(true),
|
13818
|
-
changeOnHover: PropTypes.bool.def(false),
|
13819
|
-
changeOnHoverDelay: PropTypes.number.def(1e3),
|
13820
|
-
tabAdd: {
|
13821
|
-
type: Function,
|
13822
|
-
default: () => ({})
|
13823
|
-
},
|
13824
|
-
tabChange: {
|
13825
|
-
type: Function,
|
13826
|
-
default: () => ({})
|
13827
|
-
},
|
13828
|
-
tabRemove: {
|
13829
|
-
type: Function,
|
13830
|
-
default: () => ({})
|
13831
|
-
},
|
13832
|
-
tabSort: {
|
13833
|
-
type: Function,
|
13834
|
-
default: () => ({})
|
13835
|
-
},
|
13836
|
-
tabDrag: {
|
13837
|
-
type: Function,
|
13838
|
-
default: () => ({})
|
13839
|
-
}
|
13840
|
-
},
|
13871
|
+
props: tabNavProps,
|
13841
13872
|
setup(props) {
|
13842
13873
|
const navs = vue.computed(() => {
|
13843
13874
|
if (!Array.isArray(props.panels) || !props.panels.length) {
|
@@ -13908,18 +13939,15 @@ ${$(r2)}`), n2;
|
|
13908
13939
|
distinctRoots(el1, el2) {
|
13909
13940
|
return el1 === el2;
|
13910
13941
|
},
|
13911
|
-
swapArr(arr, a2, b2) {
|
13912
|
-
const swap = arr[a2];
|
13913
|
-
arr[a2] = arr[b2];
|
13914
|
-
arr[b2] = swap;
|
13915
|
-
},
|
13916
13942
|
handleTabAdd(e) {
|
13917
13943
|
this.tabAdd(e);
|
13918
13944
|
},
|
13919
13945
|
dragstart(index, $event) {
|
13920
13946
|
this.dragStartIndex = index;
|
13921
13947
|
this.draggingEle = this.guid;
|
13922
|
-
$event.dataTransfer
|
13948
|
+
Object.assign($event.dataTransfer, {
|
13949
|
+
effectAllowed: "move"
|
13950
|
+
});
|
13923
13951
|
this.tabDrag(index, $event);
|
13924
13952
|
},
|
13925
13953
|
dragenter(index) {
|
@@ -13936,20 +13964,7 @@ ${$(r2)}`), n2;
|
|
13936
13964
|
if (!this.distinctRoots(this.draggingEle, this.guid)) {
|
13937
13965
|
return false;
|
13938
13966
|
}
|
13939
|
-
|
13940
|
-
if (this.dragStartIndex < index) {
|
13941
|
-
this.panels.splice(index + 1, 0, this.panels[this.dragStartIndex]);
|
13942
|
-
this.panels.splice(this.dragStartIndex, 1);
|
13943
|
-
} else if (this.dragStartIndex > index) {
|
13944
|
-
this.panels.splice(index, 0, this.panels[this.dragStartIndex]);
|
13945
|
-
this.panels.splice(this.dragStartIndex + 1, 1);
|
13946
|
-
} else {
|
13947
|
-
return false;
|
13948
|
-
}
|
13949
|
-
} else {
|
13950
|
-
this.swapArr(this.panels, this.dragStartIndex, index);
|
13951
|
-
}
|
13952
|
-
this.tabSort(this.dragStartIndex, index);
|
13967
|
+
this.tabSort(this.dragStartIndex, index, sortType);
|
13953
13968
|
},
|
13954
13969
|
handleTabChange(name) {
|
13955
13970
|
this.tabChange(name);
|
@@ -13990,7 +14005,7 @@ ${$(r2)}`), n2;
|
|
13990
14005
|
}
|
13991
14006
|
return classNames.join(" ");
|
13992
14007
|
};
|
13993
|
-
const getValue = (
|
14008
|
+
const getValue = (curentValue, parentValue) => curentValue || parentValue;
|
13994
14009
|
return vue.createVNode("div", {
|
13995
14010
|
"key": name,
|
13996
14011
|
"onClick": () => this.handleTabChange(name),
|
@@ -14022,26 +14037,29 @@ ${$(r2)}`), n2;
|
|
14022
14037
|
});
|
14023
14038
|
const renderSlot = () => {
|
14024
14039
|
var _a, _b, _c, _d;
|
14025
|
-
let addSlot;
|
14026
14040
|
const list = [];
|
14027
14041
|
if (typeof this.$slots.add === "function") {
|
14028
|
-
|
14042
|
+
list.push((_b = (_a = this.$slots).add) == null ? void 0 : _b.call(_a, vue.h));
|
14029
14043
|
} else if (addable) {
|
14030
|
-
|
14044
|
+
list.push(vue.createVNode("div", {
|
14031
14045
|
"onClick": this.handleTabAdd
|
14032
14046
|
}, [vue.createVNode(plus, {
|
14033
14047
|
"width": 26,
|
14034
14048
|
"height": 26
|
14035
|
-
}, null)]);
|
14049
|
+
}, null)]));
|
14036
14050
|
}
|
14037
|
-
list.push(addSlot);
|
14038
14051
|
if (typeof this.$slots.setting === "function") {
|
14039
14052
|
list.push((_d = (_c = this.$slots).setting) == null ? void 0 : _d.call(_c, vue.h));
|
14040
14053
|
}
|
14041
|
-
|
14042
|
-
|
14043
|
-
|
14044
|
-
|
14054
|
+
if (list.length) {
|
14055
|
+
return vue.createVNode("div", {
|
14056
|
+
"class": "bk-tab-header-operation"
|
14057
|
+
}, [list.map((item, index) => vue.createVNode("div", {
|
14058
|
+
"class": "bk-tab-header-item",
|
14059
|
+
"key": index
|
14060
|
+
}, [item]))]);
|
14061
|
+
}
|
14062
|
+
return null;
|
14045
14063
|
};
|
14046
14064
|
return vue.createVNode("div", {
|
14047
14065
|
"style": {
|
@@ -14050,9 +14068,7 @@ ${$(r2)}`), n2;
|
|
14050
14068
|
"class": "bk-tab-header"
|
14051
14069
|
}, [vue.createVNode("div", {
|
14052
14070
|
"class": "bk-tab-header-nav"
|
14053
|
-
}, [renderNavs()]),
|
14054
|
-
"class": "bk-tab-header-operation"
|
14055
|
-
}, [renderSlot()])]);
|
14071
|
+
}, [renderNavs()]), renderSlot()]);
|
14056
14072
|
}
|
14057
14073
|
});
|
14058
14074
|
var Tab = vue.defineComponent({
|
@@ -14060,28 +14076,11 @@ ${$(r2)}`), n2;
|
|
14060
14076
|
components: {
|
14061
14077
|
TabNav
|
14062
14078
|
},
|
14063
|
-
props:
|
14064
|
-
active: {
|
14065
|
-
type: String || Number
|
14066
|
-
},
|
14067
|
-
type: PropTypes.commonType(["card", "border-card", "unborder-card"], "type").def("border-card"),
|
14068
|
-
tabPosition: PropTypes.commonType(["left", "right", "top"], "position").def("top"),
|
14069
|
-
closable: PropTypes.bool.def(false),
|
14070
|
-
addable: PropTypes.bool.def(false),
|
14071
|
-
sortable: PropTypes.bool.def(false),
|
14072
|
-
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
14073
|
-
labelHeight: PropTypes.number.def(50),
|
14074
|
-
scrollStep: PropTypes.number.def(200),
|
14075
|
-
extCls: PropTypes.string.def(""),
|
14076
|
-
validateActive: PropTypes.bool.def(true),
|
14077
|
-
showHeader: PropTypes.bool.def(true),
|
14078
|
-
changeOnHover: PropTypes.bool.def(false),
|
14079
|
-
changeOnHoverDelay: PropTypes.number.def(1e3)
|
14080
|
-
},
|
14079
|
+
props: tabProps,
|
14081
14080
|
emits: [
|
14082
14081
|
"add-panel",
|
14083
14082
|
"tab-change",
|
14084
|
-
"
|
14083
|
+
"remove-panel",
|
14085
14084
|
"sort-change",
|
14086
14085
|
"on-drag-tab",
|
14087
14086
|
"add",
|
@@ -14098,7 +14097,7 @@ ${$(r2)}`), n2;
|
|
14098
14097
|
const panels = vue.ref([]);
|
14099
14098
|
const instance = vue.getCurrentInstance();
|
14100
14099
|
if (typeof slots.panel === "function") {
|
14101
|
-
panels.value = slots.
|
14100
|
+
panels.value = slots.panel();
|
14102
14101
|
}
|
14103
14102
|
if (typeof slots.default === "function") {
|
14104
14103
|
panels.value = slots.default();
|
@@ -14163,11 +14162,26 @@ ${$(r2)}`), n2;
|
|
14163
14162
|
},
|
14164
14163
|
tabRemove(index, panel) {
|
14165
14164
|
this.$emit("remove", index, panel);
|
14166
|
-
this.$emit("
|
14165
|
+
this.$emit("remove-panel", index, panel);
|
14167
14166
|
},
|
14168
|
-
tabSort(dragTabIndex, dropTabIndex) {
|
14169
|
-
|
14170
|
-
|
14167
|
+
tabSort(dragTabIndex, dropTabIndex, sortType) {
|
14168
|
+
if (sortType === "insert") {
|
14169
|
+
if (dragTabIndex < dropTabIndex) {
|
14170
|
+
this.panels.splice(dropTabIndex + 1, 0, this.panels[dragTabIndex]);
|
14171
|
+
this.panels.splice(dragTabIndex, 1);
|
14172
|
+
} else if (dragTabIndex > dropTabIndex) {
|
14173
|
+
this.panels.splice(dropTabIndex, 0, this.panels[dragTabIndex]);
|
14174
|
+
this.panels.splice(dragTabIndex + 1, 1);
|
14175
|
+
} else {
|
14176
|
+
return false;
|
14177
|
+
}
|
14178
|
+
} else {
|
14179
|
+
const swap = this.panels[dropTabIndex];
|
14180
|
+
this.panels[dropTabIndex] = this.panels[dragTabIndex];
|
14181
|
+
this.panels[dragTabIndex] = swap;
|
14182
|
+
}
|
14183
|
+
this.$emit("sort", dragTabIndex, dropTabIndex, sortType);
|
14184
|
+
this.$emit("sort-change", dragTabIndex, dropTabIndex, sortType);
|
14171
14185
|
},
|
14172
14186
|
tabDrag(dragTabIndex, dragEvent) {
|
14173
14187
|
this.$emit("drag", dragTabIndex, dragEvent);
|
@@ -14235,18 +14249,7 @@ ${$(r2)}`), n2;
|
|
14235
14249
|
});
|
14236
14250
|
var TabPanel = vue.defineComponent({
|
14237
14251
|
name: "TabPanel",
|
14238
|
-
props:
|
14239
|
-
name: {
|
14240
|
-
type: String || Number
|
14241
|
-
},
|
14242
|
-
label: String || Function,
|
14243
|
-
closable: Function || Boolean,
|
14244
|
-
visible: PropTypes.bool.def(true),
|
14245
|
-
disabled: PropTypes.bool.def(null) || void 0,
|
14246
|
-
sortable: Function || Boolean,
|
14247
|
-
renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
|
14248
|
-
panel: String || Function
|
14249
|
-
},
|
14252
|
+
props: tabPanelProps,
|
14250
14253
|
render() {
|
14251
14254
|
const active = this.name === this.$parent.active;
|
14252
14255
|
const getContent = () => {
|
@@ -14270,8 +14273,7 @@ ${$(r2)}`), n2;
|
|
14270
14273
|
}, [getContent()]), [[vue.vShow, active]]);
|
14271
14274
|
}
|
14272
14275
|
});
|
14273
|
-
const
|
14274
|
-
const BKTabPanel = withInstall(TabPanel);
|
14276
|
+
const BkTab = withInstallProps(Tab, { TabPanel });
|
14275
14277
|
const instances = {
|
14276
14278
|
"top-left": [],
|
14277
14279
|
"top-right": [],
|
@@ -20128,8 +20130,8 @@ ${$(r2)}`), n2;
|
|
20128
20130
|
Tag: BkTag,
|
20129
20131
|
TagInput,
|
20130
20132
|
Divider: BkDivider,
|
20131
|
-
Tab:
|
20132
|
-
TabPanel
|
20133
|
+
Tab: BkTab,
|
20134
|
+
TabPanel,
|
20133
20135
|
Message,
|
20134
20136
|
Notify,
|
20135
20137
|
Menu: BkMenu,
|
@@ -20197,8 +20199,8 @@ ${$(r2)}`), n2;
|
|
20197
20199
|
exports2.Steps = BkSteps;
|
20198
20200
|
exports2.Swiper = BkSwiper;
|
20199
20201
|
exports2.Switcher = BkSwitcher;
|
20200
|
-
exports2.Tab =
|
20201
|
-
exports2.TabPanel =
|
20202
|
+
exports2.Tab = BkTab;
|
20203
|
+
exports2.TabPanel = TabPanel;
|
20202
20204
|
exports2.Table = BkTable;
|
20203
20205
|
exports2.Tag = BkTag;
|
20204
20206
|
exports2.TagInput = TagInput;
|