From cf6c1abcb0cea549cdd8abc03e93e58c33891fac Mon Sep 17 00:00:00 2001 From: zealotchen Date: Fri, 18 Oct 2024 17:25:01 +0800 Subject: [PATCH] feat(devtools): fix devtools element not show --- driver/js/packages/hippy-vue/src/native/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/driver/js/packages/hippy-vue/src/native/index.ts b/driver/js/packages/hippy-vue/src/native/index.ts index 3f9a44943b1..921359b84ad 100644 --- a/driver/js/packages/hippy-vue/src/native/index.ts +++ b/driver/js/packages/hippy-vue/src/native/index.ts @@ -379,6 +379,13 @@ function getTargetNodeAttributes(targetNode: NeedToTyped) { }; delete attributes.text; delete attributes.value; + + Object.keys(attributes).forEach((key) => { + if (key !== 'id' && key !== 'hippyNodeId' && key !== 'class') { + // value may big int that iOS do not support, should delete + delete attributes[key]; + } + }); return attributes; } catch (e) { warn('getTargetNodeAttributes error:', e);