Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【报Bug】代码里定义的变量里的数据在获取的时候被强制转换了 #5219

Open
PineSongCN opened this issue Nov 8, 2024 · 1 comment

Comments

@PineSongCN
Copy link

PineSongCN commented Nov 8, 2024

代码里定义的变量里的数据在获取的时候被强制转换了

源代码

export const test = {  
    mounted: {  
      type: 'JSFunction',  
      value: "function () {\n    console.log('did mount');\n  }",  
      mounted2: {  
        type: 'JSFunction',  
        value: "function () {\n    console.log('did mount');\n  }"  
      }  
    },  
    beforeMount: {  
      type: 'JSFunction',  
      value: "function () {\n    console.log('will unmount');\n  }"  
    },  
    beforeDestroy: {  
      type: 'JSFunction',  
      value: "function () {\n    console.log('will unmount');\n  }"  
    }  
};

获取到的结果

{  
    "mounted": {  
        "type": "JSFunction",  
        "value": "function () {\n    __f__('log','at pages/home/data-source.ts:54','did mount');\n  }"  
    },  
    "beforeMount": {  
        "type": "JSFunction",  
        "value": "function () {\n    __f__('log','at pages/home/data-source.ts:58','will unmount');\n  }"  
    },  
    "beforeDestroy": {  
        "type": "JSFunction",  
        "value": "function () {\n    __f__('log','at pages/home/data-source.ts:62','will unmount');\n  }"  
    }  
}

1730974719167

产品分类: uniapp/App

PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 13.7
HBuilderX类型: 正式
HBuilderX版本号: 4.32
手机系统: Android
手机系统版本号: Android 12
手机厂商: 模拟器
手机机型: MumuPro
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX

@PineSongCN
Copy link
Author

PineSongCN commented Nov 8, 2024

@Otto-J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant