1. 用sencha cmd生成應用程式模版
2. 建立login view元件
資料夾下,有預設的
main
資料夾,這個資料夾包含了檔案main.js,maincontroller.js,和
mainmodel.js
。
資料夾下建立乙個資料夾「
login
」,在「
login
」資料夾下,新建兩個檔案
login.js
和logincontroller.js。
4. 建立login視窗,檔案
的內容如下:
extend: 'ext.window.window',
xtype: 'login',
requires: [
'ext.form.panel'
controller: 'login',
bodypadding: 10,
title: 'login window',
closable: false,
autoshow: true,
items: '
flex: 0
iconcls: 'fa-th-list',
items: ['
title: 'groups',
iconcls: 'fa-users',
bind: '
title: 'settings',
iconcls: 'fa-cog',
bind: '
8. 增加main邏輯,
檔案如下:
alias: 'controller.main',
onitemselected: function (sender, record) {
ext.msg.confirm('confirm', 'are you sure?', 'onconfirm', this);
onconfirm: function (choice) {
if (choice === 'yes') {
onclickbutton: function () {
// remove the localstorage key/value
localstorage.removeitem('tutorialloggedin');
// remove main view
this.getview().destroy();
// add the login window
ext.create({
xtype: 'login'
extjs6 非同步樹
store定義 ext.define permissionstore proxy reader defaultrootid 是很重要的配置,用來初始化向後台傳遞的引數,即頁面啟動時向後台發起的查詢引數。nodeparam id 是定義引數名,後台 public jsonresult listperm...
使用sencha cmd操作ExtJS 6
sencha cmd是用來建立,構建extjs 程式的工具。您需要安裝好sencha cmd命令列工具。sencha cmd建立extjs的程式框架 方法一 建立extjs 6 專案 開啟命令列視窗,window上即cmd.exe如果沒有指定sdk,則需要進入sdk目錄後才能建立成功 方法二 建立e...
extjs6 入門 sencha cmd 新建專案
1.建立 workspace 大家看過 extjs6 入門學習 朋友一定都能建立屬於自己的extjs6的專案了。有沒有朋友想到乙個專案需要維護多個版本或多套extjs開發的專案?這是當然會有發生的。那麼我們這裡給大家帶來的 workspace 這個東西解決這個問題。那麼我們來建立乙個 workspa...