mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
itemicon supports hidden status
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<i class="item-icon" :class="icon" :style="style">
|
<i class="item-icon" :class="icon" :style="style" v-if="!hiddenStatus">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</i>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -9,14 +16,26 @@ import iconConstatns from '@/consts/icon.js';
|
|||||||
import colorConstatns from '@/consts/color.js';
|
import colorConstatns from '@/consts/color.js';
|
||||||
import { isNumber } from '@/lib/common.js';
|
import { isNumber } from '@/lib/common.js';
|
||||||
|
|
||||||
|
import {
|
||||||
|
mdiEyeOffOutline
|
||||||
|
} from '@mdi/js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
'iconType',
|
'iconType',
|
||||||
'iconId',
|
'iconId',
|
||||||
'color',
|
'color',
|
||||||
'defaultColor',
|
'defaultColor',
|
||||||
'additionalColorAttr'
|
'additionalColorAttr',
|
||||||
|
'hiddenStatus'
|
||||||
],
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
icons: {
|
||||||
|
hide: mdiEyeOffOutline
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
icon() {
|
icon() {
|
||||||
if (this.iconType === 'account') {
|
if (this.iconType === 'account') {
|
||||||
|
|||||||
Reference in New Issue
Block a user