Open baotnq opened 8 years ago
implemented in 4948f7f1595063d8d951b062151a5ec15977e020
mới chỉ cho Text với Number
bị lỗi với Selection phần Text, lúc trước thì OK
em mới test nó bt mà anh, anh quang cái *.config.json của layout bi lỗi lên đây đi
test với standard
[
{
"name": "title",
"displayName": "title",
"type": "Text",
"validations": [],
"viewOnly": false,
"required": false
},
{
"name": "slug",
"displayName": "slug",
"type": "Text",
"validations": [],
"viewOnly": false,
"required": false
},
{
"name": "header",
"displayName": "header",
"type": "Text",
"validations": [],
"viewOnly": false,
"required": false
},
{
"name": "description",
"displayName": "description",
"type": "Text",
"validations": [],
"viewOnly": false,
"required": false
},
{
"name": "layout",
"displayName": "layout",
"type": "Text",
"validations": [],
"viewOnly": true,
"required": false
},
{
"name": "permalink",
"displayName": "permalink",
"type": "Boolean",
"validations": [],
"required": false
}
]
ah cái type Selection là cũ, quên xóa đi sau khi add DisplayType DropDown, removed in master
Một số dữ liệu trong Content users sẽ lựa chọn 1 giá trị có sẵn trong danh sách có sẵn, gọi chung là Selection type
Danh sách giá trị có sẵn để users lựa chọn sẽ định nghĩa theo json format
Trong trường hợp type khác, như text, object, array, chúng ta sẽ gọi là default value
Chúng ta sẽ bổ sung thêm type dữ liệu này vào trong phần Config, có thể thực hiện như hình đính kèm