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

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.10";
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,15 @@ 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',
3930
+ width: '100%',
3931
+ height: '100%'
3932
3932
  },
3933
- "class": referenceCls.value
3933
+ "class": [referenceCls.value, attrs["class"]]
3934
3934
  }, 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
3935
  "disabled": disableTeleport.value,
3936
3936
  "to": teleportTo.value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.1.0-dev-beta.8",
3
+ "version": "2.1.0-dev-beta.10",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",
@@ -135,6 +135,7 @@
135
135
  "js-calendar": "~1.2.3",
136
136
  "json-formatter-js": "~2.3.4",
137
137
  "lodash": "~4.17.21",
138
+ "sortablejs": "~1.15.7",
138
139
  "tinycolor2": "~1.6.0",
139
140
  "vue-types": "~4.1.1"
140
141
  }