@mingto/mt-ui 1.1.41 → 1.1.42

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.es.js CHANGED
@@ -9702,10 +9702,13 @@ var content_default$2 = /* @__PURE__ */ defineComponent({
9702
9702
  setup(__props, { emit: __emit }) {
9703
9703
  const props = __props;
9704
9704
  const emits = __emit;
9705
- const { contentVisible, onShow, onHide } = inject(POPPER_INJECTION_KEY$1);
9705
+ const { contentRef, contentVisible, onShow, onHide } = inject(POPPER_INJECTION_KEY$1);
9706
9706
  const ns = useNamespace("popover");
9707
9707
  const { nextZIndex } = useZIndex(void 0, "popover");
9708
9708
  const contentZIndex = ref(props.zIndex ?? nextZIndex());
9709
+ onBeforeUnmount(() => {
9710
+ contentRef.value = null;
9711
+ });
9709
9712
  const contentStyles = computed(() => {
9710
9713
  const styles = {};
9711
9714
  styles.zIndex = contentZIndex.value;
@@ -9755,6 +9758,8 @@ var content_default$2 = /* @__PURE__ */ defineComponent({
9755
9758
  onBeforeLeave
9756
9759
  }, {
9757
9760
  default: withCtx(() => [withDirectives(createElementVNode("div", {
9761
+ ref_key: "contentRef",
9762
+ ref: contentRef,
9758
9763
  style: normalizeStyle(contentStyles.value),
9759
9764
  class: normalizeClass(popoverContentClass.value),
9760
9765
  onMouseenter: onContentEnter,
package/dist/index.umd.js CHANGED
@@ -9761,10 +9761,13 @@
9761
9761
  setup(__props, { emit: __emit }) {
9762
9762
  const props = __props;
9763
9763
  const emits = __emit;
9764
- const { contentVisible, onShow, onHide } = (0, vue.inject)(POPPER_INJECTION_KEY$1);
9764
+ const { contentRef, contentVisible, onShow, onHide } = (0, vue.inject)(POPPER_INJECTION_KEY$1);
9765
9765
  const ns = useNamespace("popover");
9766
9766
  const { nextZIndex } = useZIndex(void 0, "popover");
9767
9767
  const contentZIndex = (0, vue.ref)(props.zIndex ?? nextZIndex());
9768
+ (0, vue.onBeforeUnmount)(() => {
9769
+ contentRef.value = null;
9770
+ });
9768
9771
  const contentStyles = (0, vue.computed)(() => {
9769
9772
  const styles = {};
9770
9773
  styles.zIndex = contentZIndex.value;
@@ -9814,6 +9817,8 @@
9814
9817
  onBeforeLeave
9815
9818
  }, {
9816
9819
  default: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createElementVNode)("div", {
9820
+ ref_key: "contentRef",
9821
+ ref: contentRef,
9817
9822
  style: (0, vue.normalizeStyle)(contentStyles.value),
9818
9823
  class: (0, vue.normalizeClass)(popoverContentClass.value),
9819
9824
  onMouseenter: onContentEnter,
@@ -3,7 +3,9 @@ declare function __VLS_template(): {
3
3
  slots: {
4
4
  default?(_: {}): any;
5
5
  };
6
- refs: {};
6
+ refs: {
7
+ contentRef: HTMLDivElement;
8
+ };
7
9
  rootEl: any;
8
10
  };
9
11
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -202,7 +204,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
202
204
  enterable: boolean;
203
205
  teleported: boolean;
204
206
  controlled: boolean;
205
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
207
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
208
+ contentRef: HTMLDivElement;
209
+ }, any>;
206
210
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
207
211
  export default _default;
208
212
  type __VLS_WithTemplateSlots<T, S> = T & {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mingto/mt-ui",
3
3
  "type": "module",
4
- "version": "1.1.41",
4
+ "version": "1.1.42",
5
5
  "description": "UI组件库",
6
6
  "publishConfig": {
7
7
  "access": "public"