diff --git a/packages/uni-app-plus/src/view/framework/dom/components/UniComponent.ts b/packages/uni-app-plus/src/view/framework/dom/components/UniComponent.ts index b025d28ec2b9e5cd8dbaa24e33d810cfad25d150..bf71c10e54135f20f0b88e4231c2b276d822e21c 100644 --- a/packages/uni-app-plus/src/view/framework/dom/components/UniComponent.ts +++ b/packages/uni-app-plus/src/view/framework/dom/components/UniComponent.ts @@ -19,7 +19,8 @@ import { } from '@dcloudio/uni-shared' import { UniNode } from '../elements/UniNode' import { createInvoker, createWxsEventInvoker } from '../modules/events' -import { type UniCustomElement, createWrapper } from '.' +import type { UniCustomElement } from '.' +import { createWrapper } from '../createWrapper' import { $, removeElement } from '../store' import { JOB_PRIORITY_REBUILD, diff --git a/packages/uni-app-plus/src/view/framework/dom/components/index.ts b/packages/uni-app-plus/src/view/framework/dom/components/index.ts index 8ff6ed9836ceeb09aea778a551e9510779c2242f..c71fe785209add6fa917b03bd242205756e39d23 100644 --- a/packages/uni-app-plus/src/view/framework/dom/components/index.ts +++ b/packages/uni-app-plus/src/view/framework/dom/components/index.ts @@ -1,10 +1,5 @@ import type { ComponentDescriptorVm } from '@dcloudio/uni-core' -import { - type ComponentInternalInstance, - type ComponentPublicInstance, - type defineComponent, - h, -} from 'vue' +import type { ComponentInternalInstance, ComponentPublicInstance } from 'vue' import { UniComment } from '../elements/UniComment' import { UniTextElement } from '../elements/UniTextElement' import { UniTextNode } from '../elements/UniTextNode' @@ -111,12 +106,3 @@ export const BuiltInComponents = { VIDEO: UniVideo, 'WEB-VIEW': UniWebView, } as const - -export type WrapperComponent = ReturnType - -export function createWrapper( - component: ReturnType, - props: Record -) { - return () => h(component, props) -} diff --git a/packages/uni-app-plus/src/view/framework/dom/createWrapper.ts b/packages/uni-app-plus/src/view/framework/dom/createWrapper.ts new file mode 100644 index 0000000000000000000000000000000000000000..e50330836e9640ef869faeffbdafff2f94908a21 --- /dev/null +++ b/packages/uni-app-plus/src/view/framework/dom/createWrapper.ts @@ -0,0 +1,10 @@ +import { type defineComponent, h } from 'vue' + +export type WrapperComponent = ReturnType + +export function createWrapper( + component: ReturnType, + props: Record +) { + return () => h(component, props) +} diff --git a/packages/uni-components/src/vue/image/index.tsx b/packages/uni-components/src/vue/image/index.tsx index 03b352ae2ee63e0e10f664f3f71db4ce7e76c65e..d3f0be179edc9ba795c2f2ca4e723a2cbe612aa1 100644 --- a/packages/uni-components/src/vue/image/index.tsx +++ b/packages/uni-components/src/vue/image/index.tsx @@ -1,17 +1,17 @@ import { - ref, - Ref, - watch, + type ExtractPropTypes, + type Ref, computed, - reactive, - onMounted, onBeforeUnmount, - ExtractPropTypes, + onMounted, + reactive, + ref, + watch, } from 'vue' import { getRealPath } from '@dcloudio/uni-platform' import { defineBuiltInComponent } from '../../helpers/component' import { UniElement } from '../../helpers/UniElement' -import { CustomEventTrigger, useCustomEvent } from '../../helpers/useEvent' +import { type CustomEventTrigger, useCustomEvent } from '../../helpers/useEvent' import ResizeSensor from '../resize-sensor/index' const props = { @@ -100,7 +100,6 @@ export default /*#__PURE__*/ defineBuiltInComponent({
{FIX_MODES[props.mode as keyof typeof FIX_MODES] ? ( - // @ts-ignore ) : (