bkui-vue 0.0.1-beta.355 → 0.0.1-beta.357
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.cjs.js +26 -26
- package/dist/index.esm.js +50 -9
- package/dist/index.umd.js +28 -28
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -0
- package/lib/date-picker/index.js +1 -1
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +6 -9
- package/lib/tab/index.d.ts +22 -22
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +21 -6
- package/lib/tab/tab-nav.d.ts +5 -5
- package/lib/tab/tab.css +63 -11
- package/lib/tab/tab.d.ts +10 -10
- package/lib/tab/tab.less +67 -13
- package/lib/tab/tab.variable.css +63 -11
- package/package.json +2 -1
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 ===
|
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
|
-
|
20918
|
-
|
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
|
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.
|
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]])]
|
@@ -21969,6 +22001,12 @@ var PickerDropdown = defineComponent({
|
|
21969
22001
|
onBeforeUnmount(() => {
|
21970
22002
|
destoryDropdown();
|
21971
22003
|
});
|
22004
|
+
const forceUpdate = () => {
|
22005
|
+
var _a;
|
22006
|
+
if (popoverInstance) {
|
22007
|
+
(_a = popoverInstance == null ? void 0 : popoverInstance.forceUpdate) == null ? void 0 : _a.call(popoverInstance);
|
22008
|
+
}
|
22009
|
+
};
|
21972
22010
|
const destoryDropdown = () => {
|
21973
22011
|
if (popoverInstance && Object.keys(popoverInstance).length !== 0) {
|
21974
22012
|
const instance = popoverInstance;
|
@@ -22019,6 +22057,7 @@ var PickerDropdown = defineComponent({
|
|
22019
22057
|
});
|
22020
22058
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
22021
22059
|
refContentRef,
|
22060
|
+
forceUpdate,
|
22022
22061
|
updateDropdown,
|
22023
22062
|
destoryDropdown
|
22024
22063
|
});
|
@@ -26817,15 +26856,17 @@ var TimePicker = defineComponent({
|
|
26817
26856
|
const {
|
26818
26857
|
proxy
|
26819
26858
|
} = getCurrentInstance();
|
26859
|
+
const pickerDropdownRef = ref(null);
|
26820
26860
|
watch(() => state.visible, (visible) => {
|
26861
|
+
var _a, _b;
|
26821
26862
|
if (visible) {
|
26863
|
+
(_b = (_a = pickerDropdownRef.value) == null ? void 0 : _a.forceUpdate) == null ? void 0 : _b.call(_a);
|
26822
26864
|
nextTick(() => {
|
26823
|
-
var
|
26824
|
-
(
|
26865
|
+
var _a2, _b2;
|
26866
|
+
(_b2 = (_a2 = proxy.pickerPanelRef) == null ? void 0 : _a2.timeSpinnerRef) == null ? void 0 : _b2.updateScroll();
|
26825
26867
|
});
|
26826
26868
|
}
|
26827
26869
|
});
|
26828
|
-
const pickerDropdownRef = ref(null);
|
26829
26870
|
watch(() => props2.modelValue, (modelValue) => {
|
26830
26871
|
var _a;
|
26831
26872
|
state.internalValue = parseDate(modelValue, props2.type, props2.multiple, props2.format);
|