From da6a8b9387c64933111eeded2bdc0d8b267c43dd Mon Sep 17 00:00:00 2001 From: zealotchen Date: Thu, 19 Sep 2024 17:16:15 +0800 Subject: [PATCH] feat(web): fix dymamic load for web render --- driver/js/packages/hippy-vue-next/src/patch-prop.ts | 9 +++------ .../packages/hippy-web-renderer/src/env/dynamic-load.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/driver/js/packages/hippy-vue-next/src/patch-prop.ts b/driver/js/packages/hippy-vue-next/src/patch-prop.ts index f864b739227..91379ab1ff1 100644 --- a/driver/js/packages/hippy-vue-next/src/patch-prop.ts +++ b/driver/js/packages/hippy-vue-next/src/patch-prop.ts @@ -21,7 +21,7 @@ /** * Implement the patch props method required for Vue3 VNode mount */ -import type { ComponentInternalInstance, VNode, ElementNamespace } from '@vue/runtime-core'; +import type { ComponentInternalInstance, ElementNamespace } from '@vue/runtime-core'; import { isOn } from '@vue/shared'; import type { NeedToTyped } from './types'; @@ -29,17 +29,14 @@ import { patchAttr } from './modules/attrs'; import { patchClass } from './modules/class'; import { patchEvent } from './modules/events'; import { patchStyle } from './modules/style'; -import type { HippyElement } from './runtime/element/hippy-element'; -import type { HippyNode } from './runtime/node/hippy-node'; export function patchProp( el: NeedToTyped, key: string, prevValue: NeedToTyped, nextValue: NeedToTyped, - namespace: ElementNamespace, - prevChildren: VNode[] | undefined, - parentComponent: ComponentInternalInstance | null, + namespace?: ElementNamespace, + parentComponent?: ComponentInternalInstance | null, ): void { // It should be noted that the values contained in prop here will have strings, numbers, arrays, objects, etc. switch (key) { diff --git a/driver/js/packages/hippy-web-renderer/src/env/dynamic-load.ts b/driver/js/packages/hippy-web-renderer/src/env/dynamic-load.ts index 193ca3299d4..6691a23b424 100644 --- a/driver/js/packages/hippy-web-renderer/src/env/dynamic-load.ts +++ b/driver/js/packages/hippy-web-renderer/src/env/dynamic-load.ts @@ -18,7 +18,7 @@ * limitations under the License. */ -export const dynamicLoad = (path: string, callback: Function): void => { +export const dynamicLoad = (path: string, encode: string, callback: Function): void => { const script = document.createElement('script'); script.async = true; script.setAttribute('src', path);