xtype 和别名有什么区别? [英] What is the difference between xtype and alias?
问题描述
Sencha 中使用的 xtype 和 alias 有什么区别?它们似乎在不同的地方都被用作速记.
What is the difference between xtype and alias used in Sencha? They're both seem to be used as shorthand in different places.
推荐答案
这真的很混乱,连 Sencha Touch 开发团队也没有统一意见.
This is really confusing, even Sencha Touch developers team does not have a common opinion.
据我所知,他们设计这个只是为了性能.Alias
比 xtype
出现得更早,它们创建了 xtype
配置,因为如果我们不必像以前一样解析字符串来获取 xtype,它是更快.
As far as I know, they design this merely for performance. Alias
appears earlier than xtype
, they create xtype
config because if we don't have to parse the string to get the xtype like before, it's faster.
无论如何,像xtype
、ptype
、ltype
或者最常见的alias
应该统一和澄清开发团队表示,在下一个版本中.
Anyway, things like xtype
, ptype
, ltype
or most common, alias
should be unified and clarified in next releases, said the dev team.
这篇关于xtype 和别名有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!