這裏的是我做過什麼:
創建一個新的應用程序使用下面的命令
sencha -sdk <path to ext 6.0.2> generate app -ext MyApp MyTestApp
cd MyTestApp
sencha generate theme --extend theme-classic my-classic-theme2
在packages/local/my-classic-theme2/sass/src
的內部創建了文件夾panel
,並在該文件夾內創建了一個文件Panel.scss
。
編輯該文件並粘貼您的代碼是:
@include extjs-panel-ui(
$ui: 'highlight-framed',
$ui-header-background-color: red,
$ui-border-color: red,
$ui-header-border-color: red,
$ui-body-border-color: red,
$ui-border-width: 5px,
$ui-border-radius: 5px,
$ui-header-color: white
);
編輯的classic/src/view/main/Main.js
文件,並替換的項目與此塊:
items: [{
title: 'Home',
iconCls: 'fa-home',
// The following grid shares a store with the classic version's grid as well!
items: [{
xtype: 'mainlist'
}]
}, {
title: 'Users',
iconCls: 'fa-user',
items : [{
xtype: 'panel',
frame: true,
ui: 'highlight',
title: 'Testing my highlight panel',
items: [{
xtype: 'textfield',
fieldLabel: 'Foo',
value: 'Bar'
}]
}]
}]
最後編輯app.json
並確保我"theme"
是指向my-classic-theme2
然sencha app watch
並去了http://localhost:1841
我的用戶選項卡以紅色標題顯示面板。
肯定做了些什麼......面板標題變小了,但一切仍然是默認的藍色。即使我說紅色。有原因嗎? (我把上面的mixin) – solarissf