From f1d69da3da9f6f9a03d33497f1668804157b119d Mon Sep 17 00:00:00 2001 From: ZvonimirSun Date: Fri, 19 Jul 2024 15:28:42 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=A4=84=E7=90=86tools=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=92=8Cscss=20breaking=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/{tools.js => tools.ts} | 7 ++++++- src/tools/2048/2048.vue | 24 +++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) rename src/{tools.js => tools.ts} (97%) diff --git a/src/tools.js b/src/tools.ts similarity index 97% rename from src/tools.js rename to src/tools.ts index c430573f..9f36835b 100644 --- a/src/tools.js +++ b/src/tools.ts @@ -1,4 +1,7 @@ -export default [ +import type { ToolMenu } from '@/types/tool' +import type { Optional } from '@/types/common' + +const tools: Optional[] = [ { type: '编辑器', icon: 'i-icon-park-outline-editor', @@ -310,3 +313,5 @@ export default [ ], }, ] + +export default tools diff --git a/src/tools/2048/2048.vue b/src/tools/2048/2048.vue index ad1d861b..07dabeb9 100644 --- a/src/tools/2048/2048.vue +++ b/src/tools/2048/2048.vue @@ -312,8 +312,10 @@ export default { } } - @include animation(fade-in 800ms ease $transition-speed * 12); - @include animation-fill-mode(both); + & { + @include animation(fade-in 800ms ease $transition-speed * 12); + @include animation-fill-mode(both); + } &.game-won { background: rgba($tile-gold-color, .5); @@ -393,11 +395,13 @@ export default { font-size: 5.5rem; } - // Movement transition - @include transition($transition-speed ease-in-out); - -webkit-transition-property: -webkit-transform; - -moz-transition-property: -moz-transform; - transition-property: transform; + & { + // Movement transition + @include transition($transition-speed ease-in-out); + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + transition-property: transform; + } $base: 2; $exponent: 1; @@ -643,8 +647,10 @@ export default { } } - @include animation(fade-in 800ms ease $transition-speed * 12); - @include animation-fill-mode(both); + & { + @include animation(fade-in 800ms ease $transition-speed * 12); + @include animation-fill-mode(both); + } &.game-won { background: rgba($tile-gold-color, .5);