bkui-vue 0.0.1-beta.30 → 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 +135 -137
- package/dist/bkui-vue.esm.js +135 -137
- package/dist/bkui-vue.umd.js +135 -137
- package/dist/style.css +98 -3
- 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/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.esm.js
CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key, value) => {
|
|
33
33
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
34
34
|
return value;
|
35
35
|
};
|
36
|
-
import { createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, Transition, getCurrentInstance, provide, inject, nextTick, isVNode,
|
36
|
+
import { createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, Transition, getCurrentInstance, provide, inject, Fragment, nextTick, isVNode, createTextVNode, toRefs, customRef, onBeforeMount, withDirectives, vShow, toRef, unref, resolveDirective, vModelText, watchEffect, onUpdated, render, onUnmounted, Teleport } from "vue";
|
37
37
|
var reset = "";
|
38
38
|
var alert = "";
|
39
39
|
var backtop = "";
|
@@ -78,6 +78,7 @@ var virtualRender$1 = "";
|
|
78
78
|
var transfer = "";
|
79
79
|
var pagination = "";
|
80
80
|
var timeline = "";
|
81
|
+
var codeDiff = "";
|
81
82
|
var resizeLayout = "";
|
82
83
|
var tagInput = "";
|
83
84
|
const BKLAYERD_INDEX_EFAULT_VALUE = {
|
@@ -8459,6 +8460,7 @@ const loadingTypes = {
|
|
8459
8460
|
type: Function
|
8460
8461
|
},
|
8461
8462
|
loading: PropTypes.bool,
|
8463
|
+
inline: PropTypes.bool.def(true),
|
8462
8464
|
theme: PropTypes.theme(["white", "primary", "warning", "success", "danger"]),
|
8463
8465
|
title: PropTypes.string.def(""),
|
8464
8466
|
size: PropTypes.commonType(Object.values(BkLoadingSize)).def(BkLoadingSize.Normal),
|
@@ -8477,9 +8479,9 @@ var Component$r = defineComponent({
|
|
8477
8479
|
"class": `oval oval-${i}`
|
8478
8480
|
}, null))]);
|
8479
8481
|
const loadingWrapperCls = computed(() => classes({
|
8482
|
+
"bk-loading-wrapper": props.loading,
|
8480
8483
|
"bk-nested-loading": !!ctx.slots.default
|
8481
|
-
}
|
8482
|
-
console.log(props.theme);
|
8484
|
+
}));
|
8483
8485
|
const containerCls = computed(() => classes({
|
8484
8486
|
[`bk-loading-size-${props.size}`]: !!props.size,
|
8485
8487
|
[`bk-loading-${props.theme}`]: !!props.theme
|
@@ -8497,15 +8499,15 @@ var Component$r = defineComponent({
|
|
8497
8499
|
});
|
8498
8500
|
return () => {
|
8499
8501
|
var _a, _b;
|
8500
|
-
return
|
8502
|
+
return createVNode("div", {
|
8501
8503
|
"class": loadingWrapperCls.value
|
8502
|
-
}, [createVNode("div", {
|
8504
|
+
}, [props.loading && createVNode(Fragment, null, [createVNode("div", {
|
8503
8505
|
"class": containerCls.value
|
8504
8506
|
}, [indicator.value, hasTitle.value && createVNode("div", {
|
8505
8507
|
"class": "bk-loading-title"
|
8506
8508
|
}, [props.title])]), ctx.slots.default && createVNode("div", {
|
8507
8509
|
"class": "bk-loading-mask"
|
8508
|
-
},
|
8510
|
+
}, null)]), (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
8509
8511
|
};
|
8510
8512
|
}
|
8511
8513
|
});
|
@@ -11709,7 +11711,7 @@ var Component$7 = defineComponent({
|
|
11709
11711
|
}
|
11710
11712
|
});
|
11711
11713
|
const BkSwitcher = withInstall(Component$7);
|
11712
|
-
const EventProps
|
11714
|
+
const EventProps = {
|
11713
11715
|
onContentScroll: Function
|
11714
11716
|
};
|
11715
11717
|
const virtualRenderProps = __spreadValues({
|
@@ -11732,7 +11734,7 @@ const virtualRenderProps = __spreadValues({
|
|
11732
11734
|
scrollPosition: PropTypes.string.def("content"),
|
11733
11735
|
abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
|
11734
11736
|
throttleDelay: PropTypes.number.def(60)
|
11735
|
-
}, EventProps
|
11737
|
+
}, EventProps);
|
11736
11738
|
function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
11737
11739
|
let startIndex = 0;
|
11738
11740
|
let height = 0;
|
@@ -11961,10 +11963,7 @@ var Component$6 = defineComponent({
|
|
11961
11963
|
});
|
11962
11964
|
const BkVirtualRender = withInstall(Component$6);
|
11963
11965
|
const BORDER_OPRIONS = ["none", "row", "col", "outer"];
|
11964
|
-
const
|
11965
|
-
onRowClick: Function
|
11966
|
-
};
|
11967
|
-
const tableProps = __spreadValues({
|
11966
|
+
const tableProps = {
|
11968
11967
|
data: PropTypes.arrayOf(PropTypes.any).def([]),
|
11969
11968
|
columns: PropTypes.arrayOf(PropTypes.shape({
|
11970
11969
|
label: PropTypes.oneOfType([PropTypes.func.def(() => ""), PropTypes.string.def("")]),
|
@@ -11983,7 +11982,7 @@ const tableProps = __spreadValues({
|
|
11983
11982
|
border: PropTypes.arrayOf(PropTypes.commonType(BORDER_OPRIONS, "border")).def(["row"]),
|
11984
11983
|
pagination: PropTypes.oneOfType([PropTypes.bool.def(false), PropTypes.object.def({})]).def(false),
|
11985
11984
|
remotePagination: PropTypes.bool.def(false)
|
11986
|
-
}
|
11985
|
+
};
|
11987
11986
|
function _isSlot(s2) {
|
11988
11987
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
11989
11988
|
}
|
@@ -12364,7 +12363,7 @@ const paginationProps = {
|
|
12364
12363
|
var Component$5 = defineComponent({
|
12365
12364
|
name: "Pagination",
|
12366
12365
|
props: paginationProps,
|
12367
|
-
emits: ["update:modelValue", "change", "update:limit", "
|
12366
|
+
emits: ["update:modelValue", "change", "update:limit", "limitChange"],
|
12368
12367
|
setup(props, context) {
|
12369
12368
|
const totalPageNum = ref(0);
|
12370
12369
|
const {
|
@@ -12399,7 +12398,7 @@ var Component$5 = defineComponent({
|
|
12399
12398
|
context.emit("change", smallListCurrent2);
|
12400
12399
|
});
|
12401
12400
|
watch(localLimit, (localLimit2) => {
|
12402
|
-
context.emit("
|
12401
|
+
context.emit("limitChange", localLimit2);
|
12403
12402
|
});
|
12404
12403
|
return {
|
12405
12404
|
totalPageNum,
|
@@ -12604,14 +12603,14 @@ class TableRender {
|
|
12604
12603
|
Object.assign(this.props.pagination, {
|
12605
12604
|
limit
|
12606
12605
|
});
|
12607
|
-
this.context.emit("
|
12606
|
+
this.context.emit("pageLimitChange", limit);
|
12608
12607
|
}
|
12609
12608
|
hanlePageChange(current) {
|
12610
12609
|
Object.assign(this.props.pagination, {
|
12611
12610
|
current,
|
12612
12611
|
value: current
|
12613
12612
|
});
|
12614
|
-
this.context.emit("
|
12613
|
+
this.context.emit("pageValueChange", current);
|
12615
12614
|
}
|
12616
12615
|
setColumnActive(index, single = false) {
|
12617
12616
|
const col = this.propActiveCols.find((item) => item.index === index);
|
@@ -12696,7 +12695,7 @@ class TableRender {
|
|
12696
12695
|
var Component$4 = defineComponent({
|
12697
12696
|
name: "Table",
|
12698
12697
|
props: tableProps,
|
12699
|
-
emits: ["
|
12698
|
+
emits: ["columnPick", "rowClick", "pageLimitChange", "pageValueChange"],
|
12700
12699
|
setup(props, ctx) {
|
12701
12700
|
const activeCols = reactive(resolveActiveColumns(props));
|
12702
12701
|
const colgroups = reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
|
@@ -13762,15 +13761,16 @@ var TagInput = defineComponent({
|
|
13762
13761
|
TagInput.install = (Vue) => {
|
13763
13762
|
Vue.component(TagInput.name, TagInput);
|
13764
13763
|
};
|
13764
|
+
const dividerProps = {
|
13765
|
+
direction: PropTypes.commonType(["horizontal", "vertical"], "direction").def("horizontal"),
|
13766
|
+
align: PropTypes.commonType(["left", "center", "right"], "align").def("center"),
|
13767
|
+
color: PropTypes.string.def("#dde4eb"),
|
13768
|
+
width: PropTypes.number.def(1),
|
13769
|
+
type: PropTypes.commonType(["dashed", "solid"], "lineType").def("dashed")
|
13770
|
+
};
|
13765
13771
|
var bkDivider = defineComponent({
|
13766
13772
|
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
|
-
},
|
13773
|
+
props: dividerProps,
|
13774
13774
|
render() {
|
13775
13775
|
const styles = () => {
|
13776
13776
|
if (this.direction === "vertical") {
|
@@ -13795,46 +13795,73 @@ var bkDivider = defineComponent({
|
|
13795
13795
|
}
|
13796
13796
|
});
|
13797
13797
|
const BkDivider = withInstall(bkDivider);
|
13798
|
+
const tabNavEventProps = {
|
13799
|
+
tabAdd: {
|
13800
|
+
type: Function,
|
13801
|
+
default: () => ({})
|
13802
|
+
},
|
13803
|
+
tabChange: {
|
13804
|
+
type: Function,
|
13805
|
+
default: (name) => name
|
13806
|
+
},
|
13807
|
+
tabRemove: {
|
13808
|
+
type: Function,
|
13809
|
+
default: (name) => name
|
13810
|
+
},
|
13811
|
+
tabSort: {
|
13812
|
+
type: Function,
|
13813
|
+
default: () => ({})
|
13814
|
+
},
|
13815
|
+
tabDrag: {
|
13816
|
+
type: Function,
|
13817
|
+
default: () => ({})
|
13818
|
+
}
|
13819
|
+
};
|
13820
|
+
const tabProps = {
|
13821
|
+
active: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13822
|
+
type: PropTypes.commonType(["card", "border-card", "unborder-card"], "type").def("border-card"),
|
13823
|
+
tabPosition: PropTypes.commonType(["left", "right", "top"], "position").def("top"),
|
13824
|
+
closable: Boolean,
|
13825
|
+
addable: Boolean,
|
13826
|
+
sortable: Boolean,
|
13827
|
+
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13828
|
+
labelHeight: PropTypes.number.def(50),
|
13829
|
+
scrollStep: PropTypes.number.def(200),
|
13830
|
+
extCls: PropTypes.string.def(""),
|
13831
|
+
validateActive: PropTypes.bool.def(true),
|
13832
|
+
showHeader: PropTypes.bool.def(true),
|
13833
|
+
changeOnHover: PropTypes.bool.def(false),
|
13834
|
+
changeOnHoverDelay: PropTypes.number.def(1e3)
|
13835
|
+
};
|
13836
|
+
const tabNavProps = __spreadValues({
|
13837
|
+
active: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13838
|
+
panels: {
|
13839
|
+
type: Array,
|
13840
|
+
default: () => []
|
13841
|
+
},
|
13842
|
+
closable: Boolean,
|
13843
|
+
addable: Boolean,
|
13844
|
+
sortable: Boolean,
|
13845
|
+
sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
|
13846
|
+
labelHeight: PropTypes.number.def(50),
|
13847
|
+
scrollStep: PropTypes.number.def(200),
|
13848
|
+
validateActive: PropTypes.bool.def(true),
|
13849
|
+
changeOnHover: PropTypes.bool.def(false),
|
13850
|
+
changeOnHoverDelay: PropTypes.number.def(1e3)
|
13851
|
+
}, tabNavEventProps);
|
13852
|
+
const tabPanelProps = {
|
13853
|
+
name: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
13854
|
+
label: PropTypes.string || PropTypes.func,
|
13855
|
+
closable: PropTypes.bool,
|
13856
|
+
visible: PropTypes.bool.def(true),
|
13857
|
+
disabled: PropTypes.bool,
|
13858
|
+
sortable: PropTypes.bool,
|
13859
|
+
renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
|
13860
|
+
panel: PropTypes.string || PropTypes.func
|
13861
|
+
};
|
13798
13862
|
var TabNav = defineComponent({
|
13799
13863
|
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
|
-
},
|
13864
|
+
props: tabNavProps,
|
13838
13865
|
setup(props) {
|
13839
13866
|
const navs = computed(() => {
|
13840
13867
|
if (!Array.isArray(props.panels) || !props.panels.length) {
|
@@ -13905,18 +13932,15 @@ var TabNav = defineComponent({
|
|
13905
13932
|
distinctRoots(el1, el2) {
|
13906
13933
|
return el1 === el2;
|
13907
13934
|
},
|
13908
|
-
swapArr(arr, a2, b2) {
|
13909
|
-
const swap = arr[a2];
|
13910
|
-
arr[a2] = arr[b2];
|
13911
|
-
arr[b2] = swap;
|
13912
|
-
},
|
13913
13935
|
handleTabAdd(e) {
|
13914
13936
|
this.tabAdd(e);
|
13915
13937
|
},
|
13916
13938
|
dragstart(index, $event) {
|
13917
13939
|
this.dragStartIndex = index;
|
13918
13940
|
this.draggingEle = this.guid;
|
13919
|
-
$event.dataTransfer
|
13941
|
+
Object.assign($event.dataTransfer, {
|
13942
|
+
effectAllowed: "move"
|
13943
|
+
});
|
13920
13944
|
this.tabDrag(index, $event);
|
13921
13945
|
},
|
13922
13946
|
dragenter(index) {
|
@@ -13933,20 +13957,7 @@ var TabNav = defineComponent({
|
|
13933
13957
|
if (!this.distinctRoots(this.draggingEle, this.guid)) {
|
13934
13958
|
return false;
|
13935
13959
|
}
|
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);
|
13960
|
+
this.tabSort(this.dragStartIndex, index, sortType);
|
13950
13961
|
},
|
13951
13962
|
handleTabChange(name) {
|
13952
13963
|
this.tabChange(name);
|
@@ -13987,7 +13998,7 @@ var TabNav = defineComponent({
|
|
13987
13998
|
}
|
13988
13999
|
return classNames.join(" ");
|
13989
14000
|
};
|
13990
|
-
const getValue = (
|
14001
|
+
const getValue = (curentValue, parentValue) => curentValue || parentValue;
|
13991
14002
|
return createVNode("div", {
|
13992
14003
|
"key": name,
|
13993
14004
|
"onClick": () => this.handleTabChange(name),
|
@@ -14019,26 +14030,29 @@ var TabNav = defineComponent({
|
|
14019
14030
|
});
|
14020
14031
|
const renderSlot = () => {
|
14021
14032
|
var _a, _b, _c, _d;
|
14022
|
-
let addSlot;
|
14023
14033
|
const list = [];
|
14024
14034
|
if (typeof this.$slots.add === "function") {
|
14025
|
-
|
14035
|
+
list.push((_b = (_a = this.$slots).add) == null ? void 0 : _b.call(_a, h$1));
|
14026
14036
|
} else if (addable) {
|
14027
|
-
|
14037
|
+
list.push(createVNode("div", {
|
14028
14038
|
"onClick": this.handleTabAdd
|
14029
14039
|
}, [createVNode(plus, {
|
14030
14040
|
"width": 26,
|
14031
14041
|
"height": 26
|
14032
|
-
}, null)]);
|
14042
|
+
}, null)]));
|
14033
14043
|
}
|
14034
|
-
list.push(addSlot);
|
14035
14044
|
if (typeof this.$slots.setting === "function") {
|
14036
14045
|
list.push((_d = (_c = this.$slots).setting) == null ? void 0 : _d.call(_c, h$1));
|
14037
14046
|
}
|
14038
|
-
|
14039
|
-
|
14040
|
-
|
14041
|
-
|
14047
|
+
if (list.length) {
|
14048
|
+
return createVNode("div", {
|
14049
|
+
"class": "bk-tab-header-operation"
|
14050
|
+
}, [list.map((item, index) => createVNode("div", {
|
14051
|
+
"class": "bk-tab-header-item",
|
14052
|
+
"key": index
|
14053
|
+
}, [item]))]);
|
14054
|
+
}
|
14055
|
+
return null;
|
14042
14056
|
};
|
14043
14057
|
return createVNode("div", {
|
14044
14058
|
"style": {
|
@@ -14047,9 +14061,7 @@ var TabNav = defineComponent({
|
|
14047
14061
|
"class": "bk-tab-header"
|
14048
14062
|
}, [createVNode("div", {
|
14049
14063
|
"class": "bk-tab-header-nav"
|
14050
|
-
}, [renderNavs()]),
|
14051
|
-
"class": "bk-tab-header-operation"
|
14052
|
-
}, [renderSlot()])]);
|
14064
|
+
}, [renderNavs()]), renderSlot()]);
|
14053
14065
|
}
|
14054
14066
|
});
|
14055
14067
|
var Tab = defineComponent({
|
@@ -14057,28 +14069,11 @@ var Tab = defineComponent({
|
|
14057
14069
|
components: {
|
14058
14070
|
TabNav
|
14059
14071
|
},
|
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
|
-
},
|
14072
|
+
props: tabProps,
|
14078
14073
|
emits: [
|
14079
14074
|
"add-panel",
|
14080
14075
|
"tab-change",
|
14081
|
-
"
|
14076
|
+
"remove-panel",
|
14082
14077
|
"sort-change",
|
14083
14078
|
"on-drag-tab",
|
14084
14079
|
"add",
|
@@ -14095,7 +14090,7 @@ var Tab = defineComponent({
|
|
14095
14090
|
const panels = ref([]);
|
14096
14091
|
const instance = getCurrentInstance();
|
14097
14092
|
if (typeof slots.panel === "function") {
|
14098
|
-
panels.value = slots.
|
14093
|
+
panels.value = slots.panel();
|
14099
14094
|
}
|
14100
14095
|
if (typeof slots.default === "function") {
|
14101
14096
|
panels.value = slots.default();
|
@@ -14160,11 +14155,26 @@ var Tab = defineComponent({
|
|
14160
14155
|
},
|
14161
14156
|
tabRemove(index, panel) {
|
14162
14157
|
this.$emit("remove", index, panel);
|
14163
|
-
this.$emit("
|
14158
|
+
this.$emit("remove-panel", index, panel);
|
14164
14159
|
},
|
14165
|
-
tabSort(dragTabIndex, dropTabIndex) {
|
14166
|
-
|
14167
|
-
|
14160
|
+
tabSort(dragTabIndex, dropTabIndex, sortType) {
|
14161
|
+
if (sortType === "insert") {
|
14162
|
+
if (dragTabIndex < dropTabIndex) {
|
14163
|
+
this.panels.splice(dropTabIndex + 1, 0, this.panels[dragTabIndex]);
|
14164
|
+
this.panels.splice(dragTabIndex, 1);
|
14165
|
+
} else if (dragTabIndex > dropTabIndex) {
|
14166
|
+
this.panels.splice(dropTabIndex, 0, this.panels[dragTabIndex]);
|
14167
|
+
this.panels.splice(dragTabIndex + 1, 1);
|
14168
|
+
} else {
|
14169
|
+
return false;
|
14170
|
+
}
|
14171
|
+
} else {
|
14172
|
+
const swap = this.panels[dropTabIndex];
|
14173
|
+
this.panels[dropTabIndex] = this.panels[dragTabIndex];
|
14174
|
+
this.panels[dragTabIndex] = swap;
|
14175
|
+
}
|
14176
|
+
this.$emit("sort", dragTabIndex, dropTabIndex, sortType);
|
14177
|
+
this.$emit("sort-change", dragTabIndex, dropTabIndex, sortType);
|
14168
14178
|
},
|
14169
14179
|
tabDrag(dragTabIndex, dragEvent) {
|
14170
14180
|
this.$emit("drag", dragTabIndex, dragEvent);
|
@@ -14232,18 +14242,7 @@ var Tab = defineComponent({
|
|
14232
14242
|
});
|
14233
14243
|
var TabPanel = defineComponent({
|
14234
14244
|
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
|
-
},
|
14245
|
+
props: tabPanelProps,
|
14247
14246
|
render() {
|
14248
14247
|
const active = this.name === this.$parent.active;
|
14249
14248
|
const getContent = () => {
|
@@ -14267,8 +14266,7 @@ var TabPanel = defineComponent({
|
|
14267
14266
|
}, [getContent()]), [[vShow, active]]);
|
14268
14267
|
}
|
14269
14268
|
});
|
14270
|
-
const
|
14271
|
-
const BKTabPanel = withInstall(TabPanel);
|
14269
|
+
const BkTab = withInstallProps(Tab, { TabPanel });
|
14272
14270
|
const instances = {
|
14273
14271
|
"top-left": [],
|
14274
14272
|
"top-right": [],
|
@@ -20125,8 +20123,8 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
20125
20123
|
Tag: BkTag,
|
20126
20124
|
TagInput,
|
20127
20125
|
Divider: BkDivider,
|
20128
|
-
Tab:
|
20129
|
-
TabPanel
|
20126
|
+
Tab: BkTab,
|
20127
|
+
TabPanel,
|
20130
20128
|
Message,
|
20131
20129
|
Notify,
|
20132
20130
|
Menu: BkMenu,
|
@@ -20154,4 +20152,4 @@ var preset = {
|
|
20154
20152
|
install: createInstall(),
|
20155
20153
|
version: "0.0.1"
|
20156
20154
|
};
|
20157
|
-
export { BkAlert as Alert, BkAnimateNumber as AnimateNumber, BkBacktop as Backtop, BkBadge as Badge, BkOption, OptionGroup as BkOptionGroup, BkBreadcrumb as Breadcrumb, BreadcrumbItem, BkButton as Button, ButtonGroup, BkCard as Card, BkCheckbox as Checkbox, CheckboxGroup, BkCollaspe as Collapse, BkDatePicker as DatePicker, BkDialog as Dialog, BkDivider as Divider, BkException as Exception, BkFixedNavbar as FixedNavbar, BkForm as Form, FormItem, BkInput as Input, BkLink as Link, BkLoading as Loading, BkMenu as Menu, Message, BkModal as Modal, Navigation, Notify, BkPopover as Popover, BkProgress as Progress, BkRadio as Radio, RadioButton, RadioGroup, BkRate as Rate, BkSelect as Select, BkSideslider as Sideslider, BkSteps as Steps, BkSwiper as Swiper, BkSwitcher as Switcher,
|
20155
|
+
export { BkAlert as Alert, BkAnimateNumber as AnimateNumber, BkBacktop as Backtop, BkBadge as Badge, BkOption, OptionGroup as BkOptionGroup, BkBreadcrumb as Breadcrumb, BreadcrumbItem, BkButton as Button, ButtonGroup, BkCard as Card, BkCheckbox as Checkbox, CheckboxGroup, BkCollaspe as Collapse, BkDatePicker as DatePicker, BkDialog as Dialog, BkDivider as Divider, BkException as Exception, BkFixedNavbar as FixedNavbar, BkForm as Form, FormItem, BkInput as Input, BkLink as Link, BkLoading as Loading, BkMenu as Menu, Message, BkModal as Modal, Navigation, Notify, BkPopover as Popover, BkProgress as Progress, BkRadio as Radio, RadioButton, RadioGroup, BkRate as Rate, BkSelect as Select, BkSideslider as Sideslider, BkSteps as Steps, BkSwiper as Swiper, BkSwitcher as Switcher, BkTab as Tab, TabPanel, BkTable as Table, BkTag as Tag, TagInput, Transfer, BkTree as Tree, BkVirtualRender as VirtualRender, tooltips as bkTooltips, ClickOutside as clickoutside, preset as default, mousewheel };
|