提交 0004d51b 编写于 作者: KK's avatar KK

更新组件

上级 37236e96
// this is lesss // this is lesss
.srf_empty_class { .srf_empty_class {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.app-mob-menu-default-view{ .app-mob-menu-default-view{
ion-tab-bar{ ion-tab-bar{
border-width: 0; border-width: 0;
} }
ion-tab-button{ ion-tab-button{
border-right: 1px solid #f6f6f6; border-right: 1px solid #f6f6f6;
&:nth-last-child(1){ &:nth-last-child(1){
border-right: none; border-right: none;
}
} }
}
.menu_img{
width: 20px;
height: 30px;
}
} }
\ No newline at end of file
...@@ -13,7 +13,15 @@ ...@@ -13,7 +13,15 @@
<template v-for="item in items"> <template v-for="item in items">
<template v-if="!item.hidden"> <template v-if="!item.hidden">
<ion-tab-button :tab="item.name" :key="item.id" :selected="item.id == activeId" @click="active(item)"> <ion-tab-button :tab="item.name" :key="item.id" :selected="item.id == activeId" @click="active(item)">
<ion-icon :name=" item.iconcls ? item.iconcls : 'home' "></ion-icon> <template v-if="item.iconcls">
<ion-icon :name=" item.iconcls"></ion-icon>
</template>
<template v-else-if="item.icon != ''">
<img class="menu_img" :src="getimgUrl(item.icon,item.id == activeId)" />
</template>
<template v-else>
<ion-icon name="home"></ion-icon>
</template>
<ion-label v-if="item.appfunctag != 'settings'">{{$t(`app.menus.${menuName}.${item.name}`)}}</ion-label> <ion-label v-if="item.appfunctag != 'settings'">{{$t(`app.menus.${menuName}.${item.name}`)}}</ion-label>
<ion-label v-else>{{item.text}}</ion-label> <ion-label v-else>{{item.text}}</ion-label>
<ion-badge color="danger" v-if="counterServide && counterServide.counterData && counterServide.counterData[item.counterid]"><ion-label>{{counterServide.counterData[item.counterid]}}</ion-label></ion-badge> <ion-badge color="danger" v-if="counterServide && counterServide.counterData && counterServide.counterData[item.counterid]"><ion-label>{{counterServide.counterData[item.counterid]}}</ion-label></ion-badge>
...@@ -51,6 +59,29 @@ export default class AppMobMenuDefaultView extends Vue { ...@@ -51,6 +59,29 @@ export default class AppMobMenuDefaultView extends Vue {
@Model("change") readonly itemValue?: any; @Model("change") readonly itemValue?: any;
/**
* 获取图片地址
*
* @type {*}
* @memberof AppMobMenuDefaultView
*/
public getimgUrl(url:string,isActive:boolean){
if(!isActive){
return url;
}
const arr = url.split('.');
let TempUrl = '';
arr.forEach((item:any,index)=>{
if(index == arr.length -1){
TempUrl =TempUrl + '-active.' +item;
}else{
TempUrl =TempUrl + item;
}
})
return TempUrl;
}
/** /**
* 获取值 * 获取值
* *
...@@ -144,7 +175,6 @@ export default class AppMobMenuDefaultView extends Vue { ...@@ -144,7 +175,6 @@ export default class AppMobMenuDefaultView extends Vue {
if(this.useDefaultMenu){ if(this.useDefaultMenu){
this.items.push(this.defaultMenu); this.items.push(this.defaultMenu);
} }
let count = 0;
this.items.forEach((item:any,index:number) => { this.items.forEach((item:any,index:number) => {
let model = this.menuModels.find((model:any) => Object.is(model.appfunctag, item.appfunctag)); let model = this.menuModels.find((model:any) => Object.is(model.appfunctag, item.appfunctag));
if (model) { if (model) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册