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.
Files changed (41) hide show
  1. package/dist/bkui-vue.cjs.js +141 -140
  2. package/dist/bkui-vue.esm.js +141 -140
  3. package/dist/bkui-vue.umd.js +141 -140
  4. package/dist/style.css +100 -5
  5. package/lib/code-diff/index.d.ts +139 -3
  6. package/lib/code-diff/index.js +15 -0
  7. package/lib/components.d.ts +1 -1
  8. package/lib/divider/index.js +1 -1
  9. package/lib/divider/props.d.ts +21 -0
  10. package/lib/loading/index.d.ts +27 -10
  11. package/lib/loading/index.js +1 -1
  12. package/lib/loading/loading.css +8 -2
  13. package/lib/loading/loading.d.ts +18 -4
  14. package/lib/loading/loading.less +10 -10
  15. package/lib/loading/loading.variable.css +8 -2
  16. package/lib/pagination/index.d.ts +7 -7
  17. package/lib/pagination/index.js +1 -1
  18. package/lib/pagination/pagination.d.ts +2 -2
  19. package/lib/radio/index.js +1 -1
  20. package/lib/radio/radio.css +2 -2
  21. package/lib/radio/radio.less +2 -2
  22. package/lib/radio/radio.variable.css +2 -2
  23. package/lib/slider/index.js +2 -2
  24. package/lib/slider/slider-button.d.ts +5 -0
  25. package/lib/slider/slider.d.ts +12 -0
  26. package/lib/styles/index.d.ts +1 -0
  27. package/lib/styles/index.js +1 -1
  28. package/lib/tab/index.d.ts +96 -205
  29. package/lib/tab/index.js +1 -1
  30. package/lib/tab/props.d.ts +191 -0
  31. package/lib/tab/tab-nav.d.ts +59 -84
  32. package/lib/tab/tab-panel.d.ts +39 -14
  33. package/lib/tab/tab.css +2 -1
  34. package/lib/tab/tab.d.ts +14 -37
  35. package/lib/tab/tab.less +2 -1
  36. package/lib/tab/tab.variable.css +2 -1
  37. package/lib/table/index.d.ts +1 -5
  38. package/lib/table/index.js +2 -2
  39. package/lib/table/props.d.ts +0 -1
  40. package/lib/table/table.d.ts +1 -3
  41. package/package.json +1 -1
@@ -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, Fragment, createTextVNode, toRefs, customRef, onBeforeMount, withDirectives, vShow, toRef, unref, resolveDirective, vModelText, watchEffect, onUpdated, render, onUnmounted, Teleport } from "vue";
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
- }, "bk-loading-wrapper"));
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 ctx.slots.default && !props.loading ? (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a) : createVNode("div", {
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
- }, [ctx.slots.default()])]);
8510
+ }, null)]), (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
8509
8511
  };
8510
8512
  }
8511
8513
  });
@@ -9919,7 +9921,7 @@ var Component$e = defineComponent({
9919
9921
  render() {
9920
9922
  const radioClass = classes({
9921
9923
  "bk-radio": true,
9922
- "is-focus": this.isFocus,
9924
+ "is-focusd": this.isFocus,
9923
9925
  "is-disabled": this.isDisabled,
9924
9926
  "is-checked": this.isCheck
9925
9927
  });
@@ -9978,7 +9980,7 @@ var RadioButton = defineComponent({
9978
9980
  render() {
9979
9981
  const radioClass = classes({
9980
9982
  "bk-radio-button": true,
9981
- "is-focus": this.isFocus,
9983
+ "is-focusd": this.isFocus,
9982
9984
  "is-disabled": this.isDisabled,
9983
9985
  "is-checked": this.isCheck
9984
9986
  });
@@ -10029,9 +10031,10 @@ var RadioGroup = defineComponent({
10029
10031
  return {};
10030
10032
  },
10031
10033
  render() {
10034
+ var _a;
10032
10035
  return createVNode("div", {
10033
10036
  "class": "bk-radio-group"
10034
- }, [this.$slots.default()]);
10037
+ }, [(_a = this.$slots) == null ? void 0 : _a.default()]);
10035
10038
  }
10036
10039
  });
10037
10040
  const BkRadio = withInstallProps(Component$e, { Group: RadioGroup, Button: RadioButton });
@@ -11708,7 +11711,7 @@ var Component$7 = defineComponent({
11708
11711
  }
11709
11712
  });
11710
11713
  const BkSwitcher = withInstall(Component$7);
11711
- const EventProps$1 = {
11714
+ const EventProps = {
11712
11715
  onContentScroll: Function
11713
11716
  };
11714
11717
  const virtualRenderProps = __spreadValues({
@@ -11731,7 +11734,7 @@ const virtualRenderProps = __spreadValues({
11731
11734
  scrollPosition: PropTypes.string.def("content"),
11732
11735
  abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
11733
11736
  throttleDelay: PropTypes.number.def(60)
11734
- }, EventProps$1);
11737
+ }, EventProps);
11735
11738
  function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
11736
11739
  let startIndex = 0;
11737
11740
  let height = 0;
@@ -11960,10 +11963,7 @@ var Component$6 = defineComponent({
11960
11963
  });
11961
11964
  const BkVirtualRender = withInstall(Component$6);
11962
11965
  const BORDER_OPRIONS = ["none", "row", "col", "outer"];
11963
- const EventProps = {
11964
- onRowClick: Function
11965
- };
11966
- const tableProps = __spreadValues({
11966
+ const tableProps = {
11967
11967
  data: PropTypes.arrayOf(PropTypes.any).def([]),
11968
11968
  columns: PropTypes.arrayOf(PropTypes.shape({
11969
11969
  label: PropTypes.oneOfType([PropTypes.func.def(() => ""), PropTypes.string.def("")]),
@@ -11982,7 +11982,7 @@ const tableProps = __spreadValues({
11982
11982
  border: PropTypes.arrayOf(PropTypes.commonType(BORDER_OPRIONS, "border")).def(["row"]),
11983
11983
  pagination: PropTypes.oneOfType([PropTypes.bool.def(false), PropTypes.object.def({})]).def(false),
11984
11984
  remotePagination: PropTypes.bool.def(false)
11985
- }, EventProps);
11985
+ };
11986
11986
  function _isSlot(s2) {
11987
11987
  return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
11988
11988
  }
@@ -12082,6 +12082,8 @@ var useList = () => {
12082
12082
  localCurrent.value = proxy.totalPageNum;
12083
12083
  }
12084
12084
  });
12085
+ }, {
12086
+ immediate: true
12085
12087
  });
12086
12088
  nextTick(() => {
12087
12089
  watch(() => proxy.totalPageNum, (totalPageNum) => {
@@ -12361,7 +12363,7 @@ const paginationProps = {
12361
12363
  var Component$5 = defineComponent({
12362
12364
  name: "Pagination",
12363
12365
  props: paginationProps,
12364
- emits: ["update:modelValue", "change", "update:limit", "limit-change"],
12366
+ emits: ["update:modelValue", "change", "update:limit", "limitChange"],
12365
12367
  setup(props, context) {
12366
12368
  const totalPageNum = ref(0);
12367
12369
  const {
@@ -12396,7 +12398,7 @@ var Component$5 = defineComponent({
12396
12398
  context.emit("change", smallListCurrent2);
12397
12399
  });
12398
12400
  watch(localLimit, (localLimit2) => {
12399
- context.emit("limit-change", localLimit2);
12401
+ context.emit("limitChange", localLimit2);
12400
12402
  });
12401
12403
  return {
12402
12404
  totalPageNum,
@@ -12601,14 +12603,14 @@ class TableRender {
12601
12603
  Object.assign(this.props.pagination, {
12602
12604
  limit
12603
12605
  });
12604
- this.context.emit("page-limit-change", limit);
12606
+ this.context.emit("pageLimitChange", limit);
12605
12607
  }
12606
12608
  hanlePageChange(current) {
12607
12609
  Object.assign(this.props.pagination, {
12608
12610
  current,
12609
12611
  value: current
12610
12612
  });
12611
- this.context.emit("page-value-change", current);
12613
+ this.context.emit("pageValueChange", current);
12612
12614
  }
12613
12615
  setColumnActive(index, single = false) {
12614
12616
  const col = this.propActiveCols.find((item) => item.index === index);
@@ -12693,7 +12695,7 @@ class TableRender {
12693
12695
  var Component$4 = defineComponent({
12694
12696
  name: "Table",
12695
12697
  props: tableProps,
12696
- emits: ["column-pick", "row-click", "page-limit-change", "page-value-change"],
12698
+ emits: ["columnPick", "rowClick", "pageLimitChange", "pageValueChange"],
12697
12699
  setup(props, ctx) {
12698
12700
  const activeCols = reactive(resolveActiveColumns(props));
12699
12701
  const colgroups = reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
@@ -13759,15 +13761,16 @@ var TagInput = defineComponent({
13759
13761
  TagInput.install = (Vue) => {
13760
13762
  Vue.component(TagInput.name, TagInput);
13761
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
+ };
13762
13771
  var bkDivider = defineComponent({
13763
13772
  name: "Divider",
13764
- props: {
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
- },
13773
+ props: dividerProps,
13771
13774
  render() {
13772
13775
  const styles = () => {
13773
13776
  if (this.direction === "vertical") {
@@ -13792,46 +13795,73 @@ var bkDivider = defineComponent({
13792
13795
  }
13793
13796
  });
13794
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
+ };
13795
13862
  var TabNav = defineComponent({
13796
13863
  name: "TabNav",
13797
- props: {
13798
- active: {
13799
- type: String || Number
13800
- },
13801
- panels: {
13802
- type: Array,
13803
- default: () => []
13804
- },
13805
- closable: PropTypes.bool.def(false),
13806
- addable: PropTypes.bool.def(false),
13807
- sortable: PropTypes.bool.def(false),
13808
- sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
13809
- labelHeight: PropTypes.number.def(50),
13810
- scrollStep: PropTypes.number.def(200),
13811
- validateActive: PropTypes.bool.def(true),
13812
- changeOnHover: PropTypes.bool.def(false),
13813
- changeOnHoverDelay: PropTypes.number.def(1e3),
13814
- tabAdd: {
13815
- type: Function,
13816
- default: () => ({})
13817
- },
13818
- tabChange: {
13819
- type: Function,
13820
- default: () => ({})
13821
- },
13822
- tabRemove: {
13823
- type: Function,
13824
- default: () => ({})
13825
- },
13826
- tabSort: {
13827
- type: Function,
13828
- default: () => ({})
13829
- },
13830
- tabDrag: {
13831
- type: Function,
13832
- default: () => ({})
13833
- }
13834
- },
13864
+ props: tabNavProps,
13835
13865
  setup(props) {
13836
13866
  const navs = computed(() => {
13837
13867
  if (!Array.isArray(props.panels) || !props.panels.length) {
@@ -13902,18 +13932,15 @@ var TabNav = defineComponent({
13902
13932
  distinctRoots(el1, el2) {
13903
13933
  return el1 === el2;
13904
13934
  },
13905
- swapArr(arr, a2, b2) {
13906
- const swap = arr[a2];
13907
- arr[a2] = arr[b2];
13908
- arr[b2] = swap;
13909
- },
13910
13935
  handleTabAdd(e) {
13911
13936
  this.tabAdd(e);
13912
13937
  },
13913
13938
  dragstart(index, $event) {
13914
13939
  this.dragStartIndex = index;
13915
13940
  this.draggingEle = this.guid;
13916
- $event.dataTransfer.effectAllowed = "move";
13941
+ Object.assign($event.dataTransfer, {
13942
+ effectAllowed: "move"
13943
+ });
13917
13944
  this.tabDrag(index, $event);
13918
13945
  },
13919
13946
  dragenter(index) {
@@ -13930,20 +13957,7 @@ var TabNav = defineComponent({
13930
13957
  if (!this.distinctRoots(this.draggingEle, this.guid)) {
13931
13958
  return false;
13932
13959
  }
13933
- if (sortType === "insert") {
13934
- if (this.dragStartIndex < index) {
13935
- this.panels.splice(index + 1, 0, this.panels[this.dragStartIndex]);
13936
- this.panels.splice(this.dragStartIndex, 1);
13937
- } else if (this.dragStartIndex > index) {
13938
- this.panels.splice(index, 0, this.panels[this.dragStartIndex]);
13939
- this.panels.splice(this.dragStartIndex + 1, 1);
13940
- } else {
13941
- return false;
13942
- }
13943
- } else {
13944
- this.swapArr(this.panels, this.dragStartIndex, index);
13945
- }
13946
- this.tabSort(this.dragStartIndex, index);
13960
+ this.tabSort(this.dragStartIndex, index, sortType);
13947
13961
  },
13948
13962
  handleTabChange(name) {
13949
13963
  this.tabChange(name);
@@ -13984,7 +13998,7 @@ var TabNav = defineComponent({
13984
13998
  }
13985
13999
  return classNames.join(" ");
13986
14000
  };
13987
- const getValue = (value, value2) => typeof value === "boolean" ? value : value2;
14001
+ const getValue = (curentValue, parentValue) => curentValue || parentValue;
13988
14002
  return createVNode("div", {
13989
14003
  "key": name,
13990
14004
  "onClick": () => this.handleTabChange(name),
@@ -14016,26 +14030,29 @@ var TabNav = defineComponent({
14016
14030
  });
14017
14031
  const renderSlot = () => {
14018
14032
  var _a, _b, _c, _d;
14019
- let addSlot;
14020
14033
  const list = [];
14021
14034
  if (typeof this.$slots.add === "function") {
14022
- addSlot = (_b = (_a = this.$slots).add) == null ? void 0 : _b.call(_a, h$1);
14035
+ list.push((_b = (_a = this.$slots).add) == null ? void 0 : _b.call(_a, h$1));
14023
14036
  } else if (addable) {
14024
- addSlot = createVNode("div", {
14037
+ list.push(createVNode("div", {
14025
14038
  "onClick": this.handleTabAdd
14026
14039
  }, [createVNode(plus, {
14027
14040
  "width": 26,
14028
14041
  "height": 26
14029
- }, null)]);
14042
+ }, null)]));
14030
14043
  }
14031
- list.push(addSlot);
14032
14044
  if (typeof this.$slots.setting === "function") {
14033
14045
  list.push((_d = (_c = this.$slots).setting) == null ? void 0 : _d.call(_c, h$1));
14034
14046
  }
14035
- return list.map((item, index) => createVNode("div", {
14036
- "class": "bk-tab-header-item",
14037
- "key": index
14038
- }, [item]));
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;
14039
14056
  };
14040
14057
  return createVNode("div", {
14041
14058
  "style": {
@@ -14044,9 +14061,7 @@ var TabNav = defineComponent({
14044
14061
  "class": "bk-tab-header"
14045
14062
  }, [createVNode("div", {
14046
14063
  "class": "bk-tab-header-nav"
14047
- }, [renderNavs()]), createVNode("div", {
14048
- "class": "bk-tab-header-operation"
14049
- }, [renderSlot()])]);
14064
+ }, [renderNavs()]), renderSlot()]);
14050
14065
  }
14051
14066
  });
14052
14067
  var Tab = defineComponent({
@@ -14054,28 +14069,11 @@ var Tab = defineComponent({
14054
14069
  components: {
14055
14070
  TabNav
14056
14071
  },
14057
- props: {
14058
- active: {
14059
- type: String || Number
14060
- },
14061
- type: PropTypes.commonType(["card", "border-card", "unborder-card"], "type").def("border-card"),
14062
- tabPosition: PropTypes.commonType(["left", "right", "top"], "position").def("top"),
14063
- closable: PropTypes.bool.def(false),
14064
- addable: PropTypes.bool.def(false),
14065
- sortable: PropTypes.bool.def(false),
14066
- sortType: PropTypes.commonType(["replace", "insert", "top"], "sortType").def("replace"),
14067
- labelHeight: PropTypes.number.def(50),
14068
- scrollStep: PropTypes.number.def(200),
14069
- extCls: PropTypes.string.def(""),
14070
- validateActive: PropTypes.bool.def(true),
14071
- showHeader: PropTypes.bool.def(true),
14072
- changeOnHover: PropTypes.bool.def(false),
14073
- changeOnHoverDelay: PropTypes.number.def(1e3)
14074
- },
14072
+ props: tabProps,
14075
14073
  emits: [
14076
14074
  "add-panel",
14077
14075
  "tab-change",
14078
- "close-panel",
14076
+ "remove-panel",
14079
14077
  "sort-change",
14080
14078
  "on-drag-tab",
14081
14079
  "add",
@@ -14092,7 +14090,7 @@ var Tab = defineComponent({
14092
14090
  const panels = ref([]);
14093
14091
  const instance = getCurrentInstance();
14094
14092
  if (typeof slots.panel === "function") {
14095
- panels.value = slots.default();
14093
+ panels.value = slots.panel();
14096
14094
  }
14097
14095
  if (typeof slots.default === "function") {
14098
14096
  panels.value = slots.default();
@@ -14157,11 +14155,26 @@ var Tab = defineComponent({
14157
14155
  },
14158
14156
  tabRemove(index, panel) {
14159
14157
  this.$emit("remove", index, panel);
14160
- this.$emit("close-panel", index, panel);
14158
+ this.$emit("remove-panel", index, panel);
14161
14159
  },
14162
- tabSort(dragTabIndex, dropTabIndex) {
14163
- this.$emit("sort", dragTabIndex, dropTabIndex);
14164
- this.$emit("sort-change", dragTabIndex, dropTabIndex);
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);
14165
14178
  },
14166
14179
  tabDrag(dragTabIndex, dragEvent) {
14167
14180
  this.$emit("drag", dragTabIndex, dragEvent);
@@ -14229,18 +14242,7 @@ var Tab = defineComponent({
14229
14242
  });
14230
14243
  var TabPanel = defineComponent({
14231
14244
  name: "TabPanel",
14232
- props: {
14233
- name: {
14234
- type: String || Number
14235
- },
14236
- label: String || Function,
14237
- closable: Function || Boolean,
14238
- visible: PropTypes.bool.def(true),
14239
- disabled: PropTypes.bool.def(null) || void 0,
14240
- sortable: Function || Boolean,
14241
- renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
14242
- panel: String || Function
14243
- },
14245
+ props: tabPanelProps,
14244
14246
  render() {
14245
14247
  const active = this.name === this.$parent.active;
14246
14248
  const getContent = () => {
@@ -14264,8 +14266,7 @@ var TabPanel = defineComponent({
14264
14266
  }, [getContent()]), [[vShow, active]]);
14265
14267
  }
14266
14268
  });
14267
- const BKTab = withInstall(Tab);
14268
- const BKTabPanel = withInstall(TabPanel);
14269
+ const BkTab = withInstallProps(Tab, { TabPanel });
14269
14270
  const instances = {
14270
14271
  "top-left": [],
14271
14272
  "top-right": [],
@@ -20122,8 +20123,8 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
20122
20123
  Tag: BkTag,
20123
20124
  TagInput,
20124
20125
  Divider: BkDivider,
20125
- Tab: BKTab,
20126
- TabPanel: BKTabPanel,
20126
+ Tab: BkTab,
20127
+ TabPanel,
20127
20128
  Message,
20128
20129
  Notify,
20129
20130
  Menu: BkMenu,
@@ -20151,4 +20152,4 @@ var preset = {
20151
20152
  install: createInstall(),
20152
20153
  version: "0.0.1"
20153
20154
  };
20154
- 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, BKTabPanel as 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 };
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 };