【发布时间】:2020-02-24 12:29:57
【问题描述】:
我尝试使用 ext js 制作现代桌面 Web 应用程序。应用程序的主视图有 4 个子视图:菜单、页眉、页脚和中心视图。我想在显示下面的登录视图时隐藏它们。但我不知道该使用哪个技巧。
Ext.define('App.view.auth.Login', {
extend: 'Ext.Container',
xtype: 'authlogin',
controller: 'authlogin',
cls: 'auth-login',
layout: {
type: 'vbox',
align: 'center',
pack: 'center'
},
items: [{
cls: 'auth-header',
html:
'<span class="logo x-fa fa-circle-o-notch"></span>'+
'<div class="title">Coworkee</div>'+
'<div class="caption">Employee directory</div>'
}, {
xtype: 'formpanel',
reference: 'form',
layout: 'vbox',
ui: 'auth',
items: [{
xtype: 'textfield',
name: 'username',
placeholder: 'Username',
required: true
}, {
xtype: 'passwordfield',
name: 'password',
placeholder: 'Password',
required: true
}, {
xtype: 'button',
text: 'LOG IN',
iconAlign: 'right',
iconCls: 'x-fa fa-angle-right',
handler: 'onLoginTap',
ui: 'action'
}]
}, {
cls: 'auth-footer',
html:
'<div>Ext JS example</div>'+
'<a href="http://www.sencha.com" target="_blank">'+
'<span class="logo ext ext-sencha"></span>'+
'<span class="label">Sencha</span>'+
'</a>'
}]
});
【问题讨论】:
-
与其隐藏您可能不需要的所有内容,您可能会对路由系统感兴趣。(docs.sencha.com/extjs/6.5.0/guides/application_architecture/…)
标签: authentication extjs show-hide