提交 45fe4016 编写于 作者: Neuromancer255's avatar Neuromancer255

快速分组组件计数逻辑调整

上级 e532d56c
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
position: absolute; position: absolute;
top: -5px; top: -5px;
left: 49px; left: 49px;
z-index: 9999; z-index: 10000;
min-width: 15px; min-width: 15px;
height: 15px; height: 15px;
text-align: center; text-align: center;
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
right: 0; right: 0;
width: 90%; width: 90%;
max-height: 0; max-height: 0;
transition: max-height 0.2s ease-in; transition: max-height 0.3s ease-in;
margin: auto; margin: auto;
background-color: white; background-color: white;
display: flex; display: flex;
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
> >
<ion-icon v-if=" item.iconcls && !Object.is(item.iconcls, '')" :name="item.iconcls"></ion-icon> <ion-icon v-if=" item.iconcls && !Object.is(item.iconcls, '')" :name="item.iconcls"></ion-icon>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" /> <img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span> <span v-if="item.selectChildLabel" class="app-quick-item-label">{{item.selectChildLabel}}</span>
<ion-icon v-if="item.children" name="caret-down-outline"></ion-icon> <span v-else class="app-quick-item-label">{{item.label}}</span>
<ion-icon v-if="item.children" name="caret-down-outline" style="margin-left:4px"></ion-icon>
</div> </div>
<ion-badge class="badge" v-if="isSelectedItem(item) && pageTotal !== 0 && !item.children">{{pageTotal}}</ion-badge> <ion-badge class="badge" v-if="isSelectedItem(item) && pageTotal !== 0 && !item.children">{{pageTotal}}</ion-badge>
<ion-badge class="badge" v-if="item.childSelected && pageTotal">{{pageTotal}}</ion-badge>
</div> </div>
</div> </div>
<div ref="child-list" :class="{'child-list':true,'open':subItems.length > 0}"> <div ref="child-list" :class="{'child-list':true,'open':subItems.length > 0}">
...@@ -22,7 +24,7 @@ ...@@ -22,7 +24,7 @@
<span>{{item.label}}</span> <span>{{item.label}}</span>
</span> </span>
<ion-badge class="badge" v-if="pageTotal !== 0 && item.selected">{{pageTotal}}</ion-badge> <ion-badge class="badge" v-if="pageTotal !== 0 && item.selected">{{pageTotal}}</ion-badge>
<ion-icon size="small" v-if="item.selected" style="margin-left:auto;color" name="checkmark-outline"></ion-icon> <ion-icon size="small" v-if="item.selected" style="margin-left:auto;color:green" name="checkmark-outline"></ion-icon>
</div> </div>
</div> </div>
<ion-backdrop style="height:100vh;z-index:-1" v-show="subItems.length > 0" visible="true" tappable="true" @ionBackdropTap="closeBackdrop"></ion-backdrop> <ion-backdrop style="height:100vh;z-index:-1" v-show="subItems.length > 0" visible="true" tappable="true" @ionBackdropTap="closeBackdrop"></ion-backdrop>
...@@ -42,7 +44,6 @@ import { ...@@ -42,7 +44,6 @@ import {
components: {}, components: {},
}) })
export default class AppQuickGroupTab extends Vue { export default class AppQuickGroupTab extends Vue {
/** /**
* 快速分组代码表 * 快速分组代码表
* *
...@@ -185,14 +186,16 @@ export default class AppQuickGroupTab extends Vue { ...@@ -185,14 +186,16 @@ export default class AppQuickGroupTab extends Vue {
this.items.forEach((item:any) => { this.items.forEach((item:any) => {
item.selected = false; item.selected = false;
item.childSelected = false; item.childSelected = false;
item.selectChildLabel = "";
}) })
$event.selected = true; $event.selected = true;
if ($event.pvalue) { if ($event.pvalue) {
this.items.forEach((item:any) => { this.items.forEach((item:any) => {
if (item.value === $event.pvalue) { if (item.value === $event.pvalue) {
item.childSelected = true; item.childSelected = true;
item.selectChildLabel = $event.label;
} }
}) })
} }
this.$emit("valuechange", $event); this.$emit("valuechange", $event);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册