问题描述
Sencha中使用的xtype和别名有什么区别?他们似乎都被用来作为不同地方的速记。
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.
据我所知,他们只是为了表演而设计。 别名
出现在 xtype
之前,他们创建 xtype
config,因为如果我们不需要解析字符串以获得像以前一样的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
或最常见的别名
Anyway, things like
xtype
, ptype
, ltype
or most common, alias
should be unified and clarified in next releases, said the dev team.
这篇关于xtype和别名有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!