feat: 基本支持切换搜索引擎

This commit is contained in:
imsyy 2023-08-01 11:50:15 +08:00
parent 855c313fec
commit 9c1e8efe42
13 changed files with 975 additions and 128 deletions

View File

@ -1,10 +1,10 @@
{
"name": "snavigation",
"private": true,
"version": "2.0.0 beta 1",
"version": "2.0.0 beta 2",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host",
"build": "vite build",
"preview": "vite preview"
},
@ -15,7 +15,8 @@
"pinia": "^2.1.4",
"pinia-plugin-persistedstate": "^3.2.0",
"sass": "^1.64.1",
"vue": "^3.3.4"
"vue": "^3.3.4",
"vue3-perfect-scrollbar": "^1.6.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",

View File

@ -26,6 +26,9 @@ dependencies:
vue:
specifier: ^3.3.4
version: 3.3.4
vue3-perfect-scrollbar:
specifier: ^1.6.1
version: 1.6.1(postcss@8.4.27)
devDependencies:
'@vitejs/plugin-vue':
@ -301,6 +304,11 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.14
dev: true
/@trysound/sax@0.2.0:
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
engines: {node: '>=10.13.0'}
dev: false
/@vitejs/plugin-vue@4.2.3(vite@4.4.6)(vue@3.3.4):
resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==}
engines: {node: ^14.18.0 || >=16.0.0}
@ -420,16 +428,44 @@ packages:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
engines: {node: '>=8'}
/boolbase@1.0.0:
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
dev: false
/braces@3.0.2:
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
engines: {node: '>=8'}
dependencies:
fill-range: 7.0.1
/browserslist@4.21.10:
resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001518
electron-to-chromium: 1.4.478
node-releases: 2.0.13
update-browserslist-db: 1.0.11(browserslist@4.21.10)
dev: false
/buffer-from@1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
dev: true
/caniuse-api@3.0.0:
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
dependencies:
browserslist: 4.21.10
caniuse-lite: 1.0.30001518
lodash.memoize: 4.1.2
lodash.uniq: 4.5.0
dev: false
/caniuse-lite@1.0.30001518:
resolution: {integrity: sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==}
dev: false
/chokidar@3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
engines: {node: '>= 8.10.0'}
@ -444,6 +480,10 @@ packages:
optionalDependencies:
fsevents: 2.3.2
/colord@2.9.3:
resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==}
dev: false
/combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
@ -455,6 +495,115 @@ packages:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: true
/commander@7.2.0:
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
engines: {node: '>= 10'}
dev: false
/css-declaration-sorter@6.4.1(postcss@8.4.27):
resolution: {integrity: sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==}
engines: {node: ^10 || ^12 || >=14}
peerDependencies:
postcss: ^8.0.9
dependencies:
postcss: 8.4.27
dev: false
/css-select@4.3.0:
resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==}
dependencies:
boolbase: 1.0.0
css-what: 6.1.0
domhandler: 4.3.1
domutils: 2.8.0
nth-check: 2.1.1
dev: false
/css-tree@1.1.3:
resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==}
engines: {node: '>=8.0.0'}
dependencies:
mdn-data: 2.0.14
source-map: 0.6.1
dev: false
/css-what@6.1.0:
resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==}
engines: {node: '>= 6'}
dev: false
/cssesc@3.0.0:
resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
engines: {node: '>=4'}
hasBin: true
dev: false
/cssnano-preset-default@5.2.14(postcss@8.4.27):
resolution: {integrity: sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
css-declaration-sorter: 6.4.1(postcss@8.4.27)
cssnano-utils: 3.1.0(postcss@8.4.27)
postcss: 8.4.27
postcss-calc: 8.2.4(postcss@8.4.27)
postcss-colormin: 5.3.1(postcss@8.4.27)
postcss-convert-values: 5.1.3(postcss@8.4.27)
postcss-discard-comments: 5.1.2(postcss@8.4.27)
postcss-discard-duplicates: 5.1.0(postcss@8.4.27)
postcss-discard-empty: 5.1.1(postcss@8.4.27)
postcss-discard-overridden: 5.1.0(postcss@8.4.27)
postcss-merge-longhand: 5.1.7(postcss@8.4.27)
postcss-merge-rules: 5.1.4(postcss@8.4.27)
postcss-minify-font-values: 5.1.0(postcss@8.4.27)
postcss-minify-gradients: 5.1.1(postcss@8.4.27)
postcss-minify-params: 5.1.4(postcss@8.4.27)
postcss-minify-selectors: 5.2.1(postcss@8.4.27)
postcss-normalize-charset: 5.1.0(postcss@8.4.27)
postcss-normalize-display-values: 5.1.0(postcss@8.4.27)
postcss-normalize-positions: 5.1.1(postcss@8.4.27)
postcss-normalize-repeat-style: 5.1.1(postcss@8.4.27)
postcss-normalize-string: 5.1.0(postcss@8.4.27)
postcss-normalize-timing-functions: 5.1.0(postcss@8.4.27)
postcss-normalize-unicode: 5.1.1(postcss@8.4.27)
postcss-normalize-url: 5.1.0(postcss@8.4.27)
postcss-normalize-whitespace: 5.1.1(postcss@8.4.27)
postcss-ordered-values: 5.1.3(postcss@8.4.27)
postcss-reduce-initial: 5.1.2(postcss@8.4.27)
postcss-reduce-transforms: 5.1.0(postcss@8.4.27)
postcss-svgo: 5.1.0(postcss@8.4.27)
postcss-unique-selectors: 5.1.1(postcss@8.4.27)
dev: false
/cssnano-utils@3.1.0(postcss@8.4.27):
resolution: {integrity: sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
dev: false
/cssnano@5.1.15(postcss@8.4.27):
resolution: {integrity: sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
cssnano-preset-default: 5.2.14(postcss@8.4.27)
lilconfig: 2.1.0
postcss: 8.4.27
yaml: 1.10.2
dev: false
/csso@4.2.0:
resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==}
engines: {node: '>=8.0.0'}
dependencies:
css-tree: 1.1.3
dev: false
/csstype@3.1.2:
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
@ -463,6 +612,41 @@ packages:
engines: {node: '>=0.4.0'}
dev: false
/dom-serializer@1.4.1:
resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==}
dependencies:
domelementtype: 2.3.0
domhandler: 4.3.1
entities: 2.2.0
dev: false
/domelementtype@2.3.0:
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
dev: false
/domhandler@4.3.1:
resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==}
engines: {node: '>= 4'}
dependencies:
domelementtype: 2.3.0
dev: false
/domutils@2.8.0:
resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==}
dependencies:
dom-serializer: 1.4.1
domelementtype: 2.3.0
domhandler: 4.3.1
dev: false
/electron-to-chromium@1.4.478:
resolution: {integrity: sha512-qjTA8djMXd+ruoODDFGnRCRBpID+AAfYWCyGtYTNhsuwxI19s8q19gbjKTwRS5z/LyVf5wICaIiPQGLekmbJbA==}
dev: false
/entities@2.2.0:
resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==}
dev: false
/esbuild@0.18.16:
resolution: {integrity: sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==}
engines: {node: '>=12'}
@ -493,6 +677,11 @@ packages:
'@esbuild/win32-x64': 0.18.16
dev: true
/escalade@3.1.1:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
engines: {node: '>=6'}
dev: false
/estree-walker@2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
@ -532,12 +721,23 @@ packages:
requiresBuild: true
optional: true
/function-bind@1.1.1:
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
dev: false
/glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
dependencies:
is-glob: 4.0.3
/has@1.0.3:
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
engines: {node: '>= 0.4.0'}
dependencies:
function-bind: 1.1.1
dev: false
/immutable@4.3.1:
resolution: {integrity: sha512-lj9cnmB/kVS0QHsJnYKD1uo3o39nrbKxszjnqS9Fr6NB7bZzW45U6WSGBPKXDL/CvDKqDNPA4r3DoDQ8GTxo2A==}
@ -547,6 +747,12 @@ packages:
dependencies:
binary-extensions: 2.2.0
/is-core-module@2.12.1:
resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==}
dependencies:
has: 1.0.3
dev: false
/is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'}
@ -561,12 +767,29 @@ packages:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
/lilconfig@2.1.0:
resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==}
engines: {node: '>=10'}
dev: false
/lodash.memoize@4.1.2:
resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==}
dev: false
/lodash.uniq@4.5.0:
resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==}
dev: false
/magic-string@0.30.1:
resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==}
engines: {node: '>=12'}
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
/mdn-data@2.0.14:
resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==}
dev: false
/mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
@ -584,15 +807,42 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
/node-releases@2.0.13:
resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==}
dev: false
/normalize-path@3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'}
/normalize-url@6.1.0:
resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==}
engines: {node: '>=10'}
dev: false
/notivue@1.1.3:
resolution: {integrity: sha512-Pjn3sRmqzcvkPorlcv1FyoUbtfCmv6u6Sn/0THdYzjW9Mt6W43Sq1q5HnC6WBzTqEofNW0ggTYWoyilMn/6h6Q==}
requiresBuild: true
dev: false
/nth-check@2.1.1:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
dependencies:
boolbase: 1.0.0
dev: false
/path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
dev: false
/perfect-scrollbar@1.5.5:
resolution: {integrity: sha512-dzalfutyP3e/FOpdlhVryN4AJ5XDVauVWxybSkLZmakFE2sS3y3pc4JnSprw8tGmHvkaG5Edr5T7LBTZ+WWU2g==}
dev: false
/picocolors@0.2.1:
resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==}
dev: false
/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
@ -600,6 +850,11 @@ packages:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'}
/pify@2.3.0:
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
engines: {node: '>=0.10.0'}
dev: false
/pinia-plugin-persistedstate@3.2.0(pinia@2.1.4):
resolution: {integrity: sha512-tZbNGf2vjAQcIm7alK40sE51Qu/m9oWr+rEgNm/2AWr1huFxj72CjvpQcIQzMknDBJEkQznCLAGtJTIcLKrKdw==}
peerDependencies:
@ -625,6 +880,322 @@ packages:
vue-demi: 0.14.5(vue@3.3.4)
dev: false
/postcss-calc@8.2.4(postcss@8.4.27):
resolution: {integrity: sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==}
peerDependencies:
postcss: ^8.2.2
dependencies:
postcss: 8.4.27
postcss-selector-parser: 6.0.13
postcss-value-parser: 4.2.0
dev: false
/postcss-colormin@5.3.1(postcss@8.4.27):
resolution: {integrity: sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
caniuse-api: 3.0.0
colord: 2.9.3
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-convert-values@5.1.3(postcss@8.4.27):
resolution: {integrity: sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-discard-comments@5.1.2(postcss@8.4.27):
resolution: {integrity: sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
dev: false
/postcss-discard-duplicates@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
dev: false
/postcss-discard-empty@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
dev: false
/postcss-discard-overridden@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
dev: false
/postcss-import@12.0.1:
resolution: {integrity: sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==}
engines: {node: '>=6.0.0'}
dependencies:
postcss: 7.0.39
postcss-value-parser: 3.3.1
read-cache: 1.0.0
resolve: 1.22.2
dev: false
/postcss-merge-longhand@5.1.7(postcss@8.4.27):
resolution: {integrity: sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
stylehacks: 5.1.1(postcss@8.4.27)
dev: false
/postcss-merge-rules@5.1.4(postcss@8.4.27):
resolution: {integrity: sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
caniuse-api: 3.0.0
cssnano-utils: 3.1.0(postcss@8.4.27)
postcss: 8.4.27
postcss-selector-parser: 6.0.13
dev: false
/postcss-minify-font-values@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-minify-gradients@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
colord: 2.9.3
cssnano-utils: 3.1.0(postcss@8.4.27)
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-minify-params@5.1.4(postcss@8.4.27):
resolution: {integrity: sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
cssnano-utils: 3.1.0(postcss@8.4.27)
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-minify-selectors@5.2.1(postcss@8.4.27):
resolution: {integrity: sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-selector-parser: 6.0.13
dev: false
/postcss-normalize-charset@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
dev: false
/postcss-normalize-display-values@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-positions@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-repeat-style@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-string@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-timing-functions@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-unicode@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-url@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
normalize-url: 6.1.0
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-normalize-whitespace@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-ordered-values@5.1.3(postcss@8.4.27):
resolution: {integrity: sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
cssnano-utils: 3.1.0(postcss@8.4.27)
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-reduce-initial@5.1.2(postcss@8.4.27):
resolution: {integrity: sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
caniuse-api: 3.0.0
postcss: 8.4.27
dev: false
/postcss-reduce-transforms@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
dev: false
/postcss-selector-parser@6.0.13:
resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==}
engines: {node: '>=4'}
dependencies:
cssesc: 3.0.0
util-deprecate: 1.0.2
dev: false
/postcss-svgo@5.1.0(postcss@8.4.27):
resolution: {integrity: sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-value-parser: 4.2.0
svgo: 2.8.0
dev: false
/postcss-unique-selectors@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
postcss: 8.4.27
postcss-selector-parser: 6.0.13
dev: false
/postcss-value-parser@3.3.1:
resolution: {integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==}
dev: false
/postcss-value-parser@4.2.0:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
dev: false
/postcss@7.0.39:
resolution: {integrity: sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==}
engines: {node: '>=6.0.0'}
dependencies:
picocolors: 0.2.1
source-map: 0.6.1
dev: false
/postcss@8.4.27:
resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==}
engines: {node: ^10 || ^12 || >=14}
@ -637,12 +1208,27 @@ packages:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
dev: false
/read-cache@1.0.0:
resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==}
dependencies:
pify: 2.3.0
dev: false
/readdirp@3.6.0:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
engines: {node: '>=8.10.0'}
dependencies:
picomatch: 2.3.1
/resolve@1.22.2:
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
hasBin: true
dependencies:
is-core-module: 2.12.1
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
dev: false
/rollup@3.26.3:
resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
@ -674,7 +1260,41 @@ packages:
/source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
dev: true
/stable@0.1.8:
resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==}
deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility'
dev: false
/stylehacks@5.1.1(postcss@8.4.27):
resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==}
engines: {node: ^10 || ^12 || >=14.0}
peerDependencies:
postcss: ^8.2.15
dependencies:
browserslist: 4.21.10
postcss: 8.4.27
postcss-selector-parser: 6.0.13
dev: false
/supports-preserve-symlinks-flag@1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
dev: false
/svgo@2.8.0:
resolution: {integrity: sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==}
engines: {node: '>=10.13.0'}
hasBin: true
dependencies:
'@trysound/sax': 0.2.0
commander: 7.2.0
css-select: 4.3.0
css-tree: 1.1.3
csso: 4.2.0
picocolors: 1.0.0
stable: 0.1.8
dev: false
/terser@5.19.2:
resolution: {integrity: sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==}
@ -697,6 +1317,21 @@ packages:
dependencies:
is-number: 7.0.0
/update-browserslist-db@1.0.11(browserslist@4.21.10):
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
browserslist: 4.21.10
escalade: 3.1.1
picocolors: 1.0.0
dev: false
/util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: false
/vite@4.4.6(sass@1.64.1)(terser@5.19.2):
resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==}
engines: {node: ^14.18.0 || >=16.0.0}
@ -749,6 +1384,16 @@ packages:
vue: 3.3.4
dev: false
/vue3-perfect-scrollbar@1.6.1(postcss@8.4.27):
resolution: {integrity: sha512-r9wfxlFwVyHXMPKG0PnR7fDfJPQ20KEVzKQfSU5by2WKYz2PwV0bTfyfejmEyZXsXL0O8VtSWtgxfPuFR2AGOg==}
dependencies:
cssnano: 5.1.15(postcss@8.4.27)
perfect-scrollbar: 1.5.5
postcss-import: 12.0.1
transitivePeerDependencies:
- postcss
dev: false
/vue@3.3.4:
resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==}
dependencies:
@ -757,3 +1402,8 @@ packages:
'@vue/runtime-dom': 3.3.4
'@vue/server-renderer': 3.3.4(vue@3.3.4)
'@vue/shared': 3.3.4
/yaml@1.10.2:
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
engines: {node: '>= 6'}
dev: false

View File

@ -0,0 +1,67 @@
{
"baidu": {
"name": "百度",
"url": "https://www.baidu.com/s?wd=",
"icon": "baidu"
},
"bing": {
"name": "必应",
"url": "https://www.bing.com/search?q=",
"icon": "bing"
},
"google": {
"name": "谷歌",
"url": "https://www.google.com/search?q=",
"icon": "google"
},
"sogou": {
"name": "搜狗",
"url": "https://www.sogou.com/sogou?query=",
"icon": "sogou"
},
"duckduckgo": {
"name": "DuckDuckGo",
"url": "https://duckduckgo.com/?q=",
"icon": "duckduckgo"
},
"yandex": {
"name": "Yandex",
"url": "https://yandex.com/search/?text=",
"icon": "yandex"
},
"search-360": {
"name": "360 搜索",
"url": "https://www.so.com/s?q=",
"icon": "search-360"
},
"weibo": {
"name": "微博",
"url": "https://s.weibo.com/weibo?q=",
"icon": "weibo"
},
"bilibili": {
"name": "BiliBili",
"url": "https://search.bilibili.com/all?keyword=",
"icon": "bilibili"
},
"github": {
"name": "Github",
"url": "https://github.com/search?q=",
"icon": "github"
},
"zhihu": {
"name": "知乎",
"url": "https://www.zhihu.com/search?q=",
"icon": "zhihu"
},
"jingdong": {
"name": "京东",
"url": "https://search.jd.com/Search?keyword=",
"icon": "jingdong"
},
"taobao": {
"name": "淘宝",
"url": "https://s.taobao.com/search?q=",
"icon": "taobao"
}
}

View File

@ -0,0 +1,98 @@
<template>
<Transition name="fadeDown" mode="out-in">
<div v-if="status.engineChangeStatus" class="engine-choose">
<perfect-scrollbar class="scrollbar">
<div class="all-engine">
<div
v-for="(item, key) in defaultEngine"
:key="key"
class="engine"
@click="changeSearchEngine(key)"
>
<SvgIcon :iconName="`icon-${key}`" />
<span class="name">{{ item.name }}</span>
</div>
</div>
</perfect-scrollbar>
</div>
</Transition>
</template>
<script setup>
import { statusStore, setStore } from "@/stores";
import defaultEngine from "@/assets/defaultEngine.json";
const set = setStore();
const status = statusStore();
//
const changeSearchEngine = (key) => {
//
const mainInput = document.getElementById("main-input");
//
set.setSearchEngine(key);
status.setEngineChangeStatus(false);
mainInput?.focus();
};
</script>
<style lang="scss" scoped>
.engine-choose {
position: absolute;
top: 0;
left: 0;
width: 100%;
color: var(--main-text-color);
background-color: var(--main-background-light-color);
backdrop-filter: blur(30px) saturate(1.25);
border-radius: 16px;
box-sizing: border-box;
z-index: 1;
overflow: hidden;
.scrollbar {
padding: 10px;
max-height: 44vh;
.all-engine {
display: grid;
gap: 10px;
grid-template-columns: repeat(4, minmax(0px, 1fr));
.engine {
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 40px;
padding: 0 16px;
grid-column: span 1 / span 1;
border-radius: 10px;
box-sizing: border-box;
background-color: var(--main-background-light-color);
transition: background-color 0.3s, box-shadow 0.3s;
.i-icon {
margin-right: 12px;
}
.name {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:hover {
background-color: var(--main-background-hover-color);
box-shadow: 0 0 0px 2px #ffffff30;
}
}
@media (max-width: 798px) {
grid-template-columns: repeat(3, minmax(0px, 1fr));
}
@media (max-width: 580px) {
grid-template-columns: repeat(2, minmax(0px, 1fr));
}
}
:deep(.ps__rail-y) {
display: none;
}
}
}
</style>

View File

@ -12,8 +12,11 @@
@animationstart="inputClickable = true"
@animationend="inputAnimationEnd"
>
<div class="engine" title="切换搜索引擎">
<SvgIcon iconName="icon-baidu" className="baidu" />
<div class="engine" title="切换搜索引擎" @click="changeEngine">
<SvgIcon
:iconName="`icon-${defaultEngine[set.searchEngine].icon}`"
className="baidu"
/>
</div>
<input
class="input"
@ -26,12 +29,15 @@
:placeholder="inputTip"
v-model="inputValue"
@focus="status.setSiteStatus('focus')"
@click.stop="status.setEngineChangeStatus(false)"
@keydown.stop="pressKeyboard"
/>
<div class="go" title="搜索" @click="toSearch(inputValue)">
<SvgIcon iconName="icon-search" className="search" />
</div>
</div>
<!-- 搜索引擎 -->
<SearchEngine />
<!-- 搜索建议 -->
<Suggestions
ref="suggestionsRef"
@ -45,7 +51,9 @@
import { ref } from "vue";
import { usePush } from "notivue";
import { statusStore, setStore } from "@/stores";
import SearchEngine from "@/components/SearchEngine.vue";
import Suggestions from "@/components/Suggestions.vue";
import defaultEngine from "@/assets/defaultEngine.json";
const set = setStore();
const status = statusStore();
@ -66,6 +74,7 @@ const suggestionsRef = ref(null);
//
const closeSearchInput = () => {
status.setSiteStatus("normal");
status.setEngineChangeStatus(false);
searchInputRef.value?.blur();
inputValue.value = "";
};
@ -84,12 +93,12 @@ const toSearch = (val, type = 1) => {
//
if (searchValue) {
console.log("前往搜索:" + searchValue, type);
// type
// 1 / 2 / 3 / 4 访
//
switch (type) {
case 1:
jumpLink(`https://www.bing.com/search?q=${searchValue}`);
const engine = defaultEngine[set.searchEngine];
const value = encodeURIComponent(searchValue);
jumpLink(engine.url + value);
break;
case 2:
jumpLink(`https://fanyi.baidu.com/#en/zh/${searchValue}`);
@ -130,11 +139,15 @@ const inputAnimationEnd = () => {
const pressKeyboard = (event) => {
//
const keyCode = event.keyCode;
// 13
if (keyCode === 13) toSearch();
//
suggestionsRef.value?.keyboardEvents(keyCode, event);
};
//
const changeEngine = () => {
status.setSiteStatus("focus");
status.setEngineChangeStatus(!status.engineChangeStatus);
};
</script>
<style lang="scss" scoped>
@ -170,7 +183,7 @@ const pressKeyboard = (event) => {
z-index: 1;
&.focus {
transform: translateY(-50px);
background-color: var(--main-background-hover-color);
background-color: var(--main-input-hover-color);
.input {
color: var(--main-text-hover-color);
&::placeholder {

View File

@ -3,12 +3,14 @@
<div
v-if="
set.showSuggestions &&
searchKeyword !== null &&
status.siteStatus === 'focus' &&
searchKeyword !== null
!status.engineChangeStatus
"
class="suggestions"
:style="{ height: `${suggestionsHeights}px` }"
>
<perfect-scrollbar class="scrollbar">
<!-- 快捷操作 -->
<Transition
name="fade"
@ -78,6 +80,7 @@
</div>
</div>
</Transition>
</perfect-scrollbar>
</div>
</Transition>
</template>
@ -121,6 +124,8 @@ const keywordsSearch = debounce((val) => {
searchKeyword.value = null;
return false;
}
//
status.setEngineChangeStatus(false);
//
searchKeyword.value = searchValue;
//
@ -231,17 +236,16 @@ defineExpose({ keyboardEvents });
top: 0;
left: 0;
width: 100%;
max-height: 44vh;
overflow-y: scroll;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
color: var(--main-text-color);
background-color: var(--main-background-light-color);
backdrop-filter: blur(30px) saturate(1.25);
border-radius: 16px;
overflow: hidden;
transition: height 0.2s ease, opacity 0.3s ease, transform 0.3s ease;
z-index: 1;
.scrollbar {
max-height: 44vh;
.all-result,
.special-result {
.s-result {
@ -276,9 +280,6 @@ defineExpose({ keyboardEvents });
}
}
}
&::-webkit-scrollbar {
width: 0;
height: 0;
}
}
</style>

View File

@ -36,6 +36,7 @@ const svgClass = computed(() => {
.i-icon {
width: 1em;
height: 1em;
min-width: 1em;
position: relative;
fill: currentColor;
vertical-align: -2px;

View File

@ -3,6 +3,7 @@
:class="
status.siteStatus !== 'normal' ? 'weather-time focus' : 'weather-time'
"
@click.stop
>
<div :class="['time', set.timeStyle]">
<span class="hour">{{ timeData.hour ?? "00" }}</span>
@ -112,6 +113,7 @@ onBeforeUnmount(() => {
color: var(--main-text-color);
animation: fade-time-in 0.6s cubic-bezier(0.21, 0.78, 0.36, 1);
transition: transform 0.3s;
z-index: 1;
&.focus {
transform: translateY(-170px);
}

View File

@ -8,6 +8,9 @@ import "@/utils/iconfont.js";
// Notivue
import { notivue } from "notivue";
import "notivue/notifications.css";
// PerfectScrollbar
import PerfectScrollbar from "vue3-perfect-scrollbar";
import "vue3-perfect-scrollbar/dist/vue3-perfect-scrollbar.css";
// 主组件
import App from "@/App.vue";
@ -32,5 +35,6 @@ app.use(notivue, {
clearAll: "notivue-fade",
},
});
app.use(PerfectScrollbar);
app.component("SvgIcon", SvgIcon);
app.mount("#app");

View File

@ -9,8 +9,8 @@ const useSetDataStore = defineStore("setData", {
// 壁纸遮罩
showBackgroundGray: true,
// 默认搜索引擎
searchEngine: null,
lastSearchEngine: null,
searchEngine: "bing",
lastSearchEngine: "bing",
// 清空搜索框
showCleanInput: true,
// 搜索框自动 focus
@ -26,6 +26,14 @@ const useSetDataStore = defineStore("setData", {
urlJumpType: "href",
};
},
actions: {
setSearchEngine(value) {
// 储存上次
this.lastSearchEngine = this.searchEngine;
// 设置新引擎
this.searchEngine = value;
},
},
// 开启数据持久化
persist: {
key: "setData",

View File

@ -8,6 +8,8 @@ const useStatusDataStore = defineStore("statusData", {
// 站点状态
// normal 正常 / focus 搜索 / box 盒子 / set 设置
siteStatus: "normal",
// 切换搜索引擎
engineChangeStatus: false,
};
},
getters: {},
@ -18,6 +20,9 @@ const useStatusDataStore = defineStore("statusData", {
setSiteStatus(value) {
this.siteStatus = value;
},
setEngineChangeStatus(value) {
this.engineChangeStatus = value;
},
},
});

View File

@ -5,7 +5,8 @@
--main-text-hover-color: #555555;
--main-background-color: #00000040;
--main-background-light-color: #ffffff30;
--main-background-hover-color: #ffffff;
--main-background-hover-color: #ffffff70;
--main-input-hover-color: #ffffff;
--main-text-shadow: 0px 0px 8px #00000066;
}
@ -45,6 +46,10 @@ body {
transition: opacity 0.3s ease, transform 0.3s ease;
}
.fadeDown-enter-active {
transition-delay: 0.2s;
}
.fadeDown-enter-from,
.fadeDown-leave-to {
opacity: 0;
@ -204,17 +209,9 @@ body {
}
// 滚动条
::-webkit-scrollbar {
background-color: transparent;
width: 6px;
.ps__rail-y {
.ps__thumb-y {
right: 0;
background-color: var(--main-background-light-color);
}
::-webkit-scrollbar-track {
display: none;
}
::-webkit-scrollbar-thumb {
border-radius: 12px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: var(--main-background-color);
}

File diff suppressed because one or more lines are too long