Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Ext.form.field.Number,我可以在其中插入一个数字或使用微调器来选择一个。
如何格式化此值以在 Ext.form.field.Number 字段中显示?
假设我想在您向上或向下旋转时显示:
1st 2nd 3rd ...
或者
one two three ...
我相信,Extjs 仅支持日期的序数
请参考这里
您可以使用此功能来实现
function getGetOrdinal(n) { var s=["th","st","nd","rd"], v=n%100; return n+(s[(v-20)%10]||s[v]||s[0]); }