refactor(shadcn): 优化 Button 组件并更新相关依赖
- 更新 @types/node 版本至 24.3.0 - 更新 @vue/tsconfig 版本至 0.8.0 - 更新 eslint-plugin-oxlint 和 oxlint 版本至 1.12.0 - 优化 HCesiumManager 中的卫星实体创建逻辑 - 修复 ShadcnVue 页面中的 Button 组件用法 - 优化 Button 组件的 Props 类型定义 - 更新 buttonVariants 的导入路径
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
"@tsconfig/node22": "^22.0.2",
|
"@tsconfig/node22": "^22.0.2",
|
||||||
"@types/archiver": "^6.0.3",
|
"@types/archiver": "^6.0.3",
|
||||||
"@types/mockjs": "^1.0.10",
|
"@types/mockjs": "^1.0.10",
|
||||||
"@types/node": "^24.2.1",
|
"@types/node": "^24.3.0",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/plotly.js-dist-min": "^2.3.4",
|
"@types/plotly.js-dist-min": "^2.3.4",
|
||||||
"@types/three": "^0.179.0",
|
"@types/three": "^0.179.0",
|
||||||
@@ -120,13 +120,13 @@
|
|||||||
"@vue/eslint-config-prettier": "^10.2.0",
|
"@vue/eslint-config-prettier": "^10.2.0",
|
||||||
"@vue/eslint-config-typescript": "^14.6.0",
|
"@vue/eslint-config-typescript": "^14.6.0",
|
||||||
"@vue/test-utils": "^2.4.6",
|
"@vue/test-utils": "^2.4.6",
|
||||||
"@vue/tsconfig": "^0.7.0",
|
"@vue/tsconfig": "^0.8.0",
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
"depcheck": "^1.4.7",
|
"depcheck": "^1.4.7",
|
||||||
"eruda": "^3.4.3",
|
"eruda": "^3.4.3",
|
||||||
"eslint": "^9.33.0",
|
"eslint": "^9.33.0",
|
||||||
"eslint-plugin-import-x": "^4.16.1",
|
"eslint-plugin-import-x": "^4.16.1",
|
||||||
"eslint-plugin-oxlint": "^1.11.2",
|
"eslint-plugin-oxlint": "^1.12.0",
|
||||||
"eslint-plugin-perfectionist": "^4.15.0",
|
"eslint-plugin-perfectionist": "^4.15.0",
|
||||||
"eslint-plugin-unicorn": "^60.0.0",
|
"eslint-plugin-unicorn": "^60.0.0",
|
||||||
"eslint-plugin-vue": "^10.4.0",
|
"eslint-plugin-vue": "^10.4.0",
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"naive-ui": "^2.42.0",
|
"naive-ui": "^2.42.0",
|
||||||
"npm-run-all2": "^8.0.4",
|
"npm-run-all2": "^8.0.4",
|
||||||
"oxlint": "^1.11.2",
|
"oxlint": "^1.12.0",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.6.2",
|
||||||
"spritesmith": "^3.5.1",
|
"spritesmith": "^3.5.1",
|
||||||
"typescript": "~5.9.2",
|
"typescript": "~5.9.2",
|
||||||
|
125
pnpm-lock.yaml
generated
125
pnpm-lock.yaml
generated
@@ -201,7 +201,7 @@ importers:
|
|||||||
specifier: ^1.0.10
|
specifier: ^1.0.10
|
||||||
version: 1.0.10
|
version: 1.0.10
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^24.2.1
|
specifier: ^24.3.0
|
||||||
version: 24.3.0
|
version: 24.3.0
|
||||||
'@types/nprogress':
|
'@types/nprogress':
|
||||||
specifier: ^0.2.3
|
specifier: ^0.2.3
|
||||||
@@ -234,8 +234,8 @@ importers:
|
|||||||
specifier: ^2.4.6
|
specifier: ^2.4.6
|
||||||
version: 2.4.6
|
version: 2.4.6
|
||||||
'@vue/tsconfig':
|
'@vue/tsconfig':
|
||||||
specifier: ^0.7.0
|
specifier: ^0.8.0
|
||||||
version: 0.7.0(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2))
|
version: 0.8.0(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2))
|
||||||
archiver:
|
archiver:
|
||||||
specifier: ^7.0.1
|
specifier: ^7.0.1
|
||||||
version: 7.0.1
|
version: 7.0.1
|
||||||
@@ -252,7 +252,7 @@ importers:
|
|||||||
specifier: ^4.16.1
|
specifier: ^4.16.1
|
||||||
version: 4.16.1(@typescript-eslint/utils@8.39.1(eslint@9.33.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.33.0(jiti@2.5.1))
|
version: 4.16.1(@typescript-eslint/utils@8.39.1(eslint@9.33.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.33.0(jiti@2.5.1))
|
||||||
eslint-plugin-oxlint:
|
eslint-plugin-oxlint:
|
||||||
specifier: ^1.11.2
|
specifier: ^1.12.0
|
||||||
version: 1.12.0
|
version: 1.12.0
|
||||||
eslint-plugin-perfectionist:
|
eslint-plugin-perfectionist:
|
||||||
specifier: ^4.15.0
|
specifier: ^4.15.0
|
||||||
@@ -282,7 +282,7 @@ importers:
|
|||||||
specifier: ^8.0.4
|
specifier: ^8.0.4
|
||||||
version: 8.0.4
|
version: 8.0.4
|
||||||
oxlint:
|
oxlint:
|
||||||
specifier: ^1.11.2
|
specifier: ^1.12.0
|
||||||
version: 1.12.0
|
version: 1.12.0
|
||||||
prettier:
|
prettier:
|
||||||
specifier: 3.6.2
|
specifier: 3.6.2
|
||||||
@@ -1260,6 +1260,9 @@ packages:
|
|||||||
'@jridgewell/gen-mapping@0.3.13':
|
'@jridgewell/gen-mapping@0.3.13':
|
||||||
resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
|
resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
|
||||||
|
|
||||||
|
'@jridgewell/remapping@2.3.5':
|
||||||
|
resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==}
|
||||||
|
|
||||||
'@jridgewell/resolve-uri@3.1.2':
|
'@jridgewell/resolve-uri@3.1.2':
|
||||||
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
|
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
|
||||||
engines: {node: '>=6.0.0'}
|
engines: {node: '>=6.0.0'}
|
||||||
@@ -1514,8 +1517,8 @@ packages:
|
|||||||
'@protobufjs/utf8@1.1.0':
|
'@protobufjs/utf8@1.1.0':
|
||||||
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
|
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
|
||||||
|
|
||||||
'@quansync/fs@0.1.4':
|
'@quansync/fs@0.1.5':
|
||||||
resolution: {integrity: sha512-vy/41FCdnIalPTQCb2Wl0ic1caMdzGus4ktDp+gpZesQNydXcx8nhh8qB3qMPbGkictOTaXgXEUUfQEm8DQYoA==}
|
resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==}
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.29':
|
'@rolldown/pluginutils@1.0.0-beta.29':
|
||||||
resolution: {integrity: sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==}
|
resolution: {integrity: sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==}
|
||||||
@@ -2343,8 +2346,8 @@ packages:
|
|||||||
'@vue/test-utils@2.4.6':
|
'@vue/test-utils@2.4.6':
|
||||||
resolution: {integrity: sha512-FMxEjOpYNYiFe0GkaHsnJPXFHxQ6m4t8vI/ElPGpMWxZKpmRvQ33OIrvRXemy6yha03RxhOlQuy+gZMC3CQSow==}
|
resolution: {integrity: sha512-FMxEjOpYNYiFe0GkaHsnJPXFHxQ6m4t8vI/ElPGpMWxZKpmRvQ33OIrvRXemy6yha03RxhOlQuy+gZMC3CQSow==}
|
||||||
|
|
||||||
'@vue/tsconfig@0.7.0':
|
'@vue/tsconfig@0.8.0':
|
||||||
resolution: {integrity: sha512-ku2uNz5MaZ9IerPPUyOHzyjhXoX2kVJaVf7hL315DC17vS6IiZRmmCPfggNbU16QTvM80+uYYy3eYJB59WCtvg==}
|
resolution: {integrity: sha512-HqJDMjxk9D3mbXAcO9IxqKPeKlVnRWvzyHtgY35L/VoLKubqn7zX80UeiD3jfS/gf+qS7ZlO5KmfXMUrsQtOeQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: 5.x
|
typescript: 5.x
|
||||||
vue: ^3.4.0
|
vue: ^3.4.0
|
||||||
@@ -2442,8 +2445,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
ansi-regex@6.1.0:
|
ansi-regex@6.2.0:
|
||||||
resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==}
|
resolution: {integrity: sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
ansi-styles@4.3.0:
|
ansi-styles@4.3.0:
|
||||||
@@ -2523,8 +2526,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-1UWOyC50xI3QZkRuDj6PqDtpm1oHWtYs+NQGwqL/2R11eN3Q81PHAHPM0SWW3BNQm53UDwS//Jv8L4CCVLM1bQ==}
|
resolution: {integrity: sha512-1UWOyC50xI3QZkRuDj6PqDtpm1oHWtYs+NQGwqL/2R11eN3Q81PHAHPM0SWW3BNQm53UDwS//Jv8L4CCVLM1bQ==}
|
||||||
engines: {node: '>=16.14.0'}
|
engines: {node: '>=16.14.0'}
|
||||||
|
|
||||||
ast-walker-scope@0.8.1:
|
ast-walker-scope@0.8.2:
|
||||||
resolution: {integrity: sha512-72XOdbzQCMKERvFrxAykatn2pu7osPNq/sNUzwcHdWzwPvOsNpPqkawfDXVvQbA2RT+ivtsMNjYdojTUZitt1A==}
|
resolution: {integrity: sha512-3pYeLyDZ6nJew9QeBhS4Nly02269Dkdk32+zdbbKmL6n4ZuaGorwwA+xx12xgOciA8BF1w9x+dlH7oUkFTW91w==}
|
||||||
engines: {node: '>=20.18.0'}
|
engines: {node: '>=20.18.0'}
|
||||||
|
|
||||||
async-validator@4.2.5:
|
async-validator@4.2.5:
|
||||||
@@ -2623,8 +2626,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
|
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
cacheable@1.10.3:
|
cacheable@1.10.4:
|
||||||
resolution: {integrity: sha512-M6p10iJ/VT0wT7TLIGUnm958oVrU2cUK8pQAVU21Zu7h8rbk/PeRtRWrvHJBql97Bhzk3g1N6+2VKC+Rjxna9Q==}
|
resolution: {integrity: sha512-Gd7ccIUkZ9TE2odLQVS+PDjIvQCdJKUlLdJRVvZu0aipj07Qfx+XIej7hhDrKGGoIxV5m5fT/kOJNJPQhQneRg==}
|
||||||
|
|
||||||
call-bind-apply-helpers@1.0.2:
|
call-bind-apply-helpers@1.0.2:
|
||||||
resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
|
resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
|
||||||
@@ -2655,8 +2658,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
chalk@5.5.0:
|
chalk@5.6.0:
|
||||||
resolution: {integrity: sha512-1tm8DTaJhPBG3bIkVeZt1iZM9GfSX2lzOeDVZH9R9ffRHpmHvxZ/QhgQH/aDTkswQVt+YHdXAdS/In/30OjCbg==}
|
resolution: {integrity: sha512-46QrSQFyVSEyYAgQ22hQ+zDa60YHA4fBstHmtSApj1Y5vKtG27fWowW03jCk5KcbXEWPZUIR894aARCA/G1kfQ==}
|
||||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||||
|
|
||||||
change-case@5.4.4:
|
change-case@5.4.4:
|
||||||
@@ -3039,8 +3042,8 @@ packages:
|
|||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
electron-to-chromium@1.5.202:
|
electron-to-chromium@1.5.203:
|
||||||
resolution: {integrity: sha512-NxbYjRmiHcHXV1Ws3fWUW+SLb62isauajk45LUJ/HgIOkUA7jLZu/X2Iif+X9FBNK8QkF9Zb4Q2mcwXCcY30mg==}
|
resolution: {integrity: sha512-uz4i0vLhfm6dLZWbz/iH88KNDV+ivj5+2SA+utpgjKaj9Q0iDLuwk6Idhe9BTxciHudyx6IvTvijhkPvFGUQ0g==}
|
||||||
|
|
||||||
emoji-regex@10.4.0:
|
emoji-regex@10.4.0:
|
||||||
resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==}
|
resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==}
|
||||||
@@ -3360,8 +3363,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
|
resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
|
|
||||||
flat-cache@6.1.12:
|
flat-cache@6.1.13:
|
||||||
resolution: {integrity: sha512-U+HqqpZPPXP5d24bWuRzjGqVqUcw64k4nZAbruniDwdRg0H10tvN7H6ku1tjhA4rg5B9GS3siEvwO2qjJJ6f8Q==}
|
resolution: {integrity: sha512-gmtS2PaUjSPa4zjObEIn4WWliKyZzYljgxODBfxugpK6q6HU9ClXzgCJ+nlcPKY9Bt090ypTOLIFWkV0jbKFjw==}
|
||||||
|
|
||||||
flatted@3.3.3:
|
flatted@3.3.3:
|
||||||
resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
|
resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
|
||||||
@@ -4517,8 +4520,8 @@ packages:
|
|||||||
proto-list@1.2.4:
|
proto-list@1.2.4:
|
||||||
resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==}
|
resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==}
|
||||||
|
|
||||||
protobufjs@7.5.3:
|
protobufjs@7.5.4:
|
||||||
resolution: {integrity: sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==}
|
resolution: {integrity: sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
|
|
||||||
proxy-from-env@1.1.0:
|
proxy-from-env@1.1.0:
|
||||||
@@ -4546,8 +4549,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
|
resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
|
||||||
engines: {node: '>=0.6'}
|
engines: {node: '>=0.6'}
|
||||||
|
|
||||||
quansync@0.2.10:
|
quansync@0.2.11:
|
||||||
resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==}
|
resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==}
|
||||||
|
|
||||||
queue-microtask@1.2.3:
|
queue-microtask@1.2.3:
|
||||||
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
||||||
@@ -5291,8 +5294,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==}
|
resolution: {integrity: sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
|
|
||||||
unplugin@2.3.5:
|
unplugin@2.3.6:
|
||||||
resolution: {integrity: sha512-RyWSb5AHmGtjjNQ6gIlA67sHOsWpsbWpwDokLwTcejVdOjEkJZh7QKu14J00gDDVSh8kGH4KYC/TNBceXFZhtw==}
|
resolution: {integrity: sha512-+/MdXl8bLTXI2lJF22gUBeCFqZruEpL/oM9f8wxCuKh9+Mw9qeul3gTqgbKpMeOFlusCzc0s7x2Kax2xKW+FQg==}
|
||||||
engines: {node: '>=18.12.0'}
|
engines: {node: '>=18.12.0'}
|
||||||
|
|
||||||
unrs-resolver@1.11.1:
|
unrs-resolver@1.11.1:
|
||||||
@@ -5970,7 +5973,7 @@ snapshots:
|
|||||||
mersenne-twister: 1.1.0
|
mersenne-twister: 1.1.0
|
||||||
meshoptimizer: 0.24.0
|
meshoptimizer: 0.24.0
|
||||||
pako: 2.1.0
|
pako: 2.1.0
|
||||||
protobufjs: 7.5.3
|
protobufjs: 7.5.4
|
||||||
rbush: 4.0.1
|
rbush: 4.0.1
|
||||||
topojson-client: 3.1.0
|
topojson-client: 3.1.0
|
||||||
urijs: 1.19.11
|
urijs: 1.19.11
|
||||||
@@ -6019,7 +6022,7 @@ snapshots:
|
|||||||
'@commitlint/format@19.8.1':
|
'@commitlint/format@19.8.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@commitlint/types': 19.8.1
|
'@commitlint/types': 19.8.1
|
||||||
chalk: 5.5.0
|
chalk: 5.6.0
|
||||||
|
|
||||||
'@commitlint/is-ignored@19.8.1':
|
'@commitlint/is-ignored@19.8.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6039,7 +6042,7 @@ snapshots:
|
|||||||
'@commitlint/execute-rule': 19.8.1
|
'@commitlint/execute-rule': 19.8.1
|
||||||
'@commitlint/resolve-extends': 19.8.1
|
'@commitlint/resolve-extends': 19.8.1
|
||||||
'@commitlint/types': 19.8.1
|
'@commitlint/types': 19.8.1
|
||||||
chalk: 5.5.0
|
chalk: 5.6.0
|
||||||
cosmiconfig: 9.0.0(typescript@5.9.2)
|
cosmiconfig: 9.0.0(typescript@5.9.2)
|
||||||
cosmiconfig-typescript-loader: 6.1.0(@types/node@24.3.0)(cosmiconfig@9.0.0(typescript@5.9.2))(typescript@5.9.2)
|
cosmiconfig-typescript-loader: 6.1.0(@types/node@24.3.0)(cosmiconfig@9.0.0(typescript@5.9.2))(typescript@5.9.2)
|
||||||
lodash.isplainobject: 4.0.6
|
lodash.isplainobject: 4.0.6
|
||||||
@@ -6090,7 +6093,7 @@ snapshots:
|
|||||||
'@commitlint/types@19.8.1':
|
'@commitlint/types@19.8.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/conventional-commits-parser': 5.0.1
|
'@types/conventional-commits-parser': 5.0.1
|
||||||
chalk: 5.5.0
|
chalk: 5.6.0
|
||||||
|
|
||||||
'@css-render/plugin-bem@0.15.14(css-render@0.15.14)':
|
'@css-render/plugin-bem@0.15.14(css-render@0.15.14)':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6573,6 +6576,11 @@ snapshots:
|
|||||||
'@jridgewell/sourcemap-codec': 1.5.5
|
'@jridgewell/sourcemap-codec': 1.5.5
|
||||||
'@jridgewell/trace-mapping': 0.3.30
|
'@jridgewell/trace-mapping': 0.3.30
|
||||||
|
|
||||||
|
'@jridgewell/remapping@2.3.5':
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/gen-mapping': 0.3.13
|
||||||
|
'@jridgewell/trace-mapping': 0.3.30
|
||||||
|
|
||||||
'@jridgewell/resolve-uri@3.1.2': {}
|
'@jridgewell/resolve-uri@3.1.2': {}
|
||||||
|
|
||||||
'@jridgewell/source-map@0.3.11':
|
'@jridgewell/source-map@0.3.11':
|
||||||
@@ -6776,9 +6784,9 @@ snapshots:
|
|||||||
|
|
||||||
'@protobufjs/utf8@1.1.0': {}
|
'@protobufjs/utf8@1.1.0': {}
|
||||||
|
|
||||||
'@quansync/fs@0.1.4':
|
'@quansync/fs@0.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
quansync: 0.2.10
|
quansync: 0.2.11
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.29': {}
|
'@rolldown/pluginutils@1.0.0-beta.29': {}
|
||||||
|
|
||||||
@@ -7773,7 +7781,7 @@ snapshots:
|
|||||||
js-beautify: 1.15.4
|
js-beautify: 1.15.4
|
||||||
vue-component-type-helpers: 2.2.12
|
vue-component-type-helpers: 2.2.12
|
||||||
|
|
||||||
'@vue/tsconfig@0.7.0(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2))':
|
'@vue/tsconfig@0.8.0(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2))':
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.9.2
|
typescript: 5.9.2
|
||||||
vue: 3.5.18(typescript@5.9.2)
|
vue: 3.5.18(typescript@5.9.2)
|
||||||
@@ -7881,7 +7889,7 @@ snapshots:
|
|||||||
|
|
||||||
ansi-regex@5.0.1: {}
|
ansi-regex@5.0.1: {}
|
||||||
|
|
||||||
ansi-regex@6.1.0: {}
|
ansi-regex@6.2.0: {}
|
||||||
|
|
||||||
ansi-styles@4.3.0:
|
ansi-styles@4.3.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -7983,7 +7991,7 @@ snapshots:
|
|||||||
'@babel/parser': 7.28.3
|
'@babel/parser': 7.28.3
|
||||||
ast-kit: 1.4.3
|
ast-kit: 1.4.3
|
||||||
|
|
||||||
ast-walker-scope@0.8.1:
|
ast-walker-scope@0.8.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/parser': 7.28.3
|
'@babel/parser': 7.28.3
|
||||||
ast-kit: 2.1.2
|
ast-kit: 2.1.2
|
||||||
@@ -8049,7 +8057,7 @@ snapshots:
|
|||||||
browserslist@4.25.2:
|
browserslist@4.25.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001735
|
caniuse-lite: 1.0.30001735
|
||||||
electron-to-chromium: 1.5.202
|
electron-to-chromium: 1.5.203
|
||||||
node-releases: 2.0.19
|
node-releases: 2.0.19
|
||||||
update-browserslist-db: 1.1.3(browserslist@4.25.2)
|
update-browserslist-db: 1.1.3(browserslist@4.25.2)
|
||||||
|
|
||||||
@@ -8079,7 +8087,7 @@ snapshots:
|
|||||||
|
|
||||||
cac@6.7.14: {}
|
cac@6.7.14: {}
|
||||||
|
|
||||||
cacheable@1.10.3:
|
cacheable@1.10.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
hookified: 1.11.0
|
hookified: 1.11.0
|
||||||
keyv: 5.5.0
|
keyv: 5.5.0
|
||||||
@@ -8109,7 +8117,7 @@ snapshots:
|
|||||||
ansi-styles: 4.3.0
|
ansi-styles: 4.3.0
|
||||||
supports-color: 7.2.0
|
supports-color: 7.2.0
|
||||||
|
|
||||||
chalk@5.5.0: {}
|
chalk@5.6.0: {}
|
||||||
|
|
||||||
change-case@5.4.4: {}
|
change-case@5.4.4: {}
|
||||||
|
|
||||||
@@ -8498,7 +8506,7 @@ snapshots:
|
|||||||
minimatch: 9.0.1
|
minimatch: 9.0.1
|
||||||
semver: 7.7.2
|
semver: 7.7.2
|
||||||
|
|
||||||
electron-to-chromium@1.5.202: {}
|
electron-to-chromium@1.5.203: {}
|
||||||
|
|
||||||
emoji-regex@10.4.0: {}
|
emoji-regex@10.4.0: {}
|
||||||
|
|
||||||
@@ -8890,9 +8898,9 @@ snapshots:
|
|||||||
flatted: 3.3.3
|
flatted: 3.3.3
|
||||||
keyv: 4.5.4
|
keyv: 4.5.4
|
||||||
|
|
||||||
flat-cache@6.1.12:
|
flat-cache@6.1.13:
|
||||||
dependencies:
|
dependencies:
|
||||||
cacheable: 1.10.3
|
cacheable: 1.10.4
|
||||||
flatted: 3.3.3
|
flatted: 3.3.3
|
||||||
hookified: 1.11.0
|
hookified: 1.11.0
|
||||||
|
|
||||||
@@ -9385,7 +9393,7 @@ snapshots:
|
|||||||
|
|
||||||
lint-staged@16.1.5:
|
lint-staged@16.1.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk: 5.5.0
|
chalk: 5.6.0
|
||||||
commander: 14.0.0
|
commander: 14.0.0
|
||||||
debug: 4.4.1
|
debug: 4.4.1
|
||||||
lilconfig: 3.1.3
|
lilconfig: 3.1.3
|
||||||
@@ -9416,7 +9424,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
mlly: 1.7.4
|
mlly: 1.7.4
|
||||||
pkg-types: 2.2.0
|
pkg-types: 2.2.0
|
||||||
quansync: 0.2.10
|
quansync: 0.2.11
|
||||||
|
|
||||||
locate-path@6.0.0:
|
locate-path@6.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -9992,7 +10000,7 @@ snapshots:
|
|||||||
|
|
||||||
proto-list@1.2.4: {}
|
proto-list@1.2.4: {}
|
||||||
|
|
||||||
protobufjs@7.5.3:
|
protobufjs@7.5.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@protobufjs/aspromise': 1.1.2
|
'@protobufjs/aspromise': 1.1.2
|
||||||
'@protobufjs/base64': 1.1.2
|
'@protobufjs/base64': 1.1.2
|
||||||
@@ -10029,7 +10037,7 @@ snapshots:
|
|||||||
|
|
||||||
qs@6.5.3: {}
|
qs@6.5.3: {}
|
||||||
|
|
||||||
quansync@0.2.10: {}
|
quansync@0.2.11: {}
|
||||||
|
|
||||||
queue-microtask@1.2.3: {}
|
queue-microtask@1.2.3: {}
|
||||||
|
|
||||||
@@ -10495,7 +10503,7 @@ snapshots:
|
|||||||
|
|
||||||
strip-ansi@7.1.0:
|
strip-ansi@7.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex: 6.1.0
|
ansi-regex: 6.2.0
|
||||||
|
|
||||||
strip-bom-stream@1.0.0:
|
strip-bom-stream@1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -10666,10 +10674,10 @@ snapshots:
|
|||||||
|
|
||||||
unconfig@7.3.2:
|
unconfig@7.3.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@quansync/fs': 0.1.4
|
'@quansync/fs': 0.1.5
|
||||||
defu: 6.1.4
|
defu: 6.1.4
|
||||||
jiti: 2.5.1
|
jiti: 2.5.1
|
||||||
quansync: 0.2.10
|
quansync: 0.2.11
|
||||||
|
|
||||||
undici-types@7.10.0: {}
|
undici-types@7.10.0: {}
|
||||||
|
|
||||||
@@ -10695,7 +10703,7 @@ snapshots:
|
|||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
strip-literal: 3.0.0
|
strip-literal: 3.0.0
|
||||||
tinyglobby: 0.2.14
|
tinyglobby: 0.2.14
|
||||||
unplugin: 2.3.5
|
unplugin: 2.3.6
|
||||||
unplugin-utils: 0.2.5
|
unplugin-utils: 0.2.5
|
||||||
|
|
||||||
uniq@1.0.1: {}
|
uniq@1.0.1: {}
|
||||||
@@ -10753,7 +10761,7 @@ snapshots:
|
|||||||
magic-string: 0.30.17
|
magic-string: 0.30.17
|
||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
unimport: 5.2.0
|
unimport: 5.2.0
|
||||||
unplugin: 2.3.5
|
unplugin: 2.3.6
|
||||||
unplugin-utils: 0.2.5
|
unplugin-utils: 0.2.5
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vueuse/core': 13.6.0(vue@3.5.18(typescript@5.9.2))
|
'@vueuse/core': 13.6.0(vue@3.5.18(typescript@5.9.2))
|
||||||
@@ -10771,7 +10779,7 @@ snapshots:
|
|||||||
'@iconify/utils': 2.3.0
|
'@iconify/utils': 2.3.0
|
||||||
debug: 4.4.1
|
debug: 4.4.1
|
||||||
local-pkg: 1.1.1
|
local-pkg: 1.1.1
|
||||||
unplugin: 2.3.5
|
unplugin: 2.3.6
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vue/compiler-sfc': 3.5.18
|
'@vue/compiler-sfc': 3.5.18
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -10790,7 +10798,7 @@ snapshots:
|
|||||||
magic-string: 0.30.17
|
magic-string: 0.30.17
|
||||||
mlly: 1.7.4
|
mlly: 1.7.4
|
||||||
tinyglobby: 0.2.14
|
tinyglobby: 0.2.14
|
||||||
unplugin: 2.3.5
|
unplugin: 2.3.6
|
||||||
unplugin-utils: 0.2.5
|
unplugin-utils: 0.2.5
|
||||||
vue: 3.5.18(typescript@5.9.2)
|
vue: 3.5.18(typescript@5.9.2)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@@ -10860,7 +10868,7 @@ snapshots:
|
|||||||
'@types/markdown-it': 14.1.2
|
'@types/markdown-it': 14.1.2
|
||||||
markdown-it: 14.1.0
|
markdown-it: 14.1.0
|
||||||
markdown-it-async: 2.2.0
|
markdown-it-async: 2.2.0
|
||||||
unplugin: 2.3.5
|
unplugin: 2.3.6
|
||||||
unplugin-utils: 0.2.5
|
unplugin-utils: 0.2.5
|
||||||
vite: 7.1.2(@types/node@24.3.0)(jiti@2.5.1)(less@4.4.0)(sass-embedded@1.89.1)(terser@5.42.0)(yaml@2.8.1)
|
vite: 7.1.2(@types/node@24.3.0)(jiti@2.5.1)(less@4.4.0)(sass-embedded@1.89.1)(terser@5.42.0)(yaml@2.8.1)
|
||||||
|
|
||||||
@@ -10869,7 +10877,7 @@ snapshots:
|
|||||||
'@vue-macros/common': 3.0.0-beta.16(vue@3.5.18(typescript@5.9.2))
|
'@vue-macros/common': 3.0.0-beta.16(vue@3.5.18(typescript@5.9.2))
|
||||||
'@vue/compiler-sfc': 3.5.18
|
'@vue/compiler-sfc': 3.5.18
|
||||||
'@vue/language-core': 3.0.5(typescript@5.9.2)
|
'@vue/language-core': 3.0.5(typescript@5.9.2)
|
||||||
ast-walker-scope: 0.8.1
|
ast-walker-scope: 0.8.2
|
||||||
chokidar: 4.0.3
|
chokidar: 4.0.3
|
||||||
json5: 2.2.3
|
json5: 2.2.3
|
||||||
local-pkg: 1.1.1
|
local-pkg: 1.1.1
|
||||||
@@ -10880,7 +10888,7 @@ snapshots:
|
|||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
tinyglobby: 0.2.14
|
tinyglobby: 0.2.14
|
||||||
unplugin: 2.3.5
|
unplugin: 2.3.6
|
||||||
unplugin-utils: 0.2.5
|
unplugin-utils: 0.2.5
|
||||||
yaml: 2.8.1
|
yaml: 2.8.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@@ -10894,8 +10902,9 @@ snapshots:
|
|||||||
acorn: 8.15.0
|
acorn: 8.15.0
|
||||||
webpack-virtual-modules: 0.6.2
|
webpack-virtual-modules: 0.6.2
|
||||||
|
|
||||||
unplugin@2.3.5:
|
unplugin@2.3.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@jridgewell/remapping': 2.3.5
|
||||||
acorn: 8.15.0
|
acorn: 8.15.0
|
||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
webpack-virtual-modules: 0.6.2
|
webpack-virtual-modules: 0.6.2
|
||||||
@@ -11112,7 +11121,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
axios: 1.11.0
|
axios: 1.11.0
|
||||||
clean-css: 5.3.3
|
clean-css: 5.3.3
|
||||||
flat-cache: 6.1.12
|
flat-cache: 6.1.13
|
||||||
picocolors: 1.1.1
|
picocolors: 1.1.1
|
||||||
vite: 7.1.2(@types/node@24.3.0)(jiti@2.5.1)(less@4.4.0)(sass-embedded@1.89.1)(terser@5.42.0)(yaml@2.8.1)
|
vite: 7.1.2(@types/node@24.3.0)(jiti@2.5.1)(less@4.4.0)(sass-embedded@1.89.1)(terser@5.42.0)(yaml@2.8.1)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@@ -6,9 +6,9 @@ import type { I卫星 } from './HCesiumManager.types';
|
|||||||
import { type OrbitCalculationResult, SatelliteCalculator } from '../calculators/SatelliteCalculator';
|
import { type OrbitCalculationResult, SatelliteCalculator } from '../calculators/SatelliteCalculator';
|
||||||
|
|
||||||
interface ManagedSatelliteEntities {
|
interface ManagedSatelliteEntities {
|
||||||
coverageEntity?: Cesium.Entity;
|
coverageEntity?: Cesium.Entity | null;
|
||||||
mainEntity: Cesium.Entity;
|
mainEntity: Cesium.Entity;
|
||||||
orbitEntity?: Cesium.Entity;
|
orbitEntity?: Cesium.Entity | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HCesiumSatelliteManager {
|
export class HCesiumSatelliteManager {
|
||||||
@@ -108,8 +108,8 @@ export class HCesiumSatelliteManager {
|
|||||||
// 存储实体引用
|
// 存储实体引用
|
||||||
this.currentSatelliteEntities.set(id, {
|
this.currentSatelliteEntities.set(id, {
|
||||||
mainEntity: addedMainEntity, // 存储实际添加成功的实体
|
mainEntity: addedMainEntity, // 存储实际添加成功的实体
|
||||||
orbitEntity: addedOrbitEntity ?? undefined,
|
orbitEntity: addedOrbitEntity,
|
||||||
coverageEntity: addedCoverageEntity ?? undefined,
|
coverageEntity: addedCoverageEntity,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,21 +124,10 @@ export class HCesiumSatelliteManager {
|
|||||||
options: I卫星,
|
options: I卫星,
|
||||||
): Cesium.Entity {
|
): Cesium.Entity {
|
||||||
// 动态轨迹路径 (Path) - 注意:这与完整轨道线 (Polyline) 不同
|
// 动态轨迹路径 (Path) - 注意:这与完整轨道线 (Polyline) 不同
|
||||||
const path: Cesium.PathGraphics.ConstructorOptions = {
|
|
||||||
resolution: 1,
|
|
||||||
material: new Cesium.PolylineGlowMaterialProperty({
|
|
||||||
glowPower: 0.15,
|
|
||||||
color: randomBaseColor,
|
|
||||||
}),
|
|
||||||
width: 2,
|
|
||||||
leadTime: (options.orbitDurationSeconds ?? 3600 * 2) / 2, // 默认1小时
|
|
||||||
trailTime: (options.orbitDurationSeconds ?? 3600 * 2) / 2, // 默认1小时
|
|
||||||
};
|
|
||||||
|
|
||||||
return new Cesium.Entity({
|
const entityOptions: Cesium.Entity.ConstructorOptions = {
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
path: options.showPath ? path : undefined, // 根据 options.showPath 控制是否显示路径
|
|
||||||
position: sampledPositionProperty, // 使用计算好的位置属性
|
position: sampledPositionProperty, // 使用计算好的位置属性
|
||||||
orientation: new Cesium.VelocityOrientationProperty(sampledPositionProperty),
|
orientation: new Cesium.VelocityOrientationProperty(sampledPositionProperty),
|
||||||
point: {
|
point: {
|
||||||
@@ -157,7 +146,22 @@ export class HCesiumSatelliteManager {
|
|||||||
fillColor: Cesium.Color.WHITE,
|
fillColor: Cesium.Color.WHITE,
|
||||||
outlineColor: Cesium.Color.BLACK,
|
outlineColor: Cesium.Color.BLACK,
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (options.showPath) {
|
||||||
|
entityOptions.path = {
|
||||||
|
resolution: 1,
|
||||||
|
material: new Cesium.PolylineGlowMaterialProperty({
|
||||||
|
glowPower: 0.15,
|
||||||
|
color: randomBaseColor,
|
||||||
|
}),
|
||||||
|
width: 2,
|
||||||
|
leadTime: (options.orbitDurationSeconds ?? 3600 * 2) / 2, // 默认1小时
|
||||||
|
trailTime: (options.orbitDurationSeconds ?? 3600 * 2) / 2, // 默认1小时
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Cesium.Entity(entityOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -8,7 +8,7 @@ const onClick = () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ShadcnButton :onClick>ShadcnButton</ShadcnButton>
|
<ShadcnButton as="button" :onClick>ShadcnButton</ShadcnButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@@ -1,24 +1,26 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { HTMLAttributes } from 'vue'
|
import type { PrimitiveProps } from "reka-ui"
|
||||||
|
import type { HTMLAttributes } from "vue"
|
||||||
|
import type { ButtonVariants } from "."
|
||||||
|
import { Primitive } from "reka-ui"
|
||||||
import { cn } from '@/shadcn/lib/utils'
|
import { cn } from '@/shadcn/lib/utils'
|
||||||
import { Primitive, type PrimitiveProps } from 'reka-ui'
|
import { buttonVariants } from "."
|
||||||
import { type ButtonVariants, buttonVariants } from '.'
|
|
||||||
|
|
||||||
interface Props extends PrimitiveProps {
|
interface Props extends PrimitiveProps {
|
||||||
variant?: ButtonVariants['variant']
|
variant?: ButtonVariants["variant"]
|
||||||
size?: ButtonVariants['size']
|
size?: ButtonVariants["size"]
|
||||||
class?: HTMLAttributes['class']
|
class?: HTMLAttributes["class"]
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
as: 'button',
|
as: "button",
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Primitive
|
<Primitive
|
||||||
:as="as"
|
:as="props.as"
|
||||||
:as-child="asChild"
|
:as-child="props.asChild"
|
||||||
:class="cn(buttonVariants({ variant, size }), props.class)"
|
:class="cn(buttonVariants({ variant, size }), props.class)"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
@@ -1,33 +1,34 @@
|
|||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import type { VariantProps } from "class-variance-authority"
|
||||||
|
import { cva } from "class-variance-authority"
|
||||||
|
|
||||||
export { default as Button } from './Button.vue'
|
export { default as Button } from "./Button.vue"
|
||||||
|
|
||||||
export const buttonVariants = cva(
|
export const buttonVariants = cva(
|
||||||
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
|
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
||||||
destructive:
|
destructive:
|
||||||
'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
|
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
||||||
outline:
|
outline:
|
||||||
'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
|
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
||||||
secondary:
|
secondary:
|
||||||
'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
|
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
||||||
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
||||||
link: 'text-primary underline-offset-4 hover:underline',
|
link: "text-primary underline-offset-4 hover:underline",
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: 'h-9 px-4 py-2',
|
default: "h-9 px-4 py-2",
|
||||||
xs: 'h-7 rounded px-2',
|
xs: "h-7 rounded px-2",
|
||||||
sm: 'h-8 rounded-md px-3 text-xs',
|
sm: "h-8 rounded-md px-3 text-xs",
|
||||||
lg: 'h-10 rounded-md px-8',
|
lg: "h-10 rounded-md px-8",
|
||||||
icon: 'h-9 w-9',
|
icon: "h-9 w-9",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: 'default',
|
variant: "default",
|
||||||
size: 'default',
|
size: "default",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@@ -4,8 +4,8 @@ import { cn } from '@/shadcn/lib/utils'
|
|||||||
import { useVModel } from '@vueuse/core'
|
import { useVModel } from '@vueuse/core'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
defaultValue?: string | number
|
defaultValue: string | number | undefined
|
||||||
modelValue?: string | number
|
modelValue: string | number | undefined
|
||||||
class?: HTMLAttributes['class']
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user