bkui-vue 1.0.3-beta.68.dialog.1 → 1.0.3-beta.68.dialog.2
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 +50 -50
- package/dist/index.esm.js +8023 -7918
- package/dist/index.umd.js +50 -50
- package/lib/dialog/index.js +21 -31
- package/lib/radio/index.d.ts +15 -0
- package/lib/radio/index.js +21 -13
- package/lib/radio/radio.d.ts +10 -0
- package/lib/tree/constant.d.ts +3 -1
- package/lib/tree/index.d.ts +21 -0
- package/lib/tree/index.js +17540 -23
- package/lib/tree/props.d.ts +10 -0
- package/lib/tree/tree.d.ts +17 -2
- package/lib/tree/use-intersection-observer.d.ts +27 -0
- package/lib/tree/use-node-attribute.d.ts +9 -0
- package/lib/virtual-render/index.js +11 -5
- package/package.json +1 -1
package/lib/tree/props.d.ts
CHANGED
@@ -222,12 +222,22 @@ export declare const treeProps: {
|
|
222
222
|
} & {
|
223
223
|
default: boolean;
|
224
224
|
};
|
225
|
+
/**
|
226
|
+
* 是否开启监听Tree节点进入Tree容器可视区域
|
227
|
+
*/
|
228
|
+
intersectionObserver: import("vue-types").VueTypeDef<boolean | IIntersectionObserver> & {
|
229
|
+
default: boolean | (() => IIntersectionObserver);
|
230
|
+
};
|
225
231
|
};
|
226
232
|
type AsyncOption = {
|
227
233
|
callback: (item: any, cb: any) => Promise<any>;
|
228
234
|
cache: Boolean;
|
229
235
|
deepAutoOpen?: string;
|
230
236
|
};
|
237
|
+
export type IIntersectionObserver = {
|
238
|
+
enabled: boolean;
|
239
|
+
callback: (node: any, level: number, index: number) => void;
|
240
|
+
};
|
231
241
|
export type SearchOption = {
|
232
242
|
value: string | number | boolean;
|
233
243
|
match?: `${TreeSearchMatchEnum}` | Function;
|
package/lib/tree/tree.d.ts
CHANGED
@@ -60,7 +60,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
60
|
default: string;
|
61
61
|
} & {
|
62
62
|
default: string;
|
63
|
-
};
|
63
|
+
}; /**
|
64
|
+
* 将制定元素滚动到顶部
|
65
|
+
* @param option
|
66
|
+
*/
|
64
67
|
draggable: import("vue-types").VueTypeValidableDef<boolean> & {
|
65
68
|
default: boolean;
|
66
69
|
} & {
|
@@ -125,6 +128,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
125
128
|
} & {
|
126
129
|
default: boolean;
|
127
130
|
};
|
131
|
+
intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
|
132
|
+
default: boolean | (() => import("./props").IIntersectionObserver);
|
133
|
+
};
|
128
134
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
129
135
|
nodeClick: (..._args: any[]) => boolean;
|
130
136
|
nodeCollapse: (..._args: any[]) => boolean;
|
@@ -134,6 +140,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
134
140
|
nodeDragOver: (..._args: any[]) => boolean;
|
135
141
|
nodeDragLeave: (..._args: any[]) => boolean;
|
136
142
|
nodeDrop: (..._args: any[]) => boolean;
|
143
|
+
nodeEnterView: (..._args: any[]) => boolean;
|
137
144
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
138
145
|
data: import("vue-types").VueTypeDef<any[]> & {
|
139
146
|
default: () => any[];
|
@@ -190,7 +197,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
190
197
|
default: string;
|
191
198
|
} & {
|
192
199
|
default: string;
|
193
|
-
};
|
200
|
+
}; /**
|
201
|
+
* 将制定元素滚动到顶部
|
202
|
+
* @param option
|
203
|
+
*/
|
194
204
|
draggable: import("vue-types").VueTypeValidableDef<boolean> & {
|
195
205
|
default: boolean;
|
196
206
|
} & {
|
@@ -255,6 +265,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
255
265
|
} & {
|
256
266
|
default: boolean;
|
257
267
|
};
|
268
|
+
intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
|
269
|
+
default: boolean | (() => import("./props").IIntersectionObserver);
|
270
|
+
};
|
258
271
|
}>> & {
|
259
272
|
onNodeClick?: (...args: any[]) => any;
|
260
273
|
onNodeCollapse?: (...args: any[]) => any;
|
@@ -264,6 +277,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
264
277
|
onNodeDragOver?: (...args: any[]) => any;
|
265
278
|
onNodeDragLeave?: (...args: any[]) => any;
|
266
279
|
onNodeDrop?: (...args: any[]) => any;
|
280
|
+
onNodeEnterView?: (...args: any[]) => any;
|
267
281
|
}, {
|
268
282
|
data: any[];
|
269
283
|
height: number;
|
@@ -292,5 +306,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
292
306
|
nodeContentAction: any;
|
293
307
|
keepSlotData: boolean;
|
294
308
|
checkStrictly: boolean;
|
309
|
+
intersectionObserver: boolean | import("./props").IIntersectionObserver;
|
295
310
|
}, {}>;
|
296
311
|
export default _default;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { IIntersectionObserver, TreePropTypes } from './props';
|
2
|
+
type IntersectionObserverOptions = {
|
3
|
+
rootMargin?: string;
|
4
|
+
threshold?: number | number[];
|
5
|
+
root?: Element | null;
|
6
|
+
};
|
7
|
+
type IntersectionObserverResponseValue = {
|
8
|
+
level: number;
|
9
|
+
node: Record<string, any>;
|
10
|
+
index: number;
|
11
|
+
entry: IntersectionObserverEntry;
|
12
|
+
};
|
13
|
+
type IntersectionObserverResponse = {
|
14
|
+
beforeResponse?: (entry: IntersectionObserverEntry) => IntersectionObserverResponseValue;
|
15
|
+
};
|
16
|
+
declare const _default: (props: TreePropTypes) => {
|
17
|
+
unobserveAll: () => void;
|
18
|
+
intersectionObserver: import("vue").ComputedRef<{
|
19
|
+
enabled: boolean | IIntersectionObserver;
|
20
|
+
once: boolean;
|
21
|
+
callback: any;
|
22
|
+
}>;
|
23
|
+
initIntersectionObserver: (target: Element | Element[] | Node | Node[], options: IntersectionObserverOptions, resp?: IntersectionObserverResponse) => void;
|
24
|
+
initRootMutationObserver: (root: Element, callback: any) => void;
|
25
|
+
getLastVisibleElement: (offsetY: number, root: HTMLElement) => HTMLElement[];
|
26
|
+
};
|
27
|
+
export default _default;
|
@@ -6,6 +6,7 @@ declare const _default: (flatData: {
|
|
6
6
|
getSchemaVal: (node: any) => any;
|
7
7
|
getNodeAttr: (node: any, attr: string) => any;
|
8
8
|
getNodeId: (node: any) => any;
|
9
|
+
getNodeById: (id: any) => any;
|
9
10
|
getNodeParentId: (node: any) => any;
|
10
11
|
getParentNodeData: (node: any) => any;
|
11
12
|
getNodePathById: (id: string) => any;
|
@@ -47,5 +48,13 @@ declare const _default: (flatData: {
|
|
47
48
|
parentId: any;
|
48
49
|
};
|
49
50
|
};
|
51
|
+
getIntersectionResponse: (target: HTMLElement | Record<string, any>) => {
|
52
|
+
level: any;
|
53
|
+
target: HTMLElement | Record<string, any>;
|
54
|
+
index: any;
|
55
|
+
parent: any;
|
56
|
+
node: HTMLElement | Record<string, any>;
|
57
|
+
isRoot: any;
|
58
|
+
};
|
50
59
|
};
|
51
60
|
export default _default;
|
@@ -529,7 +529,7 @@ function computedVirtualIndex(lineHeight, callback, pagination, wrapper, event)
|
|
529
529
|
targetEndIndex = endValue.startIndex + targetStartIndex;
|
530
530
|
}
|
531
531
|
var bottom = elScrollHeight - elOffsetHeight - elScrollTop;
|
532
|
-
typeof callback === 'function' && callback(event, targetStartIndex, targetEndIndex, elScrollTop,
|
532
|
+
typeof callback === 'function' && callback(event, targetStartIndex, targetEndIndex, elScrollTop, elScrollTop, elScrollLeft, {
|
533
533
|
bottom: bottom >= 0 ? bottom : 0,
|
534
534
|
scrollbar: event
|
535
535
|
});
|
@@ -694,6 +694,7 @@ function use_tag_render_objectSpread(e) { for (var r = 1; r < arguments.length;
|
|
694
694
|
var renderAs = props.renderAs,
|
695
695
|
contentAs = props.contentAs;
|
696
696
|
var refRoot = (0,external_vue_namespaceObject.ref)(null);
|
697
|
+
var refContent = (0,external_vue_namespaceObject.ref)(null);
|
697
698
|
var _useScrollbar = use_scrollbar(refRoot, props),
|
698
699
|
init = _useScrollbar.init,
|
699
700
|
scrollTo = _useScrollbar.scrollTo,
|
@@ -744,7 +745,9 @@ function use_tag_render_objectSpread(e) { for (var r = 1; r < arguments.length;
|
|
744
745
|
fixToTop = _useFixTop.fixToTop;
|
745
746
|
ctx.expose({
|
746
747
|
scrollTo: scrollTo,
|
747
|
-
fixToTop: fixToTop
|
748
|
+
fixToTop: fixToTop,
|
749
|
+
refRoot: refRoot,
|
750
|
+
refContent: refContent
|
748
751
|
});
|
749
752
|
(0,external_vue_namespaceObject.onMounted)(function () {
|
750
753
|
var _props$scrollbar;
|
@@ -782,7 +785,8 @@ function use_tag_render_objectSpread(e) { for (var r = 1; r < arguments.length;
|
|
782
785
|
ref: refRoot
|
783
786
|
}, [(_ctx$slots$beforeCont = (_ctx$slots$beforeCont2 = (_ctx$slots = ctx.slots).beforeContent) === null || _ctx$slots$beforeCont2 === void 0 ? void 0 : _ctx$slots$beforeCont2.call(_ctx$slots)) !== null && _ctx$slots$beforeCont !== void 0 ? _ctx$slots$beforeCont : '', (0,external_vue_namespaceObject.h)(contentAs, {
|
784
787
|
"class": contentClassNames.value,
|
785
|
-
style: computedStyle.value
|
788
|
+
style: computedStyle.value,
|
789
|
+
ref: refContent
|
786
790
|
}, [(_ctx$slots$default = (_ctx$slots$default2 = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default2 === void 0 ? void 0 : _ctx$slots$default2.call(_ctx$slots2, {
|
787
791
|
data: props.list
|
788
792
|
})) !== null && _ctx$slots$default !== void 0 ? _ctx$slots$default : '']), (_ctx$slots$afterConte = (_ctx$slots$afterConte2 = (_ctx$slots3 = ctx.slots).afterContent) === null || _ctx$slots$afterConte2 === void 0 ? void 0 : _ctx$slots$afterConte2.call(_ctx$slots3)) !== null && _ctx$slots$afterConte !== void 0 ? _ctx$slots$afterConte : '', (_ctx$slots$afterSecti = (_ctx$slots$afterSecti2 = (_ctx$slots4 = ctx.slots).afterSection) === null || _ctx$slots$afterSecti2 === void 0 ? void 0 : _ctx$slots$afterSecti2.call(_ctx$slots4)) !== null && _ctx$slots$afterSecti !== void 0 ? _ctx$slots$afterSecti : '']);
|
@@ -911,7 +915,7 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
|
|
911
915
|
var value = localList.value.slice(start, end);
|
912
916
|
calcList.value = value;
|
913
917
|
if (event) {
|
914
|
-
ctx.emit('content-scroll', [event, pagination]);
|
918
|
+
ctx.emit('content-scroll', [event, pagination, value]);
|
915
919
|
}
|
916
920
|
};
|
917
921
|
(0,external_vue_namespaceObject.onMounted)(function () {
|
@@ -1053,7 +1057,9 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
|
|
1053
1057
|
ctx.expose({
|
1054
1058
|
reset: reset,
|
1055
1059
|
scrollTo: scrollTo,
|
1056
|
-
fixToTop: fixToTop
|
1060
|
+
fixToTop: fixToTop,
|
1061
|
+
refRoot: refRoot,
|
1062
|
+
refContent: refContent
|
1057
1063
|
});
|
1058
1064
|
return function () {
|
1059
1065
|
var _ctx$slots$beforeCont, _ctx$slots$beforeCont2, _ctx$slots, _ctx$slots$default, _ctx$slots$default2, _ctx$slots2, _ctx$slots$afterConte, _ctx$slots$afterConte2, _ctx$slots3, _ctx$slots$afterSecti, _ctx$slots$afterSecti2, _ctx$slots4;
|