KeystoneJS 复数选项在 AdminUI 中不起作用
KeystoneJS plural option not working in AdminUI
即使我在定义模型时在列表中设置复数选项,
在管理员 UI 中它没有显示,它一直显示默认尾随 's'。
我的模特:
var keystone = require('keystone');
var Types = keystone.Field.Types;
var Pollo = new keystone.List('Pollo', {
map:{ name: 'nome',},
autokey:{path:'slug', from: 'nome', unique: true},
plural: 'polli'
});
所以在管理员 UI 中我看到 "pollos" 而不是 "polli"
在您的 keystone.List('Pollo', { ... })
选项中,除了 plural
之外,您还需要添加 label
和 singular
选项。
即使我在定义模型时在列表中设置复数选项, 在管理员 UI 中它没有显示,它一直显示默认尾随 's'。
我的模特:
var keystone = require('keystone');
var Types = keystone.Field.Types;
var Pollo = new keystone.List('Pollo', {
map:{ name: 'nome',},
autokey:{path:'slug', from: 'nome', unique: true},
plural: 'polli'
});
所以在管理员 UI 中我看到 "pollos" 而不是 "polli"
在您的 keystone.List('Pollo', { ... })
选项中,除了 plural
之外,您还需要添加 label
和 singular
选项。