bkui-vue 2.1.0-dev-beta.8 → 2.1.0-dev-beta.9

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/lib/index.js CHANGED
@@ -3,5 +3,5 @@ export * from './hooks';
3
3
  export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
- export const version = "2.1.0-dev-beta.8";
6
+ export const version = "2.1.0-dev-beta.9";
7
7
  window.__bkui_vue_version__ = version;
@@ -45,7 +45,7 @@ const shared_namespaceObject = x({ ["PlacementEnum"]: () => __WEBPACK_EXTERNAL_M
45
45
  ;// CONCATENATED MODULE: external "vue"
46
46
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
47
47
  var external_vue_y = x => () => x
48
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentScope"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentScope, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onScopeDispose"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onScopeDispose, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["shallowReadonly"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowReadonly, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
48
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentScope"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentScope, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onScopeDispose"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onScopeDispose, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["shallowReadonly"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowReadonly, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["useAttrs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
49
49
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
50
50
  function _arrayLikeToArray(r, a) {
51
51
  (null == a || a > r.length) && (a = r.length);
@@ -3295,12 +3295,14 @@ var EMIT_EVENTS = {
3295
3295
  };
3296
3296
  /* harmony default export */ const popover = ((0,external_vue_namespaceObject.defineComponent)({
3297
3297
  name: 'Popover',
3298
+ inheritAttrs: false,
3298
3299
  props: PopoverProps,
3299
3300
  emits: [EMIT_EVENTS.AFTER_SHOW, EMIT_EVENTS.AFTER_HIDDEN, EMIT_EVENTS.CLICK_OUTSIDE, EMIT_EVENTS.CONTENT_MOUSEENTER, EMIT_EVENTS.CONTENT_MOUSELEAVE, EMIT_EVENTS.UPDATE_IS_SHOW],
3300
3301
  setup: function setup(props, _ref) {
3301
3302
  var slots = _ref.slots,
3302
3303
  emit = _ref.emit,
3303
3304
  expose = _ref.expose;
3305
+ var attrs = (0,external_vue_namespaceObject.useAttrs)();
3304
3306
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
3305
3307
  resolveClassName = _usePrefix.resolveClassName;
3306
3308
  // 当前实例 id(用于注册表与事件路径识别)
@@ -3415,20 +3417,15 @@ var EMIT_EVENTS = {
3415
3417
  /**
3416
3418
  * 解析默认 slot reference 元素
3417
3419
  *
3418
- * 兼容一些历史用法:default slot 内部元素可能是 `position: absolute`,
3419
- * 这会导致外层包裹的 referenceWrapperRef(inline-block)尺寸为 0,
3420
- * 从而让 floating-ui 使用错误的 reference 位置,并触发 hide middleware 的 referenceHidden。
3420
+ * referenceWrapperRef 使用 display: contents,自身无布局尺寸,
3421
+ * 因此需要从子元素中找到实际的 reference 元素。
3421
3422
  *
3422
- * 策略:当 referenceWrapperRef 自身尺寸为 0 时,优先使用第一个元素子节点作为 reference;否则向下寻找第一个具有可见尺寸的 HTMLElement。
3423
+ * 策略:优先使用第一个元素子节点作为 reference;否则向下寻找第一个具有可见尺寸的 HTMLElement。
3423
3424
  */
3424
3425
  var resolveDefaultReferenceElement = function resolveDefaultReferenceElement() {
3425
3426
  var wrapper = referenceWrapperRef.value;
3426
3427
  if (!wrapper) return null;
3427
- var wrapperRect = wrapper.getBoundingClientRect();
3428
- if (wrapperRect.width > 0 || wrapperRect.height > 0) {
3429
- return wrapper;
3430
- }
3431
- // 常见场景:slot 内元素为 absolute,wrapper 自身尺寸为 0,但第一个元素子节点就是实际触发器
3428
+ // display: contents 的元素自身尺寸为 0,直接查找子元素
3432
3429
  var firstChild = wrapper.firstElementChild;
3433
3430
  if (firstChild instanceof HTMLElement) {
3434
3431
  return firstChild;
@@ -3925,12 +3922,13 @@ var EMIT_EVENTS = {
3925
3922
  });
3926
3923
  }
3927
3924
  // 默认情况:渲染 reference 和 floating content
3925
+ // 使用 display: contents 避免影响内部元素布局
3928
3926
  return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("span", (0,external_vue_namespaceObject.mergeProps)({
3929
3927
  "ref": referenceWrapperRef,
3930
3928
  "style": {
3931
- display: 'inline-block'
3929
+ display: 'contents'
3932
3930
  },
3933
- "class": referenceCls.value
3931
+ "class": [referenceCls.value, attrs["class"]]
3934
3932
  }, referenceListeners.value), [(_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
3935
3933
  "disabled": disableTeleport.value,
3936
3934
  "to": teleportTo.value
@@ -1,4 +1,6 @@
1
1
  export declare enum EVENTS {
2
+ NODE_ASYNC_LOAD = "nodeAsyncLoad",
3
+ NODE_ASYNC_LOAD_ERROR = "nodeAsyncLoadError",
2
4
  NODE_CHECKED = "nodeChecked",
3
5
  NODE_CLICK = "nodeClick",
4
6
  NODE_COLLAPSE = "nodeCollapse",
@@ -12,6 +14,8 @@ export declare enum EVENTS {
12
14
  NODE_SELECTED = "nodeSelected"
13
15
  }
14
16
  export declare const TreeEmitEventsType: {
17
+ nodeAsyncLoad: (..._args: any[]) => boolean;
18
+ nodeAsyncLoadError: (..._args: any[]) => boolean;
15
19
  nodeClick: (..._args: any[]) => boolean;
16
20
  nodeCollapse: (..._args: any[]) => boolean;
17
21
  nodeExpand: (..._args: any[]) => boolean;
@@ -38,6 +38,7 @@ declare const BkTree: {
38
38
  prefixIcon: import("vue-types").VueTypeDef<any> & {
39
39
  default: any;
40
40
  };
41
+ onDataChange: import("vue").PropType<import("./props").TreeDataChangeHandler>;
41
42
  async: import("vue-types").VueTypeShape<{
42
43
  callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
43
44
  [key: string]: any;
@@ -134,10 +135,17 @@ declare const BkTree: {
134
135
  } & {
135
136
  default: boolean;
136
137
  };
138
+ deepWatch: import("vue-types").VueTypeValidableDef<boolean> & {
139
+ default: boolean;
140
+ } & {
141
+ default: boolean;
142
+ };
137
143
  intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
138
144
  default: boolean | (() => import("./props").IIntersectionObserver);
139
145
  };
140
146
  }>> & Readonly<{
147
+ onNodeAsyncLoad?: (...args: any[]) => any;
148
+ onNodeAsyncLoadError?: (...args: any[]) => any;
141
149
  onNodeChecked?: (...args: any[]) => any;
142
150
  onNodeClick?: (...args: any[]) => any;
143
151
  onNodeCollapse?: (...args: any[]) => any;
@@ -150,6 +158,8 @@ declare const BkTree: {
150
158
  onNodeExpand?: (...args: any[]) => any;
151
159
  onNodeSelected?: (...args: any[]) => any;
152
160
  }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
161
+ nodeAsyncLoad: (..._args: any[]) => boolean;
162
+ nodeAsyncLoadError: (..._args: any[]) => boolean;
153
163
  nodeClick: (..._args: any[]) => boolean;
154
164
  nodeCollapse: (..._args: any[]) => boolean;
155
165
  nodeExpand: (..._args: any[]) => boolean;
@@ -192,6 +202,7 @@ declare const BkTree: {
192
202
  nodeContentAction: any;
193
203
  keepSlotData: boolean;
194
204
  checkStrictly: boolean;
205
+ deepWatch: boolean;
195
206
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
196
207
  P: {};
197
208
  B: {};
@@ -238,6 +249,7 @@ declare const BkTree: {
238
249
  prefixIcon: import("vue-types").VueTypeDef<any> & {
239
250
  default: any;
240
251
  };
252
+ onDataChange: import("vue").PropType<import("./props").TreeDataChangeHandler>;
241
253
  async: import("vue-types").VueTypeShape<{
242
254
  callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
243
255
  [key: string]: any;
@@ -334,10 +346,17 @@ declare const BkTree: {
334
346
  } & {
335
347
  default: boolean;
336
348
  };
349
+ deepWatch: import("vue-types").VueTypeValidableDef<boolean> & {
350
+ default: boolean;
351
+ } & {
352
+ default: boolean;
353
+ };
337
354
  intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
338
355
  default: boolean | (() => import("./props").IIntersectionObserver);
339
356
  };
340
357
  }>> & Readonly<{
358
+ onNodeAsyncLoad?: (...args: any[]) => any;
359
+ onNodeAsyncLoadError?: (...args: any[]) => any;
341
360
  onNodeChecked?: (...args: any[]) => any;
342
361
  onNodeClick?: (...args: any[]) => any;
343
362
  onNodeCollapse?: (...args: any[]) => any;
@@ -380,6 +399,7 @@ declare const BkTree: {
380
399
  nodeContentAction: any;
381
400
  keepSlotData: boolean;
382
401
  checkStrictly: boolean;
402
+ deepWatch: boolean;
383
403
  }>;
384
404
  __isFragment?: never;
385
405
  __isTeleport?: never;
@@ -423,6 +443,7 @@ declare const BkTree: {
423
443
  prefixIcon: import("vue-types").VueTypeDef<any> & {
424
444
  default: any;
425
445
  };
446
+ onDataChange: import("vue").PropType<import("./props").TreeDataChangeHandler>;
426
447
  async: import("vue-types").VueTypeShape<{
427
448
  callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
428
449
  [key: string]: any;
@@ -519,10 +540,17 @@ declare const BkTree: {
519
540
  } & {
520
541
  default: boolean;
521
542
  };
543
+ deepWatch: import("vue-types").VueTypeValidableDef<boolean> & {
544
+ default: boolean;
545
+ } & {
546
+ default: boolean;
547
+ };
522
548
  intersectionObserver: import("vue-types").VueTypeDef<boolean | import("./props").IIntersectionObserver> & {
523
549
  default: boolean | (() => import("./props").IIntersectionObserver);
524
550
  };
525
551
  }>> & Readonly<{
552
+ onNodeAsyncLoad?: (...args: any[]) => any;
553
+ onNodeAsyncLoadError?: (...args: any[]) => any;
526
554
  onNodeChecked?: (...args: any[]) => any;
527
555
  onNodeClick?: (...args: any[]) => any;
528
556
  onNodeCollapse?: (...args: any[]) => any;
@@ -535,6 +563,8 @@ declare const BkTree: {
535
563
  onNodeExpand?: (...args: any[]) => any;
536
564
  onNodeSelected?: (...args: any[]) => any;
537
565
  }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
566
+ nodeAsyncLoad: (..._args: any[]) => boolean;
567
+ nodeAsyncLoadError: (..._args: any[]) => boolean;
538
568
  nodeClick: (..._args: any[]) => boolean;
539
569
  nodeCollapse: (..._args: any[]) => boolean;
540
570
  nodeExpand: (..._args: any[]) => boolean;
@@ -577,5 +607,6 @@ declare const BkTree: {
577
607
  nodeContentAction: any;
578
608
  keepSlotData: boolean;
579
609
  checkStrictly: boolean;
610
+ deepWatch: boolean;
580
611
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[], any[]>;
581
612
  export default BkTree;