fix: replace vue3-flag-icons with custom CSS-only flag icons

- Remove vue3-flag-icons dependency (was causing slow loading)
- Create custom flag-icons.css with only cn and us flags (inline SVG)
- Update language-change.vue to use CSS-based flag icons
- Delete vue3-flag-icons type declaration file
- Flag icons now load instantly without any JavaScript overhead
This commit is contained in:
2026-05-07 23:21:53 +08:00
parent c816f4d85c
commit 74d030f846
5 changed files with 28 additions and 30 deletions
-18
View File
@@ -110,9 +110,6 @@ importers:
vue-sonner:
specifier: ^2.0.9
version: 2.0.9
vue3-flag-icons:
specifier: ^0.1.4
version: 0.1.4(vue@3.5.32(typescript@5.9.3))
zod:
specifier: ^4.3.6
version: 4.3.6
@@ -2170,9 +2167,6 @@ packages:
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
engines: {node: '>=10'}
flag-icons@7.5.0:
resolution: {integrity: sha512-kd+MNXviFIg5hijH766tt+3x76ele1AXlo4zDdCxIvqWZhKt4T83bOtxUOOMlTx/EcFdUMH5yvQgYlFh1EqqFg==}
flat-cache@4.0.1:
resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
engines: {node: '>=16'}
@@ -3404,11 +3398,6 @@ packages:
peerDependencies:
typescript: '>=5.0.0'
vue3-flag-icons@0.1.4:
resolution: {integrity: sha512-bJrrZuVHcs5XCW1CiXG3gpZnkzczk3gXlLgVmKt4XTeKRb3U/qt57hNtTP2ybXEXaigE26WxhO9rVXF9gsL7Dg==}
peerDependencies:
vue: ^3.5.0
vue@3.5.32:
resolution: {integrity: sha512-vM4z4Q9tTafVfMAK7IVzmxg34rSzTFMyIe0UUEijUCkn9+23lj0WRfA83dg7eQZIUlgOSGrkViIaCfqSAUXsMw==}
peerDependencies:
@@ -5442,8 +5431,6 @@ snapshots:
locate-path: 6.0.0
path-exists: 4.0.0
flag-icons@7.5.0: {}
flat-cache@4.0.1:
dependencies:
flatted: 3.4.2
@@ -6793,11 +6780,6 @@ snapshots:
'@vue/language-core': 3.2.6
typescript: 5.9.3
vue3-flag-icons@0.1.4(vue@3.5.32(typescript@5.9.3)):
dependencies:
flag-icons: 7.5.0
vue: 3.5.32(typescript@5.9.3)
vue@3.5.32(typescript@5.9.3):
dependencies:
'@vue/compiler-dom': 3.5.32