bkui-vue 0.0.1-beta.146 → 0.0.1-beta.149
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 +25 -25
- package/dist/index.esm.js +83 -79
- package/dist/index.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +2 -2
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +2 -2
- package/lib/dialog/dialog.css +21 -20
- package/lib/dialog/dialog.less +24 -23
- package/lib/dialog/dialog.variable.css +21 -20
- package/lib/dialog/index.js +1 -1
- package/lib/dropdown/const.d.ts +4 -0
- package/lib/dropdown/dropdown.css +8 -5
- package/lib/dropdown/dropdown.d.ts +31 -2
- package/lib/dropdown/dropdown.less +43 -34
- package/lib/dropdown/dropdown.variable.css +8 -5
- package/lib/dropdown/index.d.ts +60 -7
- package/lib/dropdown/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/popover2/index.d.ts +5 -24
- package/lib/popover2/index.js +1 -1
- package/lib/popover2/popover2.d.ts +2 -11
- package/lib/popover2/props.d.ts +1 -5
- package/lib/select/index.d.ts +10 -10
- package/lib/select/select.d.ts +3 -3
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +12 -11
- package/lib/table/table.less +19 -18
- package/lib/table/table.variable.css +12 -11
- package/lib/virtual-render/index.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -9776,7 +9776,7 @@ const propsCollapse = {
|
|
9776
9776
|
const CollapsePanelEventProps = {
|
9777
9777
|
itemClick: {
|
9778
9778
|
type: Function,
|
9779
|
-
default:
|
9779
|
+
default: null
|
9780
9780
|
}
|
9781
9781
|
};
|
9782
9782
|
const propsCollapsePanel = __spreadValues({
|
@@ -9902,13 +9902,16 @@ var CollapsePanel = defineComponent({
|
|
9902
9902
|
const data2 = {
|
9903
9903
|
name
|
9904
9904
|
};
|
9905
|
-
itemClick(data2);
|
9906
9905
|
isActive.value = !isActive.value;
|
9907
9906
|
emit("change", data2);
|
9908
9907
|
emit("update:modelValue", isActive.value);
|
9909
|
-
|
9910
|
-
|
9911
|
-
})
|
9908
|
+
if (typeof itemClick === "function") {
|
9909
|
+
itemClick(data2);
|
9910
|
+
} else if (typeof handleItemClick === "function") {
|
9911
|
+
handleItemClick({
|
9912
|
+
name
|
9913
|
+
});
|
9914
|
+
}
|
9912
9915
|
}
|
9913
9916
|
const transition = ref(collapseMotion$1(emit));
|
9914
9917
|
function getContent() {
|
@@ -10032,15 +10035,19 @@ var Collapse = defineComponent({
|
|
10032
10035
|
}, item);
|
10033
10036
|
}));
|
10034
10037
|
const renderItems = () => collapseData.value.map((item, index) => {
|
10038
|
+
var _a, _b, _c;
|
10035
10039
|
const name = item[props2.idFiled] || index;
|
10036
10040
|
let title = item[props2.titleField];
|
10037
10041
|
if (slots.title) {
|
10038
10042
|
if (typeof slots.title === "function") {
|
10039
|
-
title = slots.title(item);
|
10043
|
+
title = slots.title(item, index);
|
10040
10044
|
} else {
|
10041
10045
|
title = slots.title;
|
10042
10046
|
}
|
10043
10047
|
}
|
10048
|
+
if (slots.default) {
|
10049
|
+
title = (_a = slots.default) == null ? void 0 : _a.call(slots, item, index);
|
10050
|
+
}
|
10044
10051
|
return createVNode(CollapsePanel, {
|
10045
10052
|
"key": index,
|
10046
10053
|
"item-click": handleItemClick,
|
@@ -10048,7 +10055,7 @@ var Collapse = defineComponent({
|
|
10048
10055
|
"name": name,
|
10049
10056
|
"isFormList": true,
|
10050
10057
|
"title": title,
|
10051
|
-
"content": item[props2.contentField]
|
10058
|
+
"content": (_c = (_b = slots.content) == null ? void 0 : _b.call(slots, item, index)) != null ? _c : item[props2.contentField]
|
10052
10059
|
}, null);
|
10053
10060
|
});
|
10054
10061
|
return () => createVNode("div", {
|
@@ -10165,7 +10172,7 @@ var Component$t = defineComponent({
|
|
10165
10172
|
"name": this.animateType
|
10166
10173
|
}, {
|
10167
10174
|
default: () => {
|
10168
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
10175
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
10169
10176
|
return [this.isShow ? createVNode("div", {
|
10170
10177
|
"class": bodyClass
|
10171
10178
|
}, [createVNode("div", {
|
@@ -10175,7 +10182,9 @@ var Component$t = defineComponent({
|
|
10175
10182
|
"style": [this.dialogType === "show" ? "padding-bottom: 20px" : "", __spreadValues({}, maxHeight)]
|
10176
10183
|
}, [(_f = (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)) != null ? _f : ""]), this.dialogType === "show" ? "" : createVNode("div", {
|
10177
10184
|
"class": "bk-modal-footer"
|
10178
|
-
}, [(_i = (_h = (_g = this.$slots).footer) == null ? void 0 : _h.call(_g)) != null ? _i : ""])
|
10185
|
+
}, [(_i = (_h = (_g = this.$slots).footer) == null ? void 0 : _h.call(_g)) != null ? _i : ""]), createVNode("div", {
|
10186
|
+
"class": ["bk-modal-close", this.closeIcon ? "" : "close-icon"]
|
10187
|
+
}, [(_l = (_k = (_j = this.$slots).close) == null ? void 0 : _k.call(_j)) != null ? _l : ""])]) : ""];
|
10179
10188
|
}
|
10180
10189
|
})]);
|
10181
10190
|
}
|
@@ -10341,10 +10350,7 @@ var Dialog = defineComponent({
|
|
10341
10350
|
}, [createVNode("span", {
|
10342
10351
|
"class": "bk-dialog-title",
|
10343
10352
|
"style": `text-align: ${this.headerAlign}`
|
10344
|
-
}, [(_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : this.title])
|
10345
|
-
"class": ["bk-dialog-close", this.closeIcon ? "" : "close-icon"],
|
10346
|
-
"onClick": this.handleClose
|
10347
|
-
}, [createTextVNode("+")])])];
|
10353
|
+
}, [(_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : this.title])])];
|
10348
10354
|
},
|
10349
10355
|
default: () => {
|
10350
10356
|
var _a, _b, _c;
|
@@ -10396,7 +10402,11 @@ var Dialog = defineComponent({
|
|
10396
10402
|
}, {
|
10397
10403
|
default: () => [this.confirmText]
|
10398
10404
|
})]) : ""]);
|
10399
|
-
}
|
10405
|
+
},
|
10406
|
+
close: () => createVNode("span", {
|
10407
|
+
"class": "bk-dialog-close",
|
10408
|
+
"onClick": this.handleClose
|
10409
|
+
}, [createTextVNode("+")])
|
10400
10410
|
};
|
10401
10411
|
const className = `bk-dialog-wrapper ${this.scrollable ? "scroll-able" : ""} ${this.multiInstance ? "multi-instance" : ""}`;
|
10402
10412
|
return createVNode(BkModal, mergeProps(this.$props, {
|
@@ -11228,7 +11238,7 @@ const PopoverProps = __spreadValues({
|
|
11228
11238
|
arrow: PropTypes.bool.def(true),
|
11229
11239
|
padding: PropTypes.number.def(5),
|
11230
11240
|
offset: PropTypes.number.def(6),
|
11231
|
-
boundary: PropTypes.string.def(
|
11241
|
+
boundary: PropTypes.oneOfType([PropTypes.string.def("parent"), PropTypes.instanceOf(HTMLElement)]),
|
11232
11242
|
zIndex: PropTypes.number.def(void 0),
|
11233
11243
|
disableTeleport: PropTypes.bool.def(false),
|
11234
11244
|
autoPlacement: PropTypes.bool.def(false),
|
@@ -12700,7 +12710,7 @@ var useFloating = (props2, ctx, refReference, refContent, refArrow, refRoot) =>
|
|
12700
12710
|
});
|
12701
12711
|
};
|
12702
12712
|
const showPopover = () => {
|
12703
|
-
localIsShow.value = true;
|
12713
|
+
!props2.disabled && (localIsShow.value = true);
|
12704
12714
|
};
|
12705
12715
|
let popShowTimerId = void 0;
|
12706
12716
|
let isMouseenter = false;
|
@@ -15182,7 +15192,7 @@ var useTagRender = (props2, ctx) => {
|
|
15182
15192
|
};
|
15183
15193
|
return {
|
15184
15194
|
rendAsTag: () => {
|
15185
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
15195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
15186
15196
|
return h$1(renderAs, {
|
15187
15197
|
class: props2.className
|
15188
15198
|
}, [(_c = (_b = (_a = ctx.slots).beforeContent) == null ? void 0 : _b.call(_a)) != null ? _c : "", withDirectives(h$1(contentAs, {
|
@@ -15190,7 +15200,7 @@ var useTagRender = (props2, ctx) => {
|
|
15190
15200
|
style: props2.contentStyle
|
15191
15201
|
}, [(_f = (_e = (_d = ctx.slots).default) == null ? void 0 : _e.call(_d, {
|
15192
15202
|
data: props2.list
|
15193
|
-
})) != null ? _f : ""]), [[vVirtualRender, dirModifier]]), (_i = (_h = (_g = ctx.slots).afterContent) == null ? void 0 : _h.call(_g)) != null ? _i : ""]);
|
15203
|
+
})) != null ? _f : ""]), [[vVirtualRender, dirModifier]]), (_i = (_h = (_g = ctx.slots).afterContent) == null ? void 0 : _h.call(_g)) != null ? _i : "", (_l = (_k = (_j = ctx.slots).afterSection) == null ? void 0 : _k.call(_j)) != null ? _l : ""]);
|
15194
15204
|
}
|
15195
15205
|
};
|
15196
15206
|
};
|
@@ -15408,7 +15418,7 @@ var Component$e = defineComponent({
|
|
15408
15418
|
reset: reset2
|
15409
15419
|
});
|
15410
15420
|
return () => {
|
15411
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
15421
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
15412
15422
|
return h$1(renderAs || "div", {
|
15413
15423
|
ref: refRoot,
|
15414
15424
|
class: wrapperClass.value,
|
@@ -15421,7 +15431,7 @@ var Component$e = defineComponent({
|
|
15421
15431
|
})) != null ? _f : ""]), [[vVirtualRender, dirModifier]]), (_i = (_h = (_g = ctx.slots).afterContent) == null ? void 0 : _h.call(_g)) != null ? _i : "", h$1("div", {
|
15422
15432
|
class: [resolveClassName("virtual-section")],
|
15423
15433
|
style: innerStyle.value
|
15424
|
-
})]);
|
15434
|
+
}), (_l = (_k = (_j = ctx.slots).afterSection) == null ? void 0 : _k.call(_j)) != null ? _l : ""]);
|
15425
15435
|
};
|
15426
15436
|
}
|
15427
15437
|
});
|
@@ -17353,7 +17363,7 @@ const useClass = (props2, root, reactiveProp, pageData) => {
|
|
17353
17363
|
if (/^\d+\.?\d*px$/ig.test(strHeight)) {
|
17354
17364
|
return Number(strHeight.replace("px", ""));
|
17355
17365
|
}
|
17356
|
-
if (/^\d+\.?\d*%$/ig.test(strHeight)) {
|
17366
|
+
if (/^\d+\.?\d*%$/ig.test(strHeight) && typeof defaultValue === "number") {
|
17357
17367
|
const percent = Number(strHeight.replace("%", ""));
|
17358
17368
|
return defaultValue * percent / 100;
|
17359
17369
|
}
|
@@ -17369,10 +17379,13 @@ const useClass = (props2, root, reactiveProp, pageData) => {
|
|
17369
17379
|
const contentHeight = resolveHeight - resolveHeadHeight - resolveFooterHeight;
|
17370
17380
|
const height = props2.height !== "auto" ? `${contentHeight}px` : false;
|
17371
17381
|
const minHeight = resolveMinHeight - resolveHeadHeight - resolveFooterHeight;
|
17382
|
+
const resolveMaxHeight = resolvePropHeight(props2.maxHeight, void 0);
|
17383
|
+
const maxHeight = typeof resolveMaxHeight === "number" ? `${resolveMaxHeight - resolveHeadHeight - resolveFooterHeight}px` : false;
|
17372
17384
|
Object.assign(contentStyle, {
|
17373
17385
|
display: (pageData == null ? void 0 : pageData.length) ? "block" : false,
|
17374
17386
|
"min-height": `${minHeight}px`,
|
17375
|
-
height
|
17387
|
+
height,
|
17388
|
+
maxHeight
|
17376
17389
|
});
|
17377
17390
|
};
|
17378
17391
|
onMounted(() => {
|
@@ -17684,6 +17697,10 @@ var Component$c = defineComponent({
|
|
17684
17697
|
"scroll-loading": true,
|
17685
17698
|
_bottom: true
|
17686
17699
|
};
|
17700
|
+
const fixedBottomBorder = {
|
17701
|
+
[resolveClassName("fixed-bottom-border")]: true,
|
17702
|
+
"_is-empty": !props2.data.length
|
17703
|
+
};
|
17687
17704
|
const {
|
17688
17705
|
renderScrollLoading
|
17689
17706
|
} = useScrollLoading(props2, ctx);
|
@@ -17713,7 +17730,10 @@ var Component$c = defineComponent({
|
|
17713
17730
|
"scrollEvent": true,
|
17714
17731
|
"enabled": props2.virtualEnabled
|
17715
17732
|
}), {
|
17716
|
-
default: (scope) => tableRender.renderTableBodySchema(scope.data || props2.data)
|
17733
|
+
default: (scope) => tableRender.renderTableBodySchema(scope.data || props2.data),
|
17734
|
+
afterSection: () => createVNode("div", {
|
17735
|
+
"class": fixedBottomBorder
|
17736
|
+
}, null)
|
17717
17737
|
}),
|
17718
17738
|
createVNode("div", {
|
17719
17739
|
"class": fixedWrapperClass
|
@@ -25941,86 +25961,70 @@ var Row = defineComponent({
|
|
25941
25961
|
}
|
25942
25962
|
});
|
25943
25963
|
const BkContainer = withInstallProps(Container, { Row, Col });
|
25964
|
+
const PLACEMENT_OPTIONS = ["auto", "auto-start", "auto-end", "top", "right", "bottom", "left", "top-start", "top-end", "bottom-start", "bottom-end", "right-start", "right-end", "left-start", "left-end"];
|
25965
|
+
const TRIGGER_OPTIONS = ["hover", "click", "manual"];
|
25944
25966
|
var Dropdown = defineComponent({
|
25945
25967
|
name: "Dropdown",
|
25946
25968
|
props: {
|
25947
25969
|
isShow: PropTypes.bool.def(false),
|
25948
|
-
placement: PropTypes.commonType(
|
25949
|
-
trigger: PropTypes.commonType(
|
25970
|
+
placement: PropTypes.commonType(PLACEMENT_OPTIONS, "placement").def("bottom"),
|
25971
|
+
trigger: PropTypes.commonType(TRIGGER_OPTIONS, "trigger").def("hover"),
|
25950
25972
|
disabled: PropTypes.bool.def(false),
|
25973
|
+
popoverOptions: PropTypes.object.def({}),
|
25951
25974
|
extCls: PropTypes.string
|
25952
25975
|
},
|
25953
25976
|
emits: ["showChange", "show", "hide"],
|
25954
|
-
setup(
|
25977
|
+
setup(_props, {
|
25955
25978
|
emit
|
25956
25979
|
}) {
|
25957
|
-
|
25958
|
-
|
25959
|
-
|
25960
|
-
onMounted(() => {
|
25961
|
-
registerDropdown();
|
25962
|
-
});
|
25963
|
-
onBeforeUnmount(() => {
|
25964
|
-
destoryDropdown();
|
25965
|
-
});
|
25966
|
-
watch(() => props2.isShow, (val) => {
|
25967
|
-
nextTick(() => {
|
25968
|
-
if (props2.trigger === "manual" && popoverInstance && !props2.disabled) {
|
25969
|
-
val ? popoverInstance.show() : popoverInstance.hide();
|
25970
|
-
}
|
25971
|
-
});
|
25972
|
-
});
|
25973
|
-
watch(() => props2.disabled, (val) => handleUpdateDisabled(val));
|
25980
|
+
const handleShowChagne = (val) => {
|
25981
|
+
emit("showChange", val);
|
25982
|
+
};
|
25974
25983
|
const afterShow = () => {
|
25975
25984
|
emit("show");
|
25985
|
+
handleShowChagne(true);
|
25976
25986
|
};
|
25977
25987
|
const afterHidden = () => {
|
25978
25988
|
emit("hide");
|
25979
|
-
|
25980
|
-
const registerDropdown = () => {
|
25981
|
-
if (props2.disabled)
|
25982
|
-
return;
|
25983
|
-
popoverInstance = new BKPopover(reference2.value, refContent.value, {
|
25984
|
-
placement: props2.placement,
|
25985
|
-
trigger: props2.trigger,
|
25986
|
-
afterShow,
|
25987
|
-
afterHidden
|
25988
|
-
});
|
25989
|
-
props2.trigger === "manual" && props2.isShow && popoverInstance.show();
|
25990
|
-
};
|
25991
|
-
const destoryDropdown = () => {
|
25992
|
-
if (popoverInstance) {
|
25993
|
-
const instance = popoverInstance;
|
25994
|
-
instance.isShow && instance.hide();
|
25995
|
-
instance.destroy();
|
25996
|
-
popoverInstance = null;
|
25997
|
-
props2.trigger === "manual" && emit("showChange", false);
|
25998
|
-
}
|
25999
|
-
};
|
26000
|
-
const handleUpdateDisabled = (val) => {
|
26001
|
-
const instance = popoverInstance;
|
26002
|
-
props2.trigger === "manual" && !val && emit("showChange", false);
|
26003
|
-
instance.updateDisabled(val);
|
25989
|
+
handleShowChagne(false);
|
26004
25990
|
};
|
26005
25991
|
return {
|
26006
|
-
|
26007
|
-
|
25992
|
+
afterShow,
|
25993
|
+
afterHidden
|
26008
25994
|
};
|
26009
25995
|
},
|
26010
25996
|
render() {
|
26011
|
-
var _a, _b, _c, _d;
|
26012
25997
|
const wrapperClasses = classes({
|
26013
25998
|
"bk-dropdown": true
|
26014
25999
|
}, this.$props.extCls);
|
26000
|
+
const basePopoverOptions = {
|
26001
|
+
theme: "light bk-dropdown-popover",
|
26002
|
+
trigger: this.trigger,
|
26003
|
+
arrow: false,
|
26004
|
+
placement: this.placement,
|
26005
|
+
isShow: this.isShow,
|
26006
|
+
disabled: this.disabled
|
26007
|
+
};
|
26008
|
+
const popoverOptions = lodash.exports.merge(basePopoverOptions, this.popoverOptions);
|
26015
26009
|
return createVNode("div", {
|
26016
26010
|
"class": wrapperClasses
|
26017
|
-
}, [createVNode(
|
26018
|
-
"
|
26019
|
-
"
|
26020
|
-
}
|
26021
|
-
|
26022
|
-
|
26023
|
-
|
26011
|
+
}, [createVNode(BkPopover2, mergeProps(popoverOptions, {
|
26012
|
+
"onAfterShow": this.afterShow,
|
26013
|
+
"onAfterHidden": this.afterHidden
|
26014
|
+
}), {
|
26015
|
+
default: () => {
|
26016
|
+
var _a, _b;
|
26017
|
+
return createVNode("div", {
|
26018
|
+
"class": "bk-dropdown-reference"
|
26019
|
+
}, [createTextVNode(" "), (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a), createTextVNode(" ")]);
|
26020
|
+
},
|
26021
|
+
content: () => {
|
26022
|
+
var _a, _b;
|
26023
|
+
return createVNode("div", {
|
26024
|
+
"class": "bk-dropdown-content"
|
26025
|
+
}, [createTextVNode(" "), (_b = (_a = this.$slots).content) == null ? void 0 : _b.call(_a), createTextVNode(" ")]);
|
26026
|
+
}
|
26027
|
+
})]);
|
26024
26028
|
}
|
26025
26029
|
});
|
26026
26030
|
var DropdownItem = defineComponent({
|
@@ -26257,8 +26261,8 @@ class Store {
|
|
26257
26261
|
constructor(props2) {
|
26258
26262
|
const { list } = props2;
|
26259
26263
|
this.data = list;
|
26260
|
-
this.nodes = this.data.map((node) => new Node$1(node, this.config));
|
26261
26264
|
this.config = props2;
|
26265
|
+
this.nodes = this.data.map((node) => new Node$1(node, this.config));
|
26262
26266
|
}
|
26263
26267
|
getNodes() {
|
26264
26268
|
return this.nodes;
|