mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-10 09:20:25 +08:00
阶段性提交
This commit is contained in:
23
web/public/js/components/common/inner-menu-item.js
Normal file
23
web/public/js/components/common/inner-menu-item.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 菜单项
|
||||
*/
|
||||
Vue.component("inner-menu-item", {
|
||||
props: ["href", "active", "code"],
|
||||
data: function () {
|
||||
var active = this.active;
|
||||
if (typeof(active) =="undefined") {
|
||||
var itemCode = "";
|
||||
if (typeof (window.TEA.ACTION.data.firstMenuItem) != "undefined") {
|
||||
itemCode = window.TEA.ACTION.data.firstMenuItem;
|
||||
}
|
||||
active = (itemCode == this.code);
|
||||
}
|
||||
return {
|
||||
vHref: (this.href == null) ? "" : this.href,
|
||||
vActive: active
|
||||
};
|
||||
},
|
||||
template: '\
|
||||
<a :href="vHref" class="item right" style="color:#4183c4" :class="{active:vActive}">[<slot></slot>]</a> \
|
||||
'
|
||||
});
|
||||
Reference in New Issue
Block a user