我有一个表示集合的strapi模型,由以下JSON指定:
{
"kind": "collectionType",
"collectionName": "orgs",
"info": {
"name": "Organization",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": false
},
"attributes": {
"backToTopButton": {
"type": "BackToTopButton",
"columnType": "object"
},
"relationNavigation": {
"type": "RelationNavigation",
"columnType": "object",
"entityUid": "communities",
"selectedIndex": 0,
"items": [
{
"relationEntityUid": "orgs",
"label": "Information",
"value": "Community",
"localKey": "communityId",
"foreignKey": "communityId",
"relationType": "OneToOne"
},
{
"relationEntityUid": "Connectorsetting",
"label": "",
"value": "Connectors",
"localKey": "communityId",
"foreignKey": "communityId",
"relationType": "OneToOne"
}
]
},
"yglId": {
"type": "number"
},
"name": {
"type": "string"
},
"segmentType": {
"type": "DropDown",
"columnType": "string",
"stretchType": "half",
"cssOverride": false,
"options": ["Strategic 1", "Strategic 2", "Strategic 3", "SBAM", "Self Serve"]
},
"reportingSuite": {
"type": "DropDown",
"columnType": "string",
"options": ["Strategic A", "Strategic B", "Strategic C", "Strategic D", "Strategic E", "Strategic F", "Strategic G", "Strategic H", "Strategic I", "Strategic J", "SBAM", "SBAM A", "SBAM B", "SBAM C"]
}
}
}
我必须有自定义标签,例如,对于属性-segmentType
,我希望能够编写"organization segment"
。
理想情况下,我正在寻找一种方法来重写这个类似于:
"segmentType": {
"type": "DropDown",
"columnType": "string",
"stretchType": "half",
"cssOverride": false,
"options": ["Strategic 1", "Strategic 2", "Strategic 3", "SBAM", "Self Serve"],
"label": "organization segment"
},
我找不到任何例子,如何做到这一点没有编码[插件],只使用JSON。
感谢您的帮助。
您可以通过View Configuration接口实现这一点。要进入该界面,只需进入Collection/Single类型,然后单击"Configure the view"按钮。参考以下截图
当您处于View Configuration界面时,单击要编辑Label的字段上的铅笔图标。参考以下截图