From 20f3e66eef15fb1e6089a37b1e41b9be16fa8622 Mon Sep 17 00:00:00 2001 From: zealotchen Date: Tue, 27 Feb 2024 20:32:27 +0800 Subject: [PATCH] fix(vue3): delete source prop for img --- .../src/runtime/element/hippy-element.ts | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/driver/js/packages/hippy-vue-next/src/runtime/element/hippy-element.ts b/driver/js/packages/hippy-vue-next/src/runtime/element/hippy-element.ts index 276fd188a83..bf915508bf3 100644 --- a/driver/js/packages/hippy-vue-next/src/runtime/element/hippy-element.ts +++ b/driver/js/packages/hippy-vue-next/src/runtime/element/hippy-element.ts @@ -332,7 +332,7 @@ export class HippyElement extends HippyNode { * @param child - child node * @param isHydrate - is hydrate or not */ - public appendChild(child: HippyNode, isHydrate: boolean = false): void { + public appendChild(child: HippyNode, isHydrate = false): void { // If the node type is text node, call setText method to set the text property if (child instanceof HippyText) { this.setText(child.text, { notToNative: true }); @@ -1024,26 +1024,6 @@ export class HippyElement extends HippyNode { return style; } - /** - * When generating props for Native Node, some additional logic needs to be hacked - * - * @param rawProps - original props - */ - private hackNativeProps(rawProps: NativeNodeProps) { - const props = rawProps; - - // solve the problem of src props of iOS image, which should be repaired by native - if (this.tagName === 'img' && Native.isIOS()) { - props.source = [ - { - uri: props.src, - }, - ]; - - props.src = undefined; - } - } - /** * get the props of the Native node, the properties include the properties of the node and * the default properties of the component to which the node belongs @@ -1113,9 +1093,6 @@ export class HippyElement extends HippyNode { }); } - // Finally handle the hack logic - this.hackNativeProps(props); - return props; }