Pārlūkot izejas kodu

style: 优化代码结构

奔跑的面条 3 gadi atpakaļ
vecāks
revīzija
4e7892632f

+ 0 - 1
src/components/Pages/Flipper/index.d.ts

@@ -1 +0,0 @@
-export type FlipType = 'up' | 'down'

+ 2 - 1
src/components/Pages/Flipper/index.ts

@@ -1,4 +1,5 @@
 import Flipper from './index.vue'
-import { FlipType } from './index.d'
+
+type FlipType = 'up' | 'down'
 
 export { Flipper, FlipType }

+ 3 - 9
src/components/Pages/Flipper/index.vue

@@ -1,19 +1,13 @@
 <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 back" :data-back="backTextFromData"></div>
   </div>
 </template>
 
-<script lang="ts">
-export default {
-  name: 'Flipper'
-}
-</script>
-
 <script lang="ts" setup>
 import { ref, PropType, watch } from 'vue'
-import { FlipType } from '.'
+import { FlipType }  from './index'
 
 const props = defineProps({
   flipType: {
@@ -131,7 +125,7 @@ $lineColor: #4a9ef8;
 }
 // #endregion
 
-.M-Flipper {
+.go-Flipper {
   display: inline-block;
   position: relative;
   width: $width;