@mingto/mt-ui 1.1.40 → 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
@@ -7120,22 +7120,19 @@ var MtImage = withInstall$1(/* @__PURE__ */ defineComponent({
7120
7120
  class: normalizeClass(unref(ns).e("img")),
7121
7121
  style: normalizeStyle({
7122
7122
  objectFit: props.fit,
7123
- objectPosition: props.position || void 0
7123
+ objectPosition: props.position
7124
7124
  }),
7125
7125
  draggable: props.draggable,
7126
7126
  onLoad: handleLoad,
7127
7127
  onError: handleError
7128
7128
  }, null, 46, _hoisted_1$19)) : createCommentVNode("", true),
7129
- renderSlot(_ctx.$slots, "error", {}, () => [hasLoadError.value ? (openBlock(), createElementBlock("div", {
7130
- key: 0,
7131
- class: normalizeClass(unref(ns).e("error"))
7132
- }, [createVNode(unref(MtIcon), {
7129
+ hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 1 }, () => [createElementVNode("div", { class: normalizeClass(unref(ns).e("error")) }, [createVNode(unref(MtIcon), {
7133
7130
  name: "icon-a-weitupian1",
7134
7131
  size: "40",
7135
7132
  color: "#86909c"
7136
- })], 2)) : createCommentVNode("", true)]),
7133
+ })], 2)]) : createCommentVNode("", true),
7137
7134
  isLoading.value ? (openBlock(), createElementBlock("div", {
7138
- key: 1,
7135
+ key: 2,
7139
7136
  class: normalizeClass(unref(ns).e("loading"))
7140
7137
  }, [createVNode(unref(MtLoading))], 2)) : createCommentVNode("", true)
7141
7138
  ], 6);
@@ -9705,10 +9702,13 @@ var content_default$2 = /* @__PURE__ */ defineComponent({
9705
9702
  setup(__props, { emit: __emit }) {
9706
9703
  const props = __props;
9707
9704
  const emits = __emit;
9708
- const { contentVisible, onShow, onHide } = inject(POPPER_INJECTION_KEY$1);
9705
+ const { contentRef, contentVisible, onShow, onHide } = inject(POPPER_INJECTION_KEY$1);
9709
9706
  const ns = useNamespace("popover");
9710
9707
  const { nextZIndex } = useZIndex(void 0, "popover");
9711
9708
  const contentZIndex = ref(props.zIndex ?? nextZIndex());
9709
+ onBeforeUnmount(() => {
9710
+ contentRef.value = null;
9711
+ });
9712
9712
  const contentStyles = computed(() => {
9713
9713
  const styles = {};
9714
9714
  styles.zIndex = contentZIndex.value;
@@ -9758,6 +9758,8 @@ var content_default$2 = /* @__PURE__ */ defineComponent({
9758
9758
  onBeforeLeave
9759
9759
  }, {
9760
9760
  default: withCtx(() => [withDirectives(createElementVNode("div", {
9761
+ ref_key: "contentRef",
9762
+ ref: contentRef,
9761
9763
  style: normalizeStyle(contentStyles.value),
9762
9764
  class: normalizeClass(popoverContentClass.value),
9763
9765
  onMouseenter: onContentEnter,
package/dist/index.umd.js CHANGED
@@ -7151,22 +7151,19 @@
7151
7151
  class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("img")),
7152
7152
  style: (0, vue.normalizeStyle)({
7153
7153
  objectFit: props.fit,
7154
- objectPosition: props.position || void 0
7154
+ objectPosition: props.position
7155
7155
  }),
7156
7156
  draggable: props.draggable,
7157
7157
  onLoad: handleLoad,
7158
7158
  onError: handleError
7159
7159
  }, null, 46, _hoisted_1$19)) : (0, vue.createCommentVNode)("", true),
7160
- (0, vue.renderSlot)(_ctx.$slots, "error", {}, () => [hasLoadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
7161
- key: 0,
7162
- class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("error"))
7163
- }, [(0, vue.createVNode)((0, vue.unref)(MtIcon), {
7160
+ hasLoadError.value ? (0, vue.renderSlot)(_ctx.$slots, "error", { key: 1 }, () => [(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("error")) }, [(0, vue.createVNode)((0, vue.unref)(MtIcon), {
7164
7161
  name: "icon-a-weitupian1",
7165
7162
  size: "40",
7166
7163
  color: "#86909c"
7167
- })], 2)) : (0, vue.createCommentVNode)("", true)]),
7164
+ })], 2)]) : (0, vue.createCommentVNode)("", true),
7168
7165
  isLoading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
7169
- key: 1,
7166
+ key: 2,
7170
7167
  class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("loading"))
7171
7168
  }, [(0, vue.createVNode)((0, vue.unref)(MtLoading))], 2)) : (0, vue.createCommentVNode)("", true)
7172
7169
  ], 6);
@@ -9764,10 +9761,13 @@
9764
9761
  setup(__props, { emit: __emit }) {
9765
9762
  const props = __props;
9766
9763
  const emits = __emit;
9767
- const { contentVisible, onShow, onHide } = (0, vue.inject)(POPPER_INJECTION_KEY$1);
9764
+ const { contentRef, contentVisible, onShow, onHide } = (0, vue.inject)(POPPER_INJECTION_KEY$1);
9768
9765
  const ns = useNamespace("popover");
9769
9766
  const { nextZIndex } = useZIndex(void 0, "popover");
9770
9767
  const contentZIndex = (0, vue.ref)(props.zIndex ?? nextZIndex());
9768
+ (0, vue.onBeforeUnmount)(() => {
9769
+ contentRef.value = null;
9770
+ });
9771
9771
  const contentStyles = (0, vue.computed)(() => {
9772
9772
  const styles = {};
9773
9773
  styles.zIndex = contentZIndex.value;
@@ -9817,6 +9817,8 @@
9817
9817
  onBeforeLeave
9818
9818
  }, {
9819
9819
  default: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createElementVNode)("div", {
9820
+ ref_key: "contentRef",
9821
+ ref: contentRef,
9820
9822
  style: (0, vue.normalizeStyle)(contentStyles.value),
9821
9823
  class: (0, vue.normalizeClass)(popoverContentClass.value),
9822
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.40",
4
+ "version": "1.1.42",
5
5
  "description": "UI组件库",
6
6
  "publishConfig": {
7
7
  "access": "public"