bkui-vue 0.0.1-beta.71 → 0.0.1-beta.74
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 +15 -15
- package/dist/index.esm.js +76 -37
- package/dist/index.umd.js +15 -15
- package/dist/style.css +1 -1
- package/lib/dialog/dialog.css +3 -0
- package/lib/dialog/dialog.d.ts +12 -1
- package/lib/dialog/dialog.less +3 -0
- package/lib/dialog/dialog.variable.css +3 -0
- package/lib/dialog/index.d.ts +27 -4
- package/lib/dialog/index.js +1 -1
- package/lib/menu/index.d.ts +4 -4
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu.d.ts +3 -3
- package/lib/modal/index.d.ts +77 -99
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +30 -39
- package/lib/modal/props.mixin.d.ts +14 -19
- package/lib/sideslider/index.d.ts +79 -77
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +38 -38
- package/lib/tree/index.js +1 -1
- package/lib/tree/use-node-action.d.ts +1 -0
- package/lib/tree/use-tree-init.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -9618,8 +9618,8 @@ var Component$q = defineComponent({
|
|
9618
9618
|
const BkCollapse = withInstall(Component$q);
|
9619
9619
|
const propsMixin$1 = {
|
9620
9620
|
isShow: PropTypes.bool.def(false),
|
9621
|
-
width: PropTypes.
|
9622
|
-
height: PropTypes.
|
9621
|
+
width: PropTypes.oneOfType([String, Number]).def("50%"),
|
9622
|
+
height: PropTypes.oneOfType([String, Number]).def("50%"),
|
9623
9623
|
customClass: PropTypes.string || PropTypes.array,
|
9624
9624
|
scrollable: PropTypes.bool.def(true),
|
9625
9625
|
showMask: PropTypes.bool.def(true),
|
@@ -9632,12 +9632,13 @@ const propsMixin$1 = {
|
|
9632
9632
|
draggable: PropTypes.bool.def(true),
|
9633
9633
|
quickClose: PropTypes.bool.def(true),
|
9634
9634
|
transfer: PropTypes.bool.def(false),
|
9635
|
-
title: PropTypes.string.def("Header"),
|
9636
9635
|
maxHeight: PropTypes.string,
|
9637
9636
|
direction: PropTypes.string,
|
9638
9637
|
animateType: PropTypes.string.def("slide"),
|
9639
9638
|
renderDirective: PropTypes.commonType(["show", "if"], "renderDirective").def("show"),
|
9640
|
-
beforeClose: PropTypes.custom(() => true)
|
9639
|
+
beforeClose: PropTypes.custom(() => true),
|
9640
|
+
dialogType: PropTypes.commonType(["show", "operation", "confirm", "process"], "dialogType").def("operation"),
|
9641
|
+
multiInstance: PropTypes.bool.def(true)
|
9641
9642
|
};
|
9642
9643
|
var Component$p = defineComponent({
|
9643
9644
|
name: "Modal",
|
@@ -9706,7 +9707,7 @@ var Component$p = defineComponent({
|
|
9706
9707
|
} : {};
|
9707
9708
|
const bodyClass = `bk-modal-body ${this.animateType === "slide" ? this.direction : ""}`;
|
9708
9709
|
return createVNode("div", {
|
9709
|
-
"class": ["bk-modal-wrapper", this.
|
9710
|
+
"class": ["bk-modal-wrapper", this.customClass],
|
9710
9711
|
"style": this.compStyle
|
9711
9712
|
}, [withDirectives(createVNode("div", {
|
9712
9713
|
"class": "bk-modal-outside",
|
@@ -9722,8 +9723,8 @@ var Component$p = defineComponent({
|
|
9722
9723
|
"class": "bk-modal-header"
|
9723
9724
|
}, [(_c = (_b = (_a = this.$slots).header) == null ? void 0 : _b.call(_a)) != null ? _c : ""]), createVNode("div", {
|
9724
9725
|
"class": "bk-modal-content",
|
9725
|
-
"style": __spreadValues({}, maxHeight)
|
9726
|
-
}, [(_f = (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)) != null ? _f : ""]), createVNode("div", {
|
9726
|
+
"style": [this.dialogType === "show" ? "height: calc(100% - 74px);margin-bottom: 0px" : "", __spreadValues({}, maxHeight)]
|
9727
|
+
}, [(_f = (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)) != null ? _f : ""]), this.dialogType === "show" ? "" : createVNode("div", {
|
9727
9728
|
"class": "bk-modal-footer"
|
9728
9729
|
}, [(_i = (_h = (_g = this.$slots).footer) == null ? void 0 : _h.call(_g)) != null ? _i : ""])]) : ""];
|
9729
9730
|
}
|
@@ -9780,12 +9781,14 @@ var Component$o = defineComponent({
|
|
9780
9781
|
});
|
9781
9782
|
watch(() => props.isShow, (val) => {
|
9782
9783
|
if (!val) {
|
9783
|
-
|
9784
|
-
|
9785
|
-
|
9786
|
-
|
9787
|
-
|
9788
|
-
|
9784
|
+
setTimeout(() => {
|
9785
|
+
data2.moveStyle = {
|
9786
|
+
top: "50%",
|
9787
|
+
left: "50%"
|
9788
|
+
};
|
9789
|
+
data2.positionX = 0;
|
9790
|
+
data2.positionY = 0;
|
9791
|
+
}, 1e3);
|
9789
9792
|
}
|
9790
9793
|
});
|
9791
9794
|
const handleClose = () => {
|
@@ -9813,6 +9816,9 @@ var Component$o = defineComponent({
|
|
9813
9816
|
if (props.fullscreen) {
|
9814
9817
|
return false;
|
9815
9818
|
}
|
9819
|
+
if (!props.draggable) {
|
9820
|
+
return false;
|
9821
|
+
}
|
9816
9822
|
const odiv = e.target;
|
9817
9823
|
const parentHeight = e.currentTarget.parentNode.parentNode.offsetHeight;
|
9818
9824
|
const parentWidth = e.currentTarget.parentNode.parentNode.offsetWidth;
|
@@ -9863,11 +9869,11 @@ var Component$o = defineComponent({
|
|
9863
9869
|
render() {
|
9864
9870
|
const dialogSlot = {
|
9865
9871
|
header: () => {
|
9866
|
-
var _a, _b, _c;
|
9872
|
+
var _a, _b, _c, _d, _e, _f;
|
9867
9873
|
return [createVNode("div", {
|
9868
9874
|
"class": ["bk-dialog-tool", this.fullscreen || !this.draggable ? "" : "move", this.draggable ? "content-dragging" : ""],
|
9869
9875
|
"onMousedown": this.moveHandler
|
9870
|
-
}, [createVNode("span", {
|
9876
|
+
}, [(_c = (_b = (_a = this.$slots).tools) == null ? void 0 : _b.call(_a)) != null ? _c : "", createVNode("span", {
|
9871
9877
|
"class": ["bk-dialog-close", this.closeIcon ? "" : "close-icon"],
|
9872
9878
|
"onClick": this.handleClose
|
9873
9879
|
}, [createTextVNode("+")])]), createVNode("div", {
|
@@ -9875,7 +9881,7 @@ var Component$o = defineComponent({
|
|
9875
9881
|
}, [createVNode("span", {
|
9876
9882
|
"class": "bk-dialog-title",
|
9877
9883
|
"style": `text-align: ${this.headerAlign}`
|
9878
|
-
}, [(
|
9884
|
+
}, [(_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : this.title])])];
|
9879
9885
|
},
|
9880
9886
|
default: () => {
|
9881
9887
|
var _a, _b, _c;
|
@@ -9927,7 +9933,7 @@ var Component$o = defineComponent({
|
|
9927
9933
|
})]) : ""]);
|
9928
9934
|
}
|
9929
9935
|
};
|
9930
|
-
const className = `bk-dialog-wrapper ${this.scrollable ? "scroll-able" : ""}`;
|
9936
|
+
const className = `bk-dialog-wrapper ${this.scrollable ? "scroll-able" : ""} ${this.multiInstance ? "multi-instance" : ""}`;
|
9931
9937
|
return createVNode(BkModal, mergeProps(this.$props, {
|
9932
9938
|
"class": [className, this.fullscreen ? "bk-model-fullscreen" : this.size],
|
9933
9939
|
"style": this.data.moveStyle
|
@@ -12110,6 +12116,10 @@ var Component$d = defineComponent({
|
|
12110
12116
|
BkButton
|
12111
12117
|
},
|
12112
12118
|
props: __spreadProps(__spreadValues({}, sliderPops), {
|
12119
|
+
title: {
|
12120
|
+
type: String,
|
12121
|
+
default: ""
|
12122
|
+
},
|
12113
12123
|
direction: {
|
12114
12124
|
type: String,
|
12115
12125
|
default: "right",
|
@@ -16283,7 +16293,7 @@ const menuProps = {
|
|
16283
16293
|
type: Boolean,
|
16284
16294
|
default: false
|
16285
16295
|
},
|
16286
|
-
|
16296
|
+
openedKeys: {
|
16287
16297
|
type: Array
|
16288
16298
|
},
|
16289
16299
|
mode: {
|
@@ -16309,7 +16319,7 @@ var Component$6 = defineComponent({
|
|
16309
16319
|
const mode = computed(() => props.mode);
|
16310
16320
|
const collapse2 = ref(props.collapse);
|
16311
16321
|
const oldOpenKeys = ref([]);
|
16312
|
-
watch(() => props.
|
16322
|
+
watch(() => props.openedKeys, (keys = openedKeys.value) => {
|
16313
16323
|
openedKeys.value = keys;
|
16314
16324
|
}, {
|
16315
16325
|
immediate: true
|
@@ -21595,6 +21605,7 @@ var useNodeAction = (props, ctx, flatData, renderData, schemaValues) => {
|
|
21595
21605
|
renderTreeNode,
|
21596
21606
|
hanldeTreeNodeClick,
|
21597
21607
|
deepAutoOpen,
|
21608
|
+
asyncNodeClick,
|
21598
21609
|
setNodeAction,
|
21599
21610
|
setNodeOpened,
|
21600
21611
|
setSelect,
|
@@ -21975,7 +21986,7 @@ var useTreeInit = (props) => {
|
|
21975
21986
|
flatten(item, depth, parent, path);
|
21976
21987
|
} else {
|
21977
21988
|
if (typeof item === "object" && item !== null) {
|
21978
|
-
const uuid2 = getUid(item)
|
21989
|
+
const uuid2 = `${getUid(item)}`;
|
21979
21990
|
const currentPath = path !== null ? `${path}-${i}` : `${i}`;
|
21980
21991
|
const hasChildren = !!(item[children] || []).length;
|
21981
21992
|
const attrs = {
|
@@ -22017,7 +22028,9 @@ var useTreeInit = (props) => {
|
|
22017
22028
|
return [outputData, schema];
|
22018
22029
|
};
|
22019
22030
|
const formatData = getFlatdata(props);
|
22020
|
-
const
|
22031
|
+
const nextLoopEvents = /* @__PURE__ */ new Map();
|
22032
|
+
const afterSelectEvents = [];
|
22033
|
+
const afterSelectWatch = [];
|
22021
22034
|
const flatData = reactive({
|
22022
22035
|
data: formatData[0],
|
22023
22036
|
schema: formatData[1],
|
@@ -22028,6 +22041,25 @@ var useTreeInit = (props) => {
|
|
22028
22041
|
asyncNodeClick,
|
22029
22042
|
deepAutoOpen
|
22030
22043
|
} = useNodeAsync(props, flatData);
|
22044
|
+
const onSelected = (event) => {
|
22045
|
+
afterSelectEvents.push(event);
|
22046
|
+
};
|
22047
|
+
const registerNextLoop = (key, event, reset2 = true) => {
|
22048
|
+
if (reset2 && nextLoopEvents.has(key)) {
|
22049
|
+
nextLoopEvents.delete(key);
|
22050
|
+
}
|
22051
|
+
nextLoopEvents.set(key, event);
|
22052
|
+
};
|
22053
|
+
const executeNextEvent = () => {
|
22054
|
+
Array.from(nextLoopEvents.keys()).forEach((key) => {
|
22055
|
+
const target = nextLoopEvents.get(key);
|
22056
|
+
if (Array.isArray(target)) {
|
22057
|
+
target.forEach((event) => Reflect.apply(event, globalThis, []));
|
22058
|
+
} else {
|
22059
|
+
Reflect.apply(target, globalThis, []);
|
22060
|
+
}
|
22061
|
+
});
|
22062
|
+
};
|
22031
22063
|
watch(() => [props.data], (newData) => {
|
22032
22064
|
var _a2, _b;
|
22033
22065
|
const formatData2 = getFlatdata(props, newData, schemaValues.value);
|
@@ -22036,16 +22068,24 @@ var useTreeInit = (props) => {
|
|
22036
22068
|
if (((_a2 = props.async) == null ? void 0 : _a2.callback) && ((_b = props.async) == null ? void 0 : _b.deepAutoOpen) === "every") {
|
22037
22069
|
deepAutoOpen();
|
22038
22070
|
}
|
22039
|
-
|
22040
|
-
loopEvents.forEach((event) => {
|
22041
|
-
Reflect.apply(event, globalThis, []);
|
22042
|
-
});
|
22043
|
-
});
|
22071
|
+
executeNextEvent();
|
22044
22072
|
}, {
|
22045
22073
|
deep: true
|
22046
22074
|
});
|
22075
|
+
if (props.selectable) {
|
22076
|
+
watch(() => props.selected, (newData) => {
|
22077
|
+
afterSelectWatch.length = 0;
|
22078
|
+
afterSelectEvents.forEach((event) => {
|
22079
|
+
Reflect.apply(event, globalThis, [newData]);
|
22080
|
+
afterSelectWatch.push(() => Reflect.apply(event, globalThis, [newData]));
|
22081
|
+
});
|
22082
|
+
registerNextLoop("afterSelectWatch", afterSelectWatch);
|
22083
|
+
}, {
|
22084
|
+
immediate: true
|
22085
|
+
});
|
22086
|
+
}
|
22047
22087
|
const afterDataUpdate = (callFn) => {
|
22048
|
-
|
22088
|
+
registerNextLoop("afterDataUpdate", callFn);
|
22049
22089
|
};
|
22050
22090
|
if ((_a = props.async) == null ? void 0 : _a.callback) {
|
22051
22091
|
deepAutoOpen();
|
@@ -22055,7 +22095,8 @@ var useTreeInit = (props) => {
|
|
22055
22095
|
schemaValues,
|
22056
22096
|
asyncNodeClick,
|
22057
22097
|
deepAutoOpen,
|
22058
|
-
afterDataUpdate
|
22098
|
+
afterDataUpdate,
|
22099
|
+
onSelected
|
22059
22100
|
};
|
22060
22101
|
};
|
22061
22102
|
var Component$2 = defineComponent({
|
@@ -22066,7 +22107,7 @@ var Component$2 = defineComponent({
|
|
22066
22107
|
const {
|
22067
22108
|
flatData,
|
22068
22109
|
schemaValues,
|
22069
|
-
|
22110
|
+
onSelected
|
22070
22111
|
} = useTreeInit(props);
|
22071
22112
|
const {
|
22072
22113
|
setNodeAttr,
|
@@ -22112,18 +22153,15 @@ var Component$2 = defineComponent({
|
|
22112
22153
|
setNodeOpened,
|
22113
22154
|
setOpen,
|
22114
22155
|
setNodeAction,
|
22115
|
-
setSelect
|
22156
|
+
setSelect,
|
22157
|
+
asyncNodeClick
|
22116
22158
|
} = useNodeAction(props, ctx, flatData, renderData, schemaValues);
|
22117
22159
|
const setChecked = (item, checked = true) => {
|
22118
22160
|
setNodeAction(resolveNodeItem(item), NODE_ATTRIBUTES.IS_CHECKED, checked);
|
22119
22161
|
};
|
22120
|
-
|
22121
|
-
|
22122
|
-
|
22123
|
-
}, {
|
22124
|
-
immediate: true
|
22125
|
-
});
|
22126
|
-
}
|
22162
|
+
onSelected((newData) => {
|
22163
|
+
setSelect(newData, true, true);
|
22164
|
+
});
|
22127
22165
|
const getData = () => flatData;
|
22128
22166
|
ctx.expose({
|
22129
22167
|
hanldeTreeNodeClick,
|
@@ -22137,6 +22175,7 @@ var Component$2 = defineComponent({
|
|
22137
22175
|
setNodeAction,
|
22138
22176
|
setNodeOpened,
|
22139
22177
|
setSelect,
|
22178
|
+
asyncNodeClick,
|
22140
22179
|
getData
|
22141
22180
|
});
|
22142
22181
|
const root = ref();
|