mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 23:17:33 +08:00
code refactor
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
>
|
||||
<template #selection="{ item }">
|
||||
<v-label class="cursor-pointer" style="padding-top: 3px">
|
||||
<v-icon size="28" :icon="icons.square" :color="getFinalColor(item.raw)"/>
|
||||
<v-icon size="28" :icon="mdiSquareRounded" :color="getFinalColor(item.raw)"/>
|
||||
</v-label>
|
||||
</template>
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
<div class="text-center" :key="colorInfo.color" v-for="colorInfo in row">
|
||||
<div class="cursor-pointer" @click="color = colorInfo.color">
|
||||
<v-icon class="ma-2" size="28"
|
||||
:icon="icons.square" :color="getFinalColor(colorInfo.color)"
|
||||
:icon="mdiSquareRounded" :color="getFinalColor(colorInfo.color)"
|
||||
v-if="!modelValue || modelValue !== colorInfo.color" />
|
||||
<v-badge class="right-bottom-icon" color="primary"
|
||||
location="bottom right" offset-x="8" offset-y="8" :icon="icons.checked"
|
||||
location="bottom right" offset-x="8" offset-y="8" :icon="mdiCheck"
|
||||
v-if="modelValue && modelValue === colorInfo.color">
|
||||
<v-icon class="ma-2" size="28" :icon="icons.square" :color="getFinalColor(colorInfo.color)" />
|
||||
<v-icon class="ma-2" size="28" :icon="mdiSquareRounded" :color="getFinalColor(colorInfo.color)" />
|
||||
</v-badge>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,11 +64,6 @@ const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: ColorValue): void;
|
||||
}>();
|
||||
|
||||
const icons = {
|
||||
square: mdiSquareRounded,
|
||||
checked: mdiCheck
|
||||
};
|
||||
|
||||
const dropdownMenu = useTemplateRef<HTMLElement>('dropdownMenu');
|
||||
const itemPerRow = ref<number>(props.columnCount || 7);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="cursor-pointer" @click="icon = iconInfo.id">
|
||||
<ItemIcon class="ma-2" icon-type="fixed" :icon-id="iconInfo.icon" :color="color" v-if="!modelValue || modelValue !== iconInfo.id" />
|
||||
<v-badge class="right-bottom-icon" color="primary"
|
||||
location="bottom right" offset-x="8" offset-y="10" :icon="icons.checked"
|
||||
location="bottom right" offset-x="8" offset-y="10" :icon="mdiCheck"
|
||||
v-if="modelValue && modelValue === iconInfo.id">
|
||||
<ItemIcon class="ma-2" icon-type="fixed" :icon-id="iconInfo.icon" :color="color" />
|
||||
</v-badge>
|
||||
@@ -63,10 +63,6 @@ const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: string): void;
|
||||
}>();
|
||||
|
||||
const icons = {
|
||||
checked: mdiCheck
|
||||
};
|
||||
|
||||
const dropdownMenu = useTemplateRef<HTMLElement>('dropdownMenu');
|
||||
const itemPerRow = ref<number>(props.columnCount || 7);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<slot></slot>
|
||||
</i>
|
||||
<v-badge class="right-bottom-icon" color="secondary"
|
||||
location="bottom right" offset-y="4" :icon="icons.hide"
|
||||
location="bottom right" offset-y="4" :icon="mdiEyeOffOutline"
|
||||
v-if="hiddenStatus">
|
||||
<i class="item-icon" :class="classes" :style="style">
|
||||
<slot></slot>
|
||||
@@ -27,10 +27,6 @@ interface DesktopItemIconProps extends CommonIconProps {
|
||||
const props = defineProps<DesktopItemIconProps>();
|
||||
const { style, getAccountIcon, getCategoryIcon } = useItemIconBase(props);
|
||||
|
||||
const icons = {
|
||||
hide: mdiEyeOffOutline
|
||||
};
|
||||
|
||||
const classes = computed<string>(() => {
|
||||
let allClasses = props.class ? (props.class + ' ') : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user