myforr
myforr
  • 发布:2022-10-16 12:19
  • 更新:2022-10-16 12:19
  • 阅读:157

mongodb表结构设置后,schema2code生成的标签循环不了

分类:uniCloud

设置的表结构

"tags": {  
            "bsonType": "array",  
            "arrayType": "string",  
            "description": "标签ID", //  
            "title": "标签",  
            // "foreignKey": "app_static_tags._id",  
            "componentForShow": {  
                "name": "uni-tag"    
            },  
            "componentForEdit": {    
                "name": "uni-data-checkbox"    
            },  
            "multiple": true,  
            "maxLength": 20,  
            "foreignKey": "app_static_tags._id",  
            "enum": {  
                "collection": "app_static_tags",  
                "orderby": "first_letter desc",  
                "field": "_id as value, name as text"  
            }  
        }

生成后

<view>  
          <text>标签</text>  
          <uni-tag :value="data.tags"></uni-tag>  
</view>
2022-10-16 12:19 负责人:无 分享
已邀请:

要回复问题请先登录注册