From ba5cfb0cfb0172ac0873fc17d27af23092ead8d4 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);