Merge branch 'main' into example

This commit is contained in:
Soybean 2024-10-17 17:24:49 +08:00
commit 641f3160d6
8 changed files with 34 additions and 11 deletions

View File

@ -6,9 +6,6 @@
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"editorconfig.editorconfig", "editorconfig.editorconfig",
"esbenp.prettier-vscode", "esbenp.prettier-vscode",
"formulahendry.auto-close-tag",
"formulahendry.auto-complete-tag",
"formulahendry.auto-rename-tag",
"lokalise.i18n-ally", "lokalise.i18n-ally",
"mhutchie.git-graph", "mhutchie.git-graph",
"mikestead.dotenv", "mikestead.dotenv",

View File

@ -3,7 +3,9 @@
"version": "0.1.0", "version": "0.1.0",
"exports": { "exports": {
".": "./src/index.ts", ".": "./src/index.ts",
"./client": "./src/client.ts" "./fetch": "./src/fetch.ts",
"./client": "./src/client.ts",
"./mock": "./src/mock.ts"
}, },
"typesVersions": { "typesVersions": {
"*": { "*": {
@ -11,6 +13,7 @@
} }
}, },
"dependencies": { "dependencies": {
"@alova/mock": "2.0.7",
"@sa/utils": "workspace:*", "@sa/utils": "workspace:*",
"alova": "3.0.20" "alova": "3.0.20"
} }

View File

@ -0,0 +1,2 @@
import adapterFetch from 'alova/fetch';
export default adapterFetch;

View File

@ -0,0 +1 @@
export * from '@alova/mock';

View File

@ -213,6 +213,9 @@ importers:
packages/alova: packages/alova:
dependencies: dependencies:
'@alova/mock':
specifier: 2.0.7
version: 2.0.7(alova@3.0.20)
'@sa/utils': '@sa/utils':
specifier: workspace:* specifier: workspace:*
version: link:../utils version: link:../utils
@ -335,9 +338,17 @@ importers:
packages: packages:
'@alova/mock@2.0.7':
resolution: {integrity: sha512-4W8Ncsmj7cdjzZk7f2zFqc32aoYQNoDJS3z7W0nqAkTJ7KR8ZiGaHA5dJovyXnLphmTeyWS3yHMVWnesI7y4ig==}
peerDependencies:
alova: ^3.0.20
'@alova/shared@1.0.5': '@alova/shared@1.0.5':
resolution: {integrity: sha512-/a2Qm+xebQJ1OlIgpslK+UL1J7yhkt1/Mqdq58a22+fSVdANukmUcF4j4w1DF3lxZ04SrqP+2oJprJ8UOvM+9Q==} resolution: {integrity: sha512-/a2Qm+xebQJ1OlIgpslK+UL1J7yhkt1/Mqdq58a22+fSVdANukmUcF4j4w1DF3lxZ04SrqP+2oJprJ8UOvM+9Q==}
'@alova/shared@1.0.6':
resolution: {integrity: sha512-W89j64InjFIsW/u5YmYvpXGWz8JerBAYWyu/Fc7xfc5B+95SSA3ybW4nyHacBUW6yYQyGZwa8S8bVPePqa7bmA==}
'@amap/amap-jsapi-types@0.0.15': '@amap/amap-jsapi-types@0.0.15':
resolution: {integrity: sha512-oqyRqHpVDZh5bUe2mAJh41ZsziSj0eUzwcfIbiaBNB0eiTJnZNhKsTdk77VOklOjwuwNfsblpKW9LjmWNpeQ7A==} resolution: {integrity: sha512-oqyRqHpVDZh5bUe2mAJh41ZsziSj0eUzwcfIbiaBNB0eiTJnZNhKsTdk77VOklOjwuwNfsblpKW9LjmWNpeQ7A==}
@ -3570,8 +3581,8 @@ packages:
peerDependencies: peerDependencies:
vue: ^3.0.0 vue: ^3.0.0
nan@2.20.0: nan@2.22.0:
resolution: {integrity: sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==} resolution: {integrity: sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==}
nanoid@3.3.7: nanoid@3.3.7:
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
@ -4947,8 +4958,15 @@ packages:
snapshots: snapshots:
'@alova/mock@2.0.7(alova@3.0.20)':
dependencies:
'@alova/shared': 1.0.6
alova: 3.0.20
'@alova/shared@1.0.5': {} '@alova/shared@1.0.5': {}
'@alova/shared@1.0.6': {}
'@amap/amap-jsapi-types@0.0.15': {} '@amap/amap-jsapi-types@0.0.15': {}
'@ampproject/remapping@2.3.0': '@ampproject/remapping@2.3.0':
@ -6555,7 +6573,7 @@ snapshots:
canvas@2.11.2: canvas@2.11.2:
dependencies: dependencies:
'@mapbox/node-pre-gyp': 1.0.11 '@mapbox/node-pre-gyp': 1.0.11
nan: 2.20.0 nan: 2.22.0
simple-get: 3.1.1 simple-get: 3.1.1
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
@ -8612,7 +8630,7 @@ snapshots:
vue: 3.5.11(typescript@5.6.3) vue: 3.5.11(typescript@5.6.3)
vueuc: 0.4.64(vue@3.5.11(typescript@5.6.3)) vueuc: 0.4.64(vue@3.5.11(typescript@5.6.3))
nan@2.20.0: nan@2.22.0:
optional: true optional: true
nanoid@3.3.7: {} nanoid@3.3.7: {}

View File

@ -113,7 +113,7 @@ const local: App.I18n.Schema = {
}, },
tab: { tab: {
visible: 'Tab Visible', visible: 'Tab Visible',
cache: 'Tab Cache', cache: 'Tag Bar Info Cache',
height: 'Tab Height', height: 'Tab Height',
mode: { mode: {
title: 'Tab Mode', title: 'Tab Mode',

View File

@ -113,7 +113,7 @@ const local: App.I18n.Schema = {
}, },
tab: { tab: {
visible: '显示标签栏', visible: '显示标签栏',
cache: '缓存标签页', cache: '标签栏信息缓存',
height: '标签栏高度', height: '标签栏高度',
mode: { mode: {
title: '标签栏风格', title: '标签栏风格',

View File

@ -1,5 +1,7 @@
export function isPC() { export function isPC() {
const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']; const agents = ['Android', 'iPhone', 'webOS', 'BlackBerry', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
return !agents.includes(window.navigator.userAgent); const isMobile = agents.some(agent => window.navigator.userAgent.includes(agent));
return !isMobile;
} }