update 单位换算
parent
b264e46bdb
commit
a4dd16682c
@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<div class="w-breathing">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@ -1,50 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="WEffectLight" :class="{ 'am': props.am }">
|
<div class="w-breathing">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<style scoped>
|
||||||
import { IdGenerator } from "@/util";
|
.w-breathing {
|
||||||
|
--transform: none;
|
||||||
//唯一标识
|
|
||||||
const uid = IdGenerator.next();
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
am: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@layer {
|
|
||||||
.WEffectLight {
|
|
||||||
--key: brightness(110%);
|
|
||||||
--time: 1.7s;
|
|
||||||
animation: am-WEffectLight var(--time) infinite linear;
|
|
||||||
animation-play-state: paused;
|
|
||||||
|
|
||||||
&.am {
|
|
||||||
animation-play-state: running;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes am-WEffectLight {
|
|
||||||
0% {
|
|
||||||
|
|
||||||
// filter: brightness(100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
40% {
|
|
||||||
filter: var(--key);
|
|
||||||
}
|
|
||||||
|
|
||||||
80% {
|
|
||||||
|
|
||||||
// filter: brightness(100%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue