新人入行
新人入行
  • 发布:2024-07-23 14:50
  • 更新:2024-07-23 20:43
  • 阅读:113

对象包集合的数据结构无效?

分类:uni-app
我在 App.vue中定义了一个参数 放在  // 全局存储... globalData中的  

m_wuXingGPT: {  
        "1": [  
            {"name": "肺气过剩","on": false,"pos": 0},   
            {"name": "皮肤干燥","on": false,"pos": 0},   
            {"name": "肝胆失衡","on": false,"pos": 0},  
            ],  
        "2": [  
            {"name": "口苦舌燥","on": false,"pos": 1},   
            {"name": "目赤胀痛","on": false,"pos": 1},   
            {"name": "食欲不振","on": false,"pos": 1},  
            ],  
        "3": [  
            {"name": "血液粘稠","on": false,"pos": 2},   
            {"name": "尿频水肿","on": false,"pos": 2},   
            {"name": "失眠多梦","on": false,"pos": 2},  
            ],  
        "4": [  
            {"name": "舌红苔黄","on": false,"pos": 3},   
            {"name": "小便短赤","on": false,"pos": 3},   
            {"name": "痰黄黏稠","on": false,"pos": 3},  
            ],  
        "5": [  
            {"name": "消化不良","on": false,"pos": 4},   
            {"name": "脾虚慵懒","on": false,"pos": 4},   
            {"name": "肝气郁结","on": false,"pos": 4}]  
    },  
之后我在home页面中调用打印这个数据打印出来的只有 ‘m_wuXingGPT:  {1: [], 2: [], 3: [], 4: [], 5: []}’  

即使我直接在app.Vue页面中打印也是如上面这样,最开始这个数据是后端传过来的,在后端接收的集合里面也是可以看到有数据的,但是我给赋值给当前页面的属性都是只有一个{1: [], 2: [], 3: [], 4: [], 5: []}  

这是为什么?  
2024-07-23 14:50 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

你打印是看的哪里的,hb里面的可能有问题,以控制台为准

要回复问题请先登录注册