我正在插入这样的观点 this.up('navView').push({xtype: 'myView'})
如何删除位于导航堆栈中间的特定 View ?
至少我应该摆脱这个警告
[WARN][Ext.Component#constructor] Registering a component with a id (listxyz) which has already been used. Please ensure the existing component has been destroyed (Ext.Component#destroy().
最佳答案
在推送 View 检查天气之前, View 已经存在,如果它已经存在,则将其销毁,因此您不会收到这些警告并且可以轻松导航。
if(Ext.getCmp('myView')){
Ext.getCmp('myView').destroy();
}
//Push myView
where myView should be the id of that view declared in config of that view
config: {
id:'myView',
}
关于extjs - 如何从sencha touch中的导航堆栈中删除特定 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15873514/