refactor(vue): use deep copy to handle devtools attribues

This commit is contained in:
zoomchan-cxj
2022-09-08 14:09:52 +08:00
parent 2a1aaf42f6
commit cb408fa87c
@@ -31,6 +31,7 @@ import {
getApp,
trace,
warn,
deepCopy,
isFunction,
capitalizeFirstLetter,
convertImageLocalPath,
@@ -298,7 +299,7 @@ function parseViewComponent(targetNode, nativeNode, style) {
*/
function getTargetNodeAttributes(targetNode) {
try {
const targetNodeAttributes = JSON.parse(JSON.stringify(targetNode.attributes));
const targetNodeAttributes = deepCopy(targetNode.attributes);
const classInfo = Array.from(targetNode.classList || []).join(' ');
const attributes = {
id: targetNode.id,