diff --git a/packages/uni-components/dist/components.js b/packages/uni-components/dist/components.js index e0f4440c2f1078fcfac5db9893687b6e10757b04..12d854e151b44e85d987e9e46402d26728172abc 100644 --- a/packages/uni-components/dist/components.js +++ b/packages/uni-components/dist/components.js @@ -478,7 +478,7 @@ var Button = defineComponent({ return; } if (isLabelClick) { - rootRef.value.click(); + rootRef.value.event.click.handler(); } }; const _getClass = (t2) => { @@ -518,7 +518,7 @@ var Button = defineComponent({ return vnodes; }; return () => { - return createVNode("div", mergeProps({ + return createVNode("view", mergeProps({ "ref": rootRef, "class": ["ub", _getClass("")] }, extend({}, useHoverClass(props), { diff --git a/packages/uni-components/src/nvue/button/index.tsx b/packages/uni-components/src/nvue/button/index.tsx index ecfca1219ff193337ec9af3f194d607e33e6bd6c..a0e199427dc487f12aa492bd210b339a00d9aa61 100644 --- a/packages/uni-components/src/nvue/button/index.tsx +++ b/packages/uni-components/src/nvue/button/index.tsx @@ -211,7 +211,7 @@ export default defineComponent({ return } if (isLabelClick) { - rootRef.value!.click() + ;(rootRef.value as any).event.click.handler(e) } /* const formType = props.formType if (formType) { @@ -269,7 +269,7 @@ export default defineComponent({ return () => { return ( -
) : null} {...wrapSlots()} -
+ ) } },