mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): chrome Tab重构完成
This commit is contained in:
27
src/components/custom/IconClose/index.vue
Normal file
27
src/components/custom/IconClose/index.vue
Normal file
@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<div
|
||||
class="relative flex-center w-18px h-18px text-14px"
|
||||
:class="[isPrimary ? 'text-primary' : 'text-gray-400']"
|
||||
@mouseenter="setTrue"
|
||||
@mouseleave="setFalse"
|
||||
>
|
||||
<transition name="transition-opacity">
|
||||
<icon-carbon-close-filled v-if="isHover" key="hover" class="absolute" />
|
||||
<icon-carbon-close v-else key="unhover" class="absolute" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useBoolean } from '@/hooks';
|
||||
|
||||
defineProps({
|
||||
isPrimary: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
const { bool: isHover, setTrue, setFalse } = useBoolean();
|
||||
</script>
|
||||
<style scoped></style>
|
Reference in New Issue
Block a user