style: 优化代码结构
This commit is contained in:
parent
5270fe5246
commit
4e7892632f
1
src/components/Pages/Flipper/index.d.ts
vendored
1
src/components/Pages/Flipper/index.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export type FlipType = 'up' | 'down'
|
|
@ -1,4 +1,5 @@
|
|||||||
import Flipper from './index.vue'
|
import Flipper from './index.vue'
|
||||||
import { FlipType } from './index.d'
|
|
||||||
|
type FlipType = 'up' | 'down'
|
||||||
|
|
||||||
export { Flipper, FlipType }
|
export { Flipper, FlipType }
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="M-Flipper" :class="[flipType, { go: isFlipping }]">
|
<div class="go-Flipper" :class="[flipType, { go: isFlipping }]">
|
||||||
<div class="digital front" :data-front="frontTextFromData"></div>
|
<div class="digital front" :data-front="frontTextFromData"></div>
|
||||||
<div class="digital back" :data-back="backTextFromData"></div>
|
<div class="digital back" :data-back="backTextFromData"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
export default {
|
|
||||||
name: 'Flipper'
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, PropType, watch } from 'vue'
|
import { ref, PropType, watch } from 'vue'
|
||||||
import { FlipType } from '.'
|
import { FlipType } from './index'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
flipType: {
|
flipType: {
|
||||||
@ -131,7 +125,7 @@ $lineColor: #4a9ef8;
|
|||||||
}
|
}
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
.M-Flipper {
|
.go-Flipper {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: $width;
|
width: $width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user