bkui-vue 0.0.1-beta.354 → 0.0.1-beta.356

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -20528,7 +20528,25 @@ var bkDivider = defineComponent({
20528
20528
  }
20529
20529
  });
20530
20530
  const BkDivider = withInstall(bkDivider);
20531
+ var TabTypeEnum = /* @__PURE__ */ ((TabTypeEnum2) => {
20532
+ TabTypeEnum2["CARD"] = "card";
20533
+ TabTypeEnum2["BORDER_CARD"] = "border-card";
20534
+ TabTypeEnum2["UNBORDER_CARD"] = "unborder-card";
20535
+ TabTypeEnum2["CARD_TAB"] = "card-tab";
20536
+ return TabTypeEnum2;
20537
+ })(TabTypeEnum || {});
20538
+ var PositionEnum = /* @__PURE__ */ ((PositionEnum2) => {
20539
+ PositionEnum2["LEFT"] = "left";
20540
+ PositionEnum2["RIGHT"] = "right";
20541
+ PositionEnum2["TOP"] = "top";
20542
+ return PositionEnum2;
20543
+ })(PositionEnum || {});
20531
20544
  const tabPositionType = j("position", {}).def("top");
20545
+ var SortTypeEnum = /* @__PURE__ */ ((SortTypeEnum2) => {
20546
+ SortTypeEnum2["REPLACE"] = "replace";
20547
+ SortTypeEnum2["INSERT"] = "insert";
20548
+ return SortTypeEnum2;
20549
+ })(SortTypeEnum || {});
20532
20550
  const sortTypeUnion = j("sortType", {}).def("replace");
20533
20551
  const tabNavEventProps = {
20534
20552
  tabAdd: {
@@ -20771,6 +20789,7 @@ var TabNav = defineComponent({
20771
20789
  list.push(createVNode("div", {
20772
20790
  "onClick": this.handleTabAdd
20773
20791
  }, [createVNode(plus, {
20792
+ "style": "display:flex;",
20774
20793
  "width": 26,
20775
20794
  "height": 26
20776
20795
  }, null)]));
@@ -20882,7 +20901,7 @@ var Tab = defineComponent({
20882
20901
  },
20883
20902
  tabSort(dragTabIndex, dropTabIndex, sortType) {
20884
20903
  const list = panels.value;
20885
- if (sortType === "insert") {
20904
+ if (sortType === SortTypeEnum.INSERT) {
20886
20905
  if (dragTabIndex < dropTabIndex) {
20887
20906
  list.splice(dropTabIndex + 1, 0, panels[dragTabIndex]);
20888
20907
  list.splice(dragTabIndex, 1);
@@ -20914,10 +20933,16 @@ var Tab = defineComponent({
20914
20933
  render() {
20915
20934
  var _a, _b;
20916
20935
  const getTabBoxClass = () => {
20917
- if (this.tabPosition === "top") {
20918
- return `bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`;
20936
+ const arr = [resolveClassName("tab"), this.extCls];
20937
+ if (this.tabPosition === PositionEnum.TOP) {
20938
+ arr.push(resolveClassName(`tab--${this.tabPosition}`), resolveClassName(`tab--${this.type}`));
20939
+ } else {
20940
+ arr.push(resolveClassName(`tab--${this.tabPosition}`));
20941
+ if (this.type === TabTypeEnum.CARD_TAB) {
20942
+ arr.push(resolveClassName("tab--vertical-tab"));
20943
+ }
20919
20944
  }
20920
- return `bk-tab bk-tab--${this.tabPosition} ${this.extCls}`;
20945
+ return arr;
20921
20946
  };
20922
20947
  const getTabHeader = () => {
20923
20948
  const {
@@ -21253,7 +21278,7 @@ var NotifyThemeEnum;
21253
21278
  const notifyProps = {
21254
21279
  id: PropTypes.string.def(""),
21255
21280
  title: PropTypes.string.def(""),
21256
- message: PropTypes.string.def(""),
21281
+ message: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).def(""),
21257
21282
  theme: j("notifyTheme", {}).def(NotifyThemeEnum.PRIMARY),
21258
21283
  position: PropTypes.position().def("top-right"),
21259
21284
  delay: PropTypes.number.def(5e3),
@@ -21280,6 +21305,12 @@ var NotifyConstructor = defineComponent({
21280
21305
  zIndex
21281
21306
  }));
21282
21307
  const classNames = computed(() => ["bk-notify", `bk-notify-${props2.theme}`, horizontalClass.value]);
21308
+ const renderMessage = computed(() => {
21309
+ if (typeof props2.message === "function") {
21310
+ return props2.message();
21311
+ }
21312
+ return props2.message;
21313
+ });
21283
21314
  const visible = ref(false);
21284
21315
  let timer = null;
21285
21316
  const startTimer = () => {
@@ -21306,6 +21337,7 @@ var NotifyConstructor = defineComponent({
21306
21337
  classNames,
21307
21338
  styles,
21308
21339
  visible,
21340
+ renderMessage,
21309
21341
  handleClose
21310
21342
  };
21311
21343
  },
@@ -21333,7 +21365,7 @@ var NotifyConstructor = defineComponent({
21333
21365
  "class": "bk-notify-content-header"
21334
21366
  }, [this.title]) : "", createVNode("div", {
21335
21367
  "class": "bk-notify-content-text"
21336
- }, [this.message])]), this.dismissable && createVNode(error, {
21368
+ }, [this.renderMessage])]), this.dismissable && createVNode(error, {
21337
21369
  "class": "bk-notify-icon bk-notify-close",
21338
21370
  "onClick": this.handleClose
21339
21371
  }, null)]), [[vShow, this.visible]])]