Skip to content

Commit

Permalink
feat(web): fix dymamic load for web render
Browse files Browse the repository at this point in the history
  • Loading branch information
zealotchen0 committed Sep 19, 2024
1 parent dd97912 commit da6a8b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions driver/js/packages/hippy-vue-next/src/patch-prop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,22 @@
/**
* 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';

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<HippyNode, HippyElement>[] | 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da6a8b9

Please sign in to comment.