Skip to content

Commit

Permalink
itemicon supports hidden status
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Jul 8, 2023
1 parent dc7c0e6 commit d013f67
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/components/desktop/ItemIcon.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
<template>
<i class="item-icon" :class="icon" :style="style">
<i class="item-icon" :class="icon" :style="style" v-if="!hiddenStatus">
<slot></slot>
</i>
<v-badge class="right-bottom-icon" color="secondary"
location="bottom right" offset-y="2" :icon="icons.hide"
v-if="hiddenStatus">
<i class="item-icon" :class="icon" :style="style">
<slot></slot>
</i>
</v-badge>
</template>

<script>
import iconConstatns from '@/consts/icon.js';
import colorConstatns from '@/consts/color.js';
import { isNumber } from '@/lib/common.js';
import {
mdiEyeOffOutline
} from '@mdi/js';
export default {
props: [
'iconType',
'iconId',
'color',
'defaultColor',
'additionalColorAttr'
'additionalColorAttr',
'hiddenStatus'
],
data() {
return {
icons: {
hide: mdiEyeOffOutline
}
}
},
computed: {
icon() {
if (this.iconType === 'account') {
Expand Down

0 comments on commit d013f67

Please sign in to comment.