bkui-vue 0.0.1-beta.29 → 0.0.1-beta.31
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 -140
- package/dist/bkui-vue.esm.js +141 -140
- package/dist/bkui-vue.umd.js +141 -140
- package/dist/style.css +100 -5
- package/lib/code-diff/index.d.ts +139 -3
- package/lib/code-diff/index.js +15 -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/radio/index.js +1 -1
- package/lib/radio/radio.css +2 -2
- package/lib/radio/radio.less +2 -2
- package/lib/radio/radio.variable.css +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 +1 -5
- package/lib/table/index.js +2 -2
- package/lib/table/props.d.ts +0 -1
- package/lib/table/table.d.ts +1 -3
- 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
|
});
|
@@ -9922,7 +9924,7 @@ ${$(r2)}`), n2;
|
|
9922
9924
|
render() {
|
9923
9925
|
const radioClass = classes({
|
9924
9926
|
"bk-radio": true,
|
9925
|
-
"is-
|
9927
|
+
"is-focusd": this.isFocus,
|
9926
9928
|
"is-disabled": this.isDisabled,
|
9927
9929
|
"is-checked": this.isCheck
|
9928
9930
|
});
|
@@ -9981,7 +9983,7 @@ ${$(r2)}`), n2;
|
|
9981
9983
|
render() {
|
9982
9984
|
const radioClass = classes({
|
9983
9985
|
"bk-radio-button": true,
|
9984
|
-
"is-
|
9986
|
+
"is-focusd": this.isFocus,
|
9985
9987
|
"is-disabled": this.isDisabled,
|
9986
9988
|
"is-checked": this.isCheck
|
9987
9989
|
});
|
@@ -10032,9 +10034,10 @@ ${$(r2)}`), n2;
|
|
10032
10034
|
return {};
|
10033
10035
|
},
|
10034
10036
|
render() {
|
10037
|
+
var _a;
|
10035
10038
|
return vue.createVNode("div", {
|
10036
10039
|
"class": "bk-radio-group"
|
10037
|
-
}, [this.$slots.default()]);
|
10040
|
+
}, [(_a = this.$slots) == null ? void 0 : _a.default()]);
|
10038
10041
|
}
|
10039
10042
|
});
|
10040
10043
|
const BkRadio = withInstallProps(Component$e, { Group: RadioGroup, Button: RadioButton });
|
@@ -11711,7 +11714,7 @@ ${$(r2)}`), n2;
|
|
11711
11714
|
}
|
11712
11715
|
});
|
11713
11716
|
const BkSwitcher = withInstall(Component$7);
|
11714
|
-
const EventProps
|
11717
|
+
const EventProps = {
|
11715
11718
|
onContentScroll: Function
|
11716
11719
|
};
|
11717
11720
|
const virtualRenderProps = __spreadValues({
|
@@ -11734,7 +11737,7 @@ ${$(r2)}`), n2;
|
|
11734
11737
|
scrollPosition: PropTypes.string.def("content"),
|
11735
11738
|
abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
|
11736
11739
|
throttleDelay: PropTypes.number.def(60)
|
11737
|
-
}, EventProps
|
11740
|
+
}, EventProps);
|
11738
11741
|
function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
11739
11742
|
let startIndex = 0;
|
11740
11743
|
let height = 0;
|
@@ -11963,10 +11966,7 @@ ${$(r2)}`), n2;
|
|
11963
11966
|
});
|
11964
11967
|
const BkVirtualRender = withInstall(Component$6);
|
11965
11968
|
const BORDER_OPRIONS = ["none", "row", "col", "outer"];
|
11966
|
-
const
|
11967
|
-
onRowClick: Function
|
11968
|
-
};
|
11969
|
-
const tableProps = __spreadValues({
|
11969
|
+
const tableProps = {
|
11970
11970
|
data: PropTypes.arrayOf(PropTypes.any).def([]),
|
11971
11971
|
columns: PropTypes.arrayOf(PropTypes.shape({
|
11972
11972
|
label: PropTypes.oneOfType([PropTypes.func.def(() => ""), PropTypes.string.def("")]),
|
@@ -11985,7 +11985,7 @@ ${$(r2)}`), n2;
|
|
11985
11985
|
border: PropTypes.arrayOf(PropTypes.commonType(BORDER_OPRIONS, "border")).def(["row"]),
|
11986
11986
|
pagination: PropTypes.oneOfType([PropTypes.bool.def(false), PropTypes.object.def({})]).def(false),
|
11987
11987
|
remotePagination: PropTypes.bool.def(false)
|
11988
|
-
}
|
11988
|
+
};
|
11989
11989
|
function _isSlot(s2) {
|
11990
11990
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !vue.isVNode(s2);
|
11991
11991
|
}
|
@@ -12085,6 +12085,8 @@ ${$(r2)}`), n2;
|
|
12085
12085
|
localCurrent.value = proxy.totalPageNum;
|
12086
12086
|
}
|
12087
12087
|
});
|
12088
|
+
}, {
|
12089
|
+
immediate: true
|
12088
12090
|
});
|
12089
12091
|
vue.nextTick(() => {
|
12090
12092
|
vue.watch(() => proxy.totalPageNum, (totalPageNum) => {
|
@@ -12364,7 +12366,7 @@ ${$(r2)}`), n2;
|
|
12364
12366
|
var Component$5 = vue.defineComponent({
|
12365
12367
|
name: "Pagination",
|
12366
12368
|
props: paginationProps,
|
12367
|
-
emits: ["update:modelValue", "change", "update:limit", "
|
12369
|
+
emits: ["update:modelValue", "change", "update:limit", "limitChange"],
|
12368
12370
|
setup(props, context) {
|
12369
12371
|
const totalPageNum = vue.ref(0);
|
12370
12372
|
const {
|
@@ -12399,7 +12401,7 @@ ${$(r2)}`), n2;
|
|
12399
12401
|
context.emit("change", smallListCurrent2);
|
12400
12402
|
});
|
12401
12403
|
vue.watch(localLimit, (localLimit2) => {
|
12402
|
-
context.emit("
|
12404
|
+
context.emit("limitChange", localLimit2);
|
12403
12405
|
});
|
12404
12406
|
return {
|
12405
12407
|
totalPageNum,
|
@@ -12604,14 +12606,14 @@ ${$(r2)}`), n2;
|
|
12604
12606
|
Object.assign(this.props.pagination, {
|
12605
12607
|
limit
|
12606
12608
|
});
|
12607
|
-
this.context.emit("
|
12609
|
+
this.context.emit("pageLimitChange", limit);
|
12608
12610
|
}
|
12609
12611
|
hanlePageChange(current) {
|
12610
12612
|
Object.assign(this.props.pagination, {
|
12611
12613
|
current,
|
12612
12614
|
value: current
|
12613
12615
|
});
|
12614
|
-
this.context.emit("
|
12616
|
+
this.context.emit("pageValueChange", current);
|
12615
12617
|
}
|
12616
12618
|
setColumnActive(index, single = false) {
|
12617
12619
|
const col = this.propActiveCols.find((item) => item.index === index);
|
@@ -12696,7 +12698,7 @@ ${$(r2)}`), n2;
|
|
12696
12698
|
var Component$4 = vue.defineComponent({
|
12697
12699
|
name: "Table",
|
12698
12700
|
props: tableProps,
|
12699
|
-
emits: ["
|
12701
|
+
emits: ["columnPick", "rowClick", "pageLimitChange", "pageValueChange"],
|
12700
12702
|
setup(props, ctx) {
|
12701
12703
|
const activeCols = vue.reactive(resolveActiveColumns(props));
|
12702
12704
|
const colgroups = vue.reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
|
@@ -13762,15 +13764,16 @@ ${$(r2)}`), n2;
|
|
13762
13764
|
TagInput.install = (Vue) => {
|
13763
13765
|
Vue.component(TagInput.name, TagInput);
|
13764
13766
|
};
|
13767
|
+
const dividerProps = {
|
13768
|
+
direction: PropTypes.commonType(["horizontal", "vertical"], "direction").def("horizontal"),
|
13769
|
+
align: PropTypes.commonType(["left", "center", "right"], "align").def("center"),
|
13770
|
+
color: PropTypes.string.def("#dde4eb"),
|
13771
|
+
width: PropTypes.number.def(1),
|
13772
|
+
type: PropTypes.commonType(["dashed", "solid"], "lineType").def("dashed")
|
13773
|
+
};
|
13765
13774
|
var bkDivider = vue.defineComponent({
|
13766
13775
|
name: "Divider",
|
13767
|
-
props:
|
13768
|
-
direction: PropTypes.commonType(["horizontal", "vertical"], "direction").def("horizontal"),
|
13769
|
-
align: PropTypes.commonType(["left", "center", "right"], "align").def("center"),
|
13770
|
-
color: PropTypes.string.def("#dde4eb"),
|
13771
|
-
width: PropTypes.number.def(1),
|
13772
|
-
type: PropTypes.commonType(["dashed", "solid"], "lineType").def("dashed")
|
13773
|
-
},
|
13776
|
+
props: dividerProps,
|
13774
13777
|
render() {
|
13775
13778
|
const styles = () => {
|
13776
13779
|
if (this.direction === "vertical") {
|
@@ -13795,46 +13798,73 @@ ${$(r2)}`), n2;
|
|
13795
13798
|
}
|
13796
13799
|
});
|
13797
13800
|
const BkDivider = withInstall(bkDivider);
|
13801
|
+
const tabNavEventProps = {
|
13802
|
+
tabAdd: {
|
13803
|
+
type: Function,
|
13804
|
+
default: () => ({})
|
13805
|
+
},
|
13806
|
+
tabChange: {
|
13807
|
+
type: Function,
|
13808
|
+
default: (name) => name
|
13809
|
+
},
|
13810
|
+
tabRemove: {
|
13811
|
+
type: Function,
|
13812
|
+
default: (name) => name
|
13813
|
+
},
|
13814
|
+
tabSort: {
|
13815
|
+
type: Function,
|
13816
|
+
default: () => ({})
|
13817
|
+
},
|
13818
|
+
tabDrag: {
|
13819
|
+
type: Function,
|
13820
|
+
default: () => ({})
|
13821
|
+
}
|
13822
|
+
};
|
13823
|
+
const tabProps = {
|
13824
|
+
active: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13825
|
+
type: PropTypes.commonType(["card", "border-card", "unborder-card"], "type").def("border-card"),
|
13826
|
+
tabPosition: PropTypes.commonType(["left", "right", "top"], "position").def("top"),
|
13827
|
+
closable: Boolean,
|
13828
|
+
addable: Boolean,
|
13829
|
+
sortable: Boolean,
|
13830
|
+
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13831
|
+
labelHeight: PropTypes.number.def(50),
|
13832
|
+
scrollStep: PropTypes.number.def(200),
|
13833
|
+
extCls: PropTypes.string.def(""),
|
13834
|
+
validateActive: PropTypes.bool.def(true),
|
13835
|
+
showHeader: PropTypes.bool.def(true),
|
13836
|
+
changeOnHover: PropTypes.bool.def(false),
|
13837
|
+
changeOnHoverDelay: PropTypes.number.def(1e3)
|
13838
|
+
};
|
13839
|
+
const tabNavProps = __spreadValues({
|
13840
|
+
active: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13841
|
+
panels: {
|
13842
|
+
type: Array,
|
13843
|
+
default: () => []
|
13844
|
+
},
|
13845
|
+
closable: Boolean,
|
13846
|
+
addable: Boolean,
|
13847
|
+
sortable: Boolean,
|
13848
|
+
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13849
|
+
labelHeight: PropTypes.number.def(50),
|
13850
|
+
scrollStep: PropTypes.number.def(200),
|
13851
|
+
validateActive: PropTypes.bool.def(true),
|
13852
|
+
changeOnHover: PropTypes.bool.def(false),
|
13853
|
+
changeOnHoverDelay: PropTypes.number.def(1e3)
|
13854
|
+
}, tabNavEventProps);
|
13855
|
+
const tabPanelProps = {
|
13856
|
+
name: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13857
|
+
label: PropTypes.string || PropTypes.func,
|
13858
|
+
closable: PropTypes.bool,
|
13859
|
+
visible: PropTypes.bool.def(true),
|
13860
|
+
disabled: PropTypes.bool,
|
13861
|
+
sortable: PropTypes.bool,
|
13862
|
+
renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
|
13863
|
+
panel: PropTypes.string || PropTypes.func
|
13864
|
+
};
|
13798
13865
|
var TabNav = vue.defineComponent({
|
13799
13866
|
name: "TabNav",
|
13800
|
-
props:
|
13801
|
-
active: {
|
13802
|
-
type: String || Number
|
13803
|
-
},
|
13804
|
-
panels: {
|
13805
|
-
type: Array,
|
13806
|
-
default: () => []
|
13807
|
-
},
|
13808
|
-
closable: PropTypes.bool.def(false),
|
13809
|
-
addable: PropTypes.bool.def(false),
|
13810
|
-
sortable: PropTypes.bool.def(false),
|
13811
|
-
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13812
|
-
labelHeight: PropTypes.number.def(50),
|
13813
|
-
scrollStep: PropTypes.number.def(200),
|
13814
|
-
validateActive: PropTypes.bool.def(true),
|
13815
|
-
changeOnHover: PropTypes.bool.def(false),
|
13816
|
-
changeOnHoverDelay: PropTypes.number.def(1e3),
|
13817
|
-
tabAdd: {
|
13818
|
-
type: Function,
|
13819
|
-
default: () => ({})
|
13820
|
-
},
|
13821
|
-
tabChange: {
|
13822
|
-
type: Function,
|
13823
|
-
default: () => ({})
|
13824
|
-
},
|
13825
|
-
tabRemove: {
|
13826
|
-
type: Function,
|
13827
|
-
default: () => ({})
|
13828
|
-
},
|
13829
|
-
tabSort: {
|
13830
|
-
type: Function,
|
13831
|
-
default: () => ({})
|
13832
|
-
},
|
13833
|
-
tabDrag: {
|
13834
|
-
type: Function,
|
13835
|
-
default: () => ({})
|
13836
|
-
}
|
13837
|
-
},
|
13867
|
+
props: tabNavProps,
|
13838
13868
|
setup(props) {
|
13839
13869
|
const navs = vue.computed(() => {
|
13840
13870
|
if (!Array.isArray(props.panels) || !props.panels.length) {
|
@@ -13905,18 +13935,15 @@ ${$(r2)}`), n2;
|
|
13905
13935
|
distinctRoots(el1, el2) {
|
13906
13936
|
return el1 === el2;
|
13907
13937
|
},
|
13908
|
-
swapArr(arr, a2, b2) {
|
13909
|
-
const swap = arr[a2];
|
13910
|
-
arr[a2] = arr[b2];
|
13911
|
-
arr[b2] = swap;
|
13912
|
-
},
|
13913
13938
|
handleTabAdd(e) {
|
13914
13939
|
this.tabAdd(e);
|
13915
13940
|
},
|
13916
13941
|
dragstart(index, $event) {
|
13917
13942
|
this.dragStartIndex = index;
|
13918
13943
|
this.draggingEle = this.guid;
|
13919
|
-
$event.dataTransfer
|
13944
|
+
Object.assign($event.dataTransfer, {
|
13945
|
+
effectAllowed: "move"
|
13946
|
+
});
|
13920
13947
|
this.tabDrag(index, $event);
|
13921
13948
|
},
|
13922
13949
|
dragenter(index) {
|
@@ -13933,20 +13960,7 @@ ${$(r2)}`), n2;
|
|
13933
13960
|
if (!this.distinctRoots(this.draggingEle, this.guid)) {
|
13934
13961
|
return false;
|
13935
13962
|
}
|
13936
|
-
|
13937
|
-
if (this.dragStartIndex < index) {
|
13938
|
-
this.panels.splice(index + 1, 0, this.panels[this.dragStartIndex]);
|
13939
|
-
this.panels.splice(this.dragStartIndex, 1);
|
13940
|
-
} else if (this.dragStartIndex > index) {
|
13941
|
-
this.panels.splice(index, 0, this.panels[this.dragStartIndex]);
|
13942
|
-
this.panels.splice(this.dragStartIndex + 1, 1);
|
13943
|
-
} else {
|
13944
|
-
return false;
|
13945
|
-
}
|
13946
|
-
} else {
|
13947
|
-
this.swapArr(this.panels, this.dragStartIndex, index);
|
13948
|
-
}
|
13949
|
-
this.tabSort(this.dragStartIndex, index);
|
13963
|
+
this.tabSort(this.dragStartIndex, index, sortType);
|
13950
13964
|
},
|
13951
13965
|
handleTabChange(name) {
|
13952
13966
|
this.tabChange(name);
|
@@ -13987,7 +14001,7 @@ ${$(r2)}`), n2;
|
|
13987
14001
|
}
|
13988
14002
|
return classNames.join(" ");
|
13989
14003
|
};
|
13990
|
-
const getValue = (
|
14004
|
+
const getValue = (curentValue, parentValue) => curentValue || parentValue;
|
13991
14005
|
return vue.createVNode("div", {
|
13992
14006
|
"key": name,
|
13993
14007
|
"onClick": () => this.handleTabChange(name),
|
@@ -14019,26 +14033,29 @@ ${$(r2)}`), n2;
|
|
14019
14033
|
});
|
14020
14034
|
const renderSlot = () => {
|
14021
14035
|
var _a, _b, _c, _d;
|
14022
|
-
let addSlot;
|
14023
14036
|
const list = [];
|
14024
14037
|
if (typeof this.$slots.add === "function") {
|
14025
|
-
|
14038
|
+
list.push((_b = (_a = this.$slots).add) == null ? void 0 : _b.call(_a, vue.h));
|
14026
14039
|
} else if (addable) {
|
14027
|
-
|
14040
|
+
list.push(vue.createVNode("div", {
|
14028
14041
|
"onClick": this.handleTabAdd
|
14029
14042
|
}, [vue.createVNode(plus, {
|
14030
14043
|
"width": 26,
|
14031
14044
|
"height": 26
|
14032
|
-
}, null)]);
|
14045
|
+
}, null)]));
|
14033
14046
|
}
|
14034
|
-
list.push(addSlot);
|
14035
14047
|
if (typeof this.$slots.setting === "function") {
|
14036
14048
|
list.push((_d = (_c = this.$slots).setting) == null ? void 0 : _d.call(_c, vue.h));
|
14037
14049
|
}
|
14038
|
-
|
14039
|
-
|
14040
|
-
|
14041
|
-
|
14050
|
+
if (list.length) {
|
14051
|
+
return vue.createVNode("div", {
|
14052
|
+
"class": "bk-tab-header-operation"
|
14053
|
+
}, [list.map((item, index) => vue.createVNode("div", {
|
14054
|
+
"class": "bk-tab-header-item",
|
14055
|
+
"key": index
|
14056
|
+
}, [item]))]);
|
14057
|
+
}
|
14058
|
+
return null;
|
14042
14059
|
};
|
14043
14060
|
return vue.createVNode("div", {
|
14044
14061
|
"style": {
|
@@ -14047,9 +14064,7 @@ ${$(r2)}`), n2;
|
|
14047
14064
|
"class": "bk-tab-header"
|
14048
14065
|
}, [vue.createVNode("div", {
|
14049
14066
|
"class": "bk-tab-header-nav"
|
14050
|
-
}, [renderNavs()]),
|
14051
|
-
"class": "bk-tab-header-operation"
|
14052
|
-
}, [renderSlot()])]);
|
14067
|
+
}, [renderNavs()]), renderSlot()]);
|
14053
14068
|
}
|
14054
14069
|
});
|
14055
14070
|
var Tab = vue.defineComponent({
|
@@ -14057,28 +14072,11 @@ ${$(r2)}`), n2;
|
|
14057
14072
|
components: {
|
14058
14073
|
TabNav
|
14059
14074
|
},
|
14060
|
-
props:
|
14061
|
-
active: {
|
14062
|
-
type: String || Number
|
14063
|
-
},
|
14064
|
-
type: PropTypes.commonType(["card", "border-card", "unborder-card"], "type").def("border-card"),
|
14065
|
-
tabPosition: PropTypes.commonType(["left", "right", "top"], "position").def("top"),
|
14066
|
-
closable: PropTypes.bool.def(false),
|
14067
|
-
addable: PropTypes.bool.def(false),
|
14068
|
-
sortable: PropTypes.bool.def(false),
|
14069
|
-
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
14070
|
-
labelHeight: PropTypes.number.def(50),
|
14071
|
-
scrollStep: PropTypes.number.def(200),
|
14072
|
-
extCls: PropTypes.string.def(""),
|
14073
|
-
validateActive: PropTypes.bool.def(true),
|
14074
|
-
showHeader: PropTypes.bool.def(true),
|
14075
|
-
changeOnHover: PropTypes.bool.def(false),
|
14076
|
-
changeOnHoverDelay: PropTypes.number.def(1e3)
|
14077
|
-
},
|
14075
|
+
props: tabProps,
|
14078
14076
|
emits: [
|
14079
14077
|
"add-panel",
|
14080
14078
|
"tab-change",
|
14081
|
-
"
|
14079
|
+
"remove-panel",
|
14082
14080
|
"sort-change",
|
14083
14081
|
"on-drag-tab",
|
14084
14082
|
"add",
|
@@ -14095,7 +14093,7 @@ ${$(r2)}`), n2;
|
|
14095
14093
|
const panels = vue.ref([]);
|
14096
14094
|
const instance = vue.getCurrentInstance();
|
14097
14095
|
if (typeof slots.panel === "function") {
|
14098
|
-
panels.value = slots.
|
14096
|
+
panels.value = slots.panel();
|
14099
14097
|
}
|
14100
14098
|
if (typeof slots.default === "function") {
|
14101
14099
|
panels.value = slots.default();
|
@@ -14160,11 +14158,26 @@ ${$(r2)}`), n2;
|
|
14160
14158
|
},
|
14161
14159
|
tabRemove(index, panel) {
|
14162
14160
|
this.$emit("remove", index, panel);
|
14163
|
-
this.$emit("
|
14161
|
+
this.$emit("remove-panel", index, panel);
|
14164
14162
|
},
|
14165
|
-
tabSort(dragTabIndex, dropTabIndex) {
|
14166
|
-
|
14167
|
-
|
14163
|
+
tabSort(dragTabIndex, dropTabIndex, sortType) {
|
14164
|
+
if (sortType === "insert") {
|
14165
|
+
if (dragTabIndex < dropTabIndex) {
|
14166
|
+
this.panels.splice(dropTabIndex + 1, 0, this.panels[dragTabIndex]);
|
14167
|
+
this.panels.splice(dragTabIndex, 1);
|
14168
|
+
} else if (dragTabIndex > dropTabIndex) {
|
14169
|
+
this.panels.splice(dropTabIndex, 0, this.panels[dragTabIndex]);
|
14170
|
+
this.panels.splice(dragTabIndex + 1, 1);
|
14171
|
+
} else {
|
14172
|
+
return false;
|
14173
|
+
}
|
14174
|
+
} else {
|
14175
|
+
const swap = this.panels[dropTabIndex];
|
14176
|
+
this.panels[dropTabIndex] = this.panels[dragTabIndex];
|
14177
|
+
this.panels[dragTabIndex] = swap;
|
14178
|
+
}
|
14179
|
+
this.$emit("sort", dragTabIndex, dropTabIndex, sortType);
|
14180
|
+
this.$emit("sort-change", dragTabIndex, dropTabIndex, sortType);
|
14168
14181
|
},
|
14169
14182
|
tabDrag(dragTabIndex, dragEvent) {
|
14170
14183
|
this.$emit("drag", dragTabIndex, dragEvent);
|
@@ -14232,18 +14245,7 @@ ${$(r2)}`), n2;
|
|
14232
14245
|
});
|
14233
14246
|
var TabPanel = vue.defineComponent({
|
14234
14247
|
name: "TabPanel",
|
14235
|
-
props:
|
14236
|
-
name: {
|
14237
|
-
type: String || Number
|
14238
|
-
},
|
14239
|
-
label: String || Function,
|
14240
|
-
closable: Function || Boolean,
|
14241
|
-
visible: PropTypes.bool.def(true),
|
14242
|
-
disabled: PropTypes.bool.def(null) || void 0,
|
14243
|
-
sortable: Function || Boolean,
|
14244
|
-
renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
|
14245
|
-
panel: String || Function
|
14246
|
-
},
|
14248
|
+
props: tabPanelProps,
|
14247
14249
|
render() {
|
14248
14250
|
const active = this.name === this.$parent.active;
|
14249
14251
|
const getContent = () => {
|
@@ -14267,8 +14269,7 @@ ${$(r2)}`), n2;
|
|
14267
14269
|
}, [getContent()]), [[vue.vShow, active]]);
|
14268
14270
|
}
|
14269
14271
|
});
|
14270
|
-
const
|
14271
|
-
const BKTabPanel = withInstall(TabPanel);
|
14272
|
+
const BkTab = withInstallProps(Tab, { TabPanel });
|
14272
14273
|
const instances = {
|
14273
14274
|
"top-left": [],
|
14274
14275
|
"top-right": [],
|
@@ -20125,8 +20126,8 @@ ${$(r2)}`), n2;
|
|
20125
20126
|
Tag: BkTag,
|
20126
20127
|
TagInput,
|
20127
20128
|
Divider: BkDivider,
|
20128
|
-
Tab:
|
20129
|
-
TabPanel
|
20129
|
+
Tab: BkTab,
|
20130
|
+
TabPanel,
|
20130
20131
|
Message,
|
20131
20132
|
Notify,
|
20132
20133
|
Menu: BkMenu,
|
@@ -20194,8 +20195,8 @@ ${$(r2)}`), n2;
|
|
20194
20195
|
exports2.Steps = BkSteps;
|
20195
20196
|
exports2.Swiper = BkSwiper;
|
20196
20197
|
exports2.Switcher = BkSwitcher;
|
20197
|
-
exports2.Tab =
|
20198
|
-
exports2.TabPanel =
|
20198
|
+
exports2.Tab = BkTab;
|
20199
|
+
exports2.TabPanel = TabPanel;
|
20199
20200
|
exports2.Table = BkTable;
|
20200
20201
|
exports2.Tag = BkTag;
|
20201
20202
|
exports2.TagInput = TagInput;
|