283 changed files with 1378 additions and 1672 deletions
@ -1,10 +1,10 @@ |
|||||
/** |
/** |
||||
* 该文件可自行根据业务逻辑进行调整 |
* 该文件可自行根据业务逻辑进行调整 |
||||
*/ |
*/ |
||||
import type { HttpResponse } from '@vben-core/request'; |
import type { HttpResponse } from '@vben/request'; |
||||
|
|
||||
import { preferences } from '@vben-core/preferences'; |
import { preferences } from '@vben/preferences'; |
||||
import { RequestClient } from '@vben-core/request'; |
import { RequestClient } from '@vben/request'; |
||||
|
|
||||
import { message } from 'ant-design-vue'; |
import { message } from 'ant-design-vue'; |
||||
|
|
||||
@ -1,11 +0,0 @@ |
|||||
# forward |
|
||||
|
|
||||
用于扩展、转发大仓的包以及其他功能,方便在app内自定义不同的逻辑 |
|
||||
|
|
||||
## request |
|
||||
|
|
||||
用于扩展请求的功能,例如添加header、错误响应等 |
|
||||
|
|
||||
## locale |
|
||||
|
|
||||
用于扩展国际化的功能,例如扩展 dayjs、antd组件库的多语言切换 |
|
||||
@ -1,2 +0,0 @@ |
|||||
export * from './access'; |
|
||||
export * from './request'; |
|
||||
@ -1,9 +1,10 @@ |
|||||
<script lang="ts" setup> |
<script lang="ts" setup> |
||||
import { AuthenticationQrCodeLogin } from '@vben/common-ui'; |
import { AuthenticationQrCodeLogin } from '@vben/common-ui'; |
||||
|
import { LOGIN_PATH } from '@vben/constants'; |
||||
|
|
||||
defineOptions({ name: 'QrCodeLogin' }); |
defineOptions({ name: 'QrCodeLogin' }); |
||||
</script> |
</script> |
||||
|
|
||||
<template> |
<template> |
||||
<AuthenticationQrCodeLogin /> |
<AuthenticationQrCodeLogin :login-path="LOGIN_PATH" /> |
||||
</template> |
</template> |
||||
|
|||||
@ -1,7 +0,0 @@ |
|||||
# @vben-core/forward |
|
||||
|
|
||||
该目录内的包,可直接被app所引用,其是项目基础功能的一层抽象。允许轻微的副作用耦合,如`locales`的集成。 |
|
||||
|
|
||||
## 注意事项 |
|
||||
|
|
||||
- `forward` 内的包不允许相互引用,有相互引用的情况请考虑是否放到`packages/effects`下 |
|
||||
@ -1,43 +0,0 @@ |
|||||
{ |
|
||||
"name": "@vben-core/helpers", |
|
||||
"version": "5.0.0", |
|
||||
"homepage": "https://github.com/vbenjs/vue-vben-admin", |
|
||||
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues", |
|
||||
"repository": { |
|
||||
"type": "git", |
|
||||
"url": "git+https://github.com/vbenjs/vue-vben-admin.git", |
|
||||
"directory": "packages/@vben-core/forward/helpers" |
|
||||
}, |
|
||||
"license": "MIT", |
|
||||
"type": "module", |
|
||||
"scripts": { |
|
||||
"build": "pnpm unbuild", |
|
||||
"stub": "pnpm unbuild --stub" |
|
||||
}, |
|
||||
"files": [ |
|
||||
"dist" |
|
||||
], |
|
||||
"sideEffects": false, |
|
||||
"main": "./dist/index.mjs", |
|
||||
"module": "./dist/index.mjs", |
|
||||
"exports": { |
|
||||
".": { |
|
||||
"types": "./src/index.ts", |
|
||||
"development": "./src/index.ts", |
|
||||
"default": "./dist/index.mjs" |
|
||||
} |
|
||||
}, |
|
||||
"publishConfig": { |
|
||||
"exports": { |
|
||||
".": { |
|
||||
"types": "./dist/index.d.ts", |
|
||||
"default": "./dist/index.mjs" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"dependencies": { |
|
||||
"@vben-core/toolkit": "workspace:*", |
|
||||
"@vben-core/typings": "workspace:*", |
|
||||
"vue-router": "^4.4.0" |
|
||||
} |
|
||||
} |
|
||||
@ -1,9 +0,0 @@ |
|||||
{ |
|
||||
"$schema": "https://json.schemastore.org/tsconfig", |
|
||||
"extends": "@vben/tsconfig/web.json", |
|
||||
"compilerOptions": { |
|
||||
"types": ["@vben-core/typings/vue-router"] |
|
||||
}, |
|
||||
"include": ["src"], |
|
||||
"exclude": ["node_modules"] |
|
||||
} |
|
||||
@ -1,29 +0,0 @@ |
|||||
import { createPinia } from 'pinia'; |
|
||||
|
|
||||
interface InitStoreOptions { |
|
||||
/** |
|
||||
* @zh_CN 应用名,由于 @vben-core/stores 是公用的,后续可能有多个app,为了防止多个app缓存冲突,可在这里配置应用名,应用名将被用于持久化的前缀 |
|
||||
*/ |
|
||||
namespace: string; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* @zh_CN 初始化pinia |
|
||||
*/ |
|
||||
async function initStore(options: InitStoreOptions) { |
|
||||
const { createPersistedState } = await import('pinia-plugin-persistedstate'); |
|
||||
const pinia = createPinia(); |
|
||||
const { namespace } = options; |
|
||||
pinia.use( |
|
||||
createPersistedState({ |
|
||||
// key $appName-$store.id
|
|
||||
key: (storeKey) => `${namespace}-${storeKey}`, |
|
||||
storage: localStorage, |
|
||||
}), |
|
||||
); |
|
||||
return pinia; |
|
||||
} |
|
||||
|
|
||||
export { initStore }; |
|
||||
|
|
||||
export type { InitStoreOptions }; |
|
||||
@ -1,7 +1,7 @@ |
|||||
import { beforeEach, describe, expect, it, vi } from 'vitest'; |
import { beforeEach, describe, expect, it, vi } from 'vitest'; |
||||
|
|
||||
import { defaultPreferences } from './config'; |
import { defaultPreferences } from './config'; |
||||
import { PreferenceManager, isDarkTheme } from './preferences'; |
import { isDarkTheme, PreferenceManager } from './preferences'; |
||||
|
|
||||
describe('preferences', () => { |
describe('preferences', () => { |
||||
let preferenceManager: PreferenceManager; |
let preferenceManager: PreferenceManager; |
||||
@ -1,3 +1,3 @@ |
|||||
export { default as Badge } from './Badge.vue'; |
|
||||
|
|
||||
export * from './badge'; |
export * from './badge'; |
||||
|
|
||||
|
export { default as Badge } from './Badge.vue'; |
||||
|
|||||
@ -1,3 +1,3 @@ |
|||||
export { default as Button } from './Button.vue'; |
|
||||
|
|
||||
export * from './button'; |
export * from './button'; |
||||
|
|
||||
|
export { default as Button } from './Button.vue'; |
||||
|
|||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue