@v-c/trigger 1.0.11 → 1.0.12-beta.1

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { useResizeObserver } from "@v-c/resize-observer";
13
13
  import { classNames } from "@v-c/util";
14
14
  import { getShadowRoot } from "@v-c/util/dist/Dom/shadow";
15
15
  import { filterEmpty } from "@v-c/util/dist/props-util";
16
- import { resolveToElement } from "@v-c/util/dist/vnode";
16
+ import { cloneElement, resolveToElement } from "@v-c/util/dist/vnode";
17
17
  var defaults = {
18
18
  prefixCls: "vc-trigger-popup",
19
19
  action: "hover",
@@ -326,13 +326,13 @@ function generateTrigger(PortalComponent = Portal) {
326
326
  x: arrowX.value,
327
327
  y: arrowY.value
328
328
  };
329
- const triggerNode = createVNode(child, {
329
+ const triggerNode = cloneElement(child, {
330
330
  ...mergedChildrenProps,
331
331
  ...passedProps,
332
332
  ref: setTargetRef
333
- });
333
+ }, true, true);
334
334
  const { unique, prefixCls, popup, popupClassName, popupStyle, zIndex, fresh, onPopupClick, mask, popupMotion, maskMotion, forceRender, getPopupContainer, stretch, mobile } = props;
335
- return createVNode(Fragment, null, [triggerNode, rendedRef.value && targetEle.value && (!uniqueContext || !unique) && createVNode(TriggerContextProvider, context.value, { default: () => [createVNode(Popup_default, {
335
+ return createVNode(Fragment, null, [triggerNode, rendedRef.value && (!uniqueContext || !unique) && createVNode(TriggerContextProvider, context.value, { default: () => [createVNode(Popup_default, {
336
336
  "portal": PortalComponent,
337
337
  "ref": setPopupRef,
338
338
  "prefixCls": prefixCls,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/trigger",
3
3
  "type": "module",
4
- "version": "1.0.11",
4
+ "version": "1.0.12-beta.1",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@v-c/portal": "^1.0.7",
33
33
  "@v-c/resize-observer": "^1.0.8",
34
- "@v-c/util": "^1.0.13"
34
+ "@v-c/util": "^1.0.17"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "vite build",