chore(merge): Merge Soybean v2.1.0
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.ai_state/
|
||||
.claude/
|
||||
.codex/
|
||||
docs
|
||||
public/streamsaver/
|
||||
@@ -1,7 +1,7 @@
|
||||
name: 🐞 Bug提交
|
||||
description: 在使用软件或功能的过程中遇到了错误
|
||||
title: '[Bug]: '
|
||||
labels: [ "bug?" ]
|
||||
labels: ['bug?']
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: 🐞 Bug Report
|
||||
description: Encountered an error while using the software or feature
|
||||
title: '[Bug]: '
|
||||
labels: [ "bug?" ]
|
||||
labels: ['bug?']
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: 🚀 功能请求
|
||||
description: 提出一个想法以帮助我们改进W&B
|
||||
title: "[功能]: "
|
||||
title: '[功能]: '
|
||||
labels:
|
||||
- "功能请求"
|
||||
- '功能请求'
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: 🚀 Feature Request
|
||||
description: Suggest an idea to help us improve W&B
|
||||
title: "[Feature]: "
|
||||
title: '[Feature]: '
|
||||
labels:
|
||||
- "feature_request"
|
||||
- 'feature_request'
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: 🐞 Bug提交
|
||||
description: 在使用软件或功能的过程中遇到了错误
|
||||
title: '[Bug]: '
|
||||
labels: [ "bug?" ]
|
||||
labels: ['bug?']
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: 🐞 Bug Report
|
||||
description: Encountered an error while using the software or feature
|
||||
title: '[Bug]: '
|
||||
labels: [ "bug?" ]
|
||||
labels: ['bug?']
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: 🚀 功能请求
|
||||
description: 提出一个想法以帮助我们改进W&B
|
||||
title: "[功能]: "
|
||||
title: '[功能]: '
|
||||
labels:
|
||||
- "功能请求"
|
||||
- '功能请求'
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: 🚀 Feature Request
|
||||
description: Suggest an idea to help us improve W&B
|
||||
title: "[Feature]: "
|
||||
title: '[Feature]: '
|
||||
labels:
|
||||
- "feature_request"
|
||||
- 'feature_request'
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
branches: ['master']
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
@@ -17,35 +17,35 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.x
|
||||
run_install: false
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.x
|
||||
run_install: false
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: 'pnpm'
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build project
|
||||
run: pnpm build
|
||||
- name: Build project
|
||||
run: pnpm build
|
||||
|
||||
- name: Upload via SCP
|
||||
uses: appleboy/scp-action@v1
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
source: "dist/*"
|
||||
target: ${{ secrets.TARGET_PATH }}
|
||||
rm: true
|
||||
overwrite: true
|
||||
- name: Upload via SCP
|
||||
uses: appleboy/scp-action@v1
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
source: 'dist/*'
|
||||
target: ${{ secrets.TARGET_PATH }}
|
||||
rm: true
|
||||
overwrite: true
|
||||
|
||||
@@ -6,7 +6,7 @@ permissions:
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"ignorePatterns": [
|
||||
"src/typings/components.d.ts",
|
||||
"src/typings/elegant-router.d.ts",
|
||||
"src/router/elegant",
|
||||
".ai_state",
|
||||
".claude",
|
||||
".codex",
|
||||
"doc",
|
||||
"public/streamsaver"
|
||||
],
|
||||
"printWidth": 120,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"arrowParens": "avoid",
|
||||
"htmlWhitespaceSensitivity": "ignore",
|
||||
"experimentalSortPackageJson": {
|
||||
"sortScripts": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"categories": {
|
||||
"correctness": "error",
|
||||
"suspicious": "error"
|
||||
},
|
||||
"plugins": ["eslint", "typescript", "unicorn", "oxc", "import", "vue"],
|
||||
"rules": {
|
||||
"import/no-unassigned-import": "off",
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/no-array-sort": "off",
|
||||
"unicorn/no-array-reverse": "off",
|
||||
"unicorn/require-module-specifiers": "off"
|
||||
}
|
||||
}
|
||||
Vendored
+5
-19
@@ -1,21 +1,11 @@
|
||||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
"source.fixAll.oxc": "explicit"
|
||||
},
|
||||
"editor.formatOnSave": false,
|
||||
"eslint.validate": [
|
||||
"html",
|
||||
"css",
|
||||
"scss",
|
||||
"json",
|
||||
"jsonc",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"vue"
|
||||
],
|
||||
"editor.defaultFormatter": "oxc.oxc-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"eslint.validate": ["vue"],
|
||||
"i18n-ally.displayLanguage": "zh-cn",
|
||||
"i18n-ally.enabledParsers": ["ts"],
|
||||
"i18n-ally.enabledFrameworks": ["vue"],
|
||||
@@ -26,13 +16,9 @@
|
||||
"moduleResolution": "node"
|
||||
},
|
||||
"prettier.enable": false,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"unocss.root": ["./"],
|
||||
"vue.server.hybridMode": true,
|
||||
"files.exclude": { "/docs": true },
|
||||
"search.exclude": {
|
||||
"/docs": true,
|
||||
"**/dist/**": true
|
||||
},
|
||||
"cSpell.words": ["Axios", "tinymce"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,7 +487,6 @@
|
||||
[](https://gitee.com/xlsea) [](https://github.com/soybeanjs) [](https://github.com/wenyuanw) [](https://gitee.com/elio-an) [](https://github.com/chen-ziwen)
|
||||
[](https://gitee.com/wangzhongqi0917) [](https://gitee.com/qq1822213252) [](https://gitee.com/tangzc), [metabytes](https://gitee.com/metabytes)
|
||||
|
||||
|
||||
## [v1.0.0](https://gitee.com/xlsea/ruoyi-plus-soybean/releases/tag/v1.0.0) (2025-06-05)
|
||||
|
||||
### 🚀 新功能
|
||||
|
||||
@@ -23,11 +23,13 @@
|
||||
# 📢 重要通知
|
||||
|
||||
2.0.0 版本已经正式发布(工作流版本请切换 [flow](https://gitee.com/xlsea/ruoyi-plus-soybean/tree/flow/) 分支查看),但仍然建议:
|
||||
|
||||
- 在生产环境使用前进行充分测试
|
||||
- 关注项目更新,及时获取最新版本
|
||||
- 积极反馈问题,帮助我们快速迭代
|
||||
|
||||
**后续规划**
|
||||
|
||||
- 多语言国际化完善
|
||||
- 性能优化和稳定性提升
|
||||
|
||||
@@ -62,6 +64,7 @@ RuoYi-Plus-Soybean 是一个现代化的企业级多租户管理系统,它结
|
||||
## 🛠️ 技术栈
|
||||
|
||||
### 前端
|
||||
|
||||
- **核心框架**:Vue 3.5.x
|
||||
- **开发语言**:TypeScript 5.8.x
|
||||
- **构建工具**:Vite 6.2.x
|
||||
@@ -73,6 +76,7 @@ RuoYi-Plus-Soybean 是一个现代化的企业级多租户管理系统,它结
|
||||
- **包管理器**:pnpm 8.x+
|
||||
|
||||
### 后端(与RuoYi-Vue-Plus兼容)
|
||||
|
||||
- **核心框架**:Spring Boot
|
||||
- **安全框架**:Spring Security
|
||||
- **权限认证**:Sa-Token
|
||||
@@ -123,6 +127,7 @@ root
|
||||
## 🚀 环境要求与安装
|
||||
|
||||
### 环境要求
|
||||
|
||||
- Node.js >= 20.19.0
|
||||
- pnpm >= 10.5.0
|
||||
- Git
|
||||
@@ -130,6 +135,7 @@ root
|
||||
### 安装步骤及说明
|
||||
|
||||
1. 克隆仓库
|
||||
|
||||
```bash
|
||||
git clone https://gitee.com/xlsea/ruoyi-plus-soybean.git
|
||||
cd ruoyi-plus-soybean
|
||||
@@ -142,21 +148,25 @@ npm install pnpm -g
|
||||
```
|
||||
|
||||
设置淘宝镜像
|
||||
|
||||
```bash
|
||||
pnpm config set registry https://registry.npmmirror.com
|
||||
```
|
||||
|
||||
3. 安装依赖
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
4. 运行开发服务器
|
||||
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
5. 构建生产版本
|
||||
|
||||
```bash
|
||||
pnpm build
|
||||
```
|
||||
@@ -166,12 +176,12 @@ pnpm build
|
||||
项目提供了代码生成工具和菜单SQL更新文件,在 <a href="https://gitee.com/xlsea/ruoyi-plus-soybean/tree/master/docs" target="_blank">docs</a> 目录下:
|
||||
|
||||
- **代码生成工具**
|
||||
- 代码生成工具类位于 `docs/java` 目录,如果没有修改过VelocityUtils.java文件,直接替换即可
|
||||
- 代码生成模板位于 `docs/template` 目录,请在ruoyi-generator模块的`resource/vm`下新建 `soy`文件夹,并将所有模板拷贝至`soy`文件夹中
|
||||
- 代码生成工具类位于 `docs/java` 目录,如果没有修改过VelocityUtils.java文件,直接替换即可
|
||||
- 代码生成模板位于 `docs/template` 目录,请在ruoyi-generator模块的`resource/vm`下新建 `soy`文件夹,并将所有模板拷贝至`soy`文件夹中
|
||||
|
||||
- **菜单SQL更新**
|
||||
- 菜单数据更新SQL文件位于 `docs/sql` 目录
|
||||
- 在系统初始化或更新时,需要执行相应的SQL文件来更新菜单数据
|
||||
- 菜单数据更新SQL文件位于 `docs/sql` 目录
|
||||
- 在系统初始化或更新时,需要执行相应的SQL文件来更新菜单数据
|
||||
|
||||
## 📝 开发指南
|
||||
|
||||
@@ -241,7 +251,9 @@ pnpm release
|
||||
### 核心开发模式
|
||||
|
||||
#### 状态管理
|
||||
|
||||
使用Pinia进行状态管理,模块位于`src/store/modules`目录:
|
||||
|
||||
- **app**: 应用全局状态
|
||||
- **theme**: 主题配置
|
||||
- **route**: 路由信息
|
||||
@@ -251,9 +263,11 @@ pnpm release
|
||||
- **notice**: 通知管理
|
||||
|
||||
#### API交互
|
||||
|
||||
项目支持多种HTTP客户端实现:
|
||||
|
||||
- **Axios**:
|
||||
|
||||
```typescript
|
||||
import { useRequest } from '@/hooks/common/request';
|
||||
|
||||
@@ -261,6 +275,7 @@ const { data, loading, error } = useRequest(() => api.getData(params));
|
||||
```
|
||||
|
||||
- **Hooks使用**:
|
||||
|
||||
```typescript
|
||||
// 布尔值管理
|
||||
import { useBoolean } from '@sa/hooks';
|
||||
@@ -276,6 +291,7 @@ const { tableData, loading, getPaginationData } = useTable(fetchTableData);
|
||||
```
|
||||
|
||||
#### 组件使用
|
||||
|
||||
项目包含多种业务组件:
|
||||
|
||||
- **表格组件**:支持列设置、搜索区域和高级操作
|
||||
@@ -284,6 +300,7 @@ const { tableData, loading, getPaginationData } = useTable(fetchTableData);
|
||||
- **布局组件**:支持多种布局模式和主题
|
||||
|
||||
### UnoCSS使用指南
|
||||
|
||||
项目优先使用 UnoCSS 来实现样式:
|
||||
|
||||
```html
|
||||
@@ -293,6 +310,7 @@ const { tableData, loading, getPaginationData } = useTable(fetchTableData);
|
||||
```
|
||||
|
||||
### 国际化
|
||||
|
||||
项目使用vue-i18n实现国际化支持:
|
||||
|
||||
```typescript
|
||||
@@ -306,6 +324,7 @@ console.log(t('common.confirm'));
|
||||
## 💎 特性与功能
|
||||
|
||||
### 前端特性
|
||||
|
||||
- **多种布局模式**:支持垂直、水平、混合等多种布局
|
||||
- **可配置的主题**:明暗模式、主题色定制
|
||||
- **标签页管理**:多种标签风格、右键菜单
|
||||
@@ -314,6 +333,7 @@ console.log(t('common.confirm'));
|
||||
- **权限管理**:菜单和按钮级别的权限控制
|
||||
|
||||
### 业务功能
|
||||
|
||||
- **用户管理**:用户信息维护、角色分配
|
||||
- **角色管理**:角色权限配置
|
||||
- **菜单管理**:系统功能配置
|
||||
@@ -326,6 +346,7 @@ console.log(t('common.confirm'));
|
||||
## 🤝 贡献指南
|
||||
|
||||
### 开发流程
|
||||
|
||||
1. Fork项目
|
||||
2. 创建功能分支 (`git checkout -b feature/amazing-feature`)
|
||||
3. 提交更改 (`git commit -m 'feat: add amazing feature'`)
|
||||
@@ -333,6 +354,7 @@ console.log(t('common.confirm'));
|
||||
5. 提交Pull Request
|
||||
|
||||
### 提交规范
|
||||
|
||||
项目使用约定式提交规范:
|
||||
|
||||
- `feat`: 新功能
|
||||
@@ -364,7 +386,6 @@ console.log(t('common.confirm'));
|
||||
|
||||
更多周边生态请翻阅 [周边生态](https://docs.soybeanjs.cn/zh/awesome) 文档。
|
||||
|
||||
|
||||
- **作者**: Elio
|
||||
- **邮箱**: 1983933789@qq.com
|
||||
- **作者主页**: https://gitee.com/ahcode
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import process from 'node:process';
|
||||
import path from 'node:path';
|
||||
import unocss from '@unocss/vite';
|
||||
import presetIcons from '@unocss/preset-icons';
|
||||
import { presetIcons } from 'unocss';
|
||||
import unocss from 'unocss/vite';
|
||||
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders';
|
||||
|
||||
export function setupUnocss(viteEnv: Env.ImportMeta) {
|
||||
|
||||
+10
-22
@@ -1,24 +1,12 @@
|
||||
import { defineConfig } from '@soybeanjs/eslint-config';
|
||||
import { defineConfig } from '@soybeanjs/eslint-config-vue';
|
||||
|
||||
export default defineConfig(
|
||||
{ vue: true, unocss: true },
|
||||
{
|
||||
rules: {
|
||||
'vue/multi-word-component-names': [
|
||||
'warn',
|
||||
{
|
||||
ignores: ['index', 'App', 'Register', '[id]', '[url]']
|
||||
}
|
||||
],
|
||||
'vue/component-name-in-template-casing': [
|
||||
'warn',
|
||||
'PascalCase',
|
||||
{
|
||||
registeredComponentsOnly: false,
|
||||
ignores: ['/^icon-/']
|
||||
}
|
||||
],
|
||||
'unocss/order-attributify': 'off'
|
||||
export default defineConfig({
|
||||
'vue/component-name-in-template-casing': [
|
||||
'warn',
|
||||
'PascalCase',
|
||||
{
|
||||
registeredComponentsOnly: false,
|
||||
ignores: ['/^icon-/']
|
||||
}
|
||||
}
|
||||
);
|
||||
]
|
||||
});
|
||||
|
||||
+46
-50
@@ -1,33 +1,29 @@
|
||||
{
|
||||
"name": "ruoyi-vue-plus",
|
||||
"type": "module",
|
||||
"version": "2.0.0",
|
||||
"description": "结合了 RuoYi-Vue-Plus 的强大后端功能和 Soybean Admin 的现代化前端特性,为开发者提供了完整的企业管理解决方案。",
|
||||
"keywords": [
|
||||
"RuoYi-Vue-Plus",
|
||||
"Soybean Admin",
|
||||
"TypeScript",
|
||||
"UnoCSS",
|
||||
"Vite7",
|
||||
"Vue3 admin ",
|
||||
"ant-design-vue v4",
|
||||
"naive-ui",
|
||||
"naive-ui-admin",
|
||||
"vue-admin-template"
|
||||
],
|
||||
"homepage": "https://docs.ruoyi.xlsea.cn",
|
||||
"bugs": {
|
||||
"url": "https://gitee.com/xlsea/ruoyi-plus-soybean/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "xlsea",
|
||||
"email": "m@xlsea.cn",
|
||||
"url": "https://gitee.com/xlsea"
|
||||
},
|
||||
"license": "MIT",
|
||||
"homepage": "https://docs.ruoyi.xlsea.cn",
|
||||
"repository": {
|
||||
"url": "https://gitee.com/xlsea/ruoyi-plus-soybean.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://gitee.com/xlsea/ruoyi-plus-soybean/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"RuoYi-Vue-Plus",
|
||||
"Soybean Admin",
|
||||
"Vue3 admin ",
|
||||
"vue-admin-template",
|
||||
"Vite7",
|
||||
"TypeScript",
|
||||
"naive-ui",
|
||||
"naive-ui-admin",
|
||||
"ant-design-vue v4",
|
||||
"UnoCSS"
|
||||
],
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Elio",
|
||||
@@ -35,10 +31,10 @@
|
||||
"url": "https://gitee.com/elio-an"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=20.19.0",
|
||||
"pnpm": ">=10.5.0"
|
||||
"repository": {
|
||||
"url": "https://gitee.com/xlsea/ruoyi-plus-soybean.git"
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build --mode prod",
|
||||
"build:dev": "vite build --mode dev",
|
||||
@@ -48,8 +44,9 @@
|
||||
"commit:zh": "sa git-commit -l=zh-cn",
|
||||
"dev": "vite --mode dev",
|
||||
"dev:prod": "vite --mode prod",
|
||||
"fmt": "oxfmt",
|
||||
"gen-route": "sa gen-route",
|
||||
"lint": "eslint . --fix",
|
||||
"lint": "oxlint --fix && eslint --fix .",
|
||||
"prepare": "simple-git-hooks",
|
||||
"preview": "vite preview",
|
||||
"release": "sa release",
|
||||
@@ -65,7 +62,7 @@
|
||||
"@sa/materials": "workspace:*",
|
||||
"@sa/utils": "workspace:*",
|
||||
"@types/streamsaver": "^2.0.5",
|
||||
"@vueuse/core": "14.1.0",
|
||||
"@vueuse/core": "14.2.1",
|
||||
"@wangeditor-next/editor": "^5.6.49",
|
||||
"@wangeditor-next/editor-for-vue": "^5.1.14",
|
||||
"clipboard": "2.0.11",
|
||||
@@ -75,54 +72,53 @@
|
||||
"highlight.js": "^11.11.1",
|
||||
"jsencrypt": "^3.5.4",
|
||||
"json5": "2.2.3",
|
||||
"naive-ui": "2.43.2",
|
||||
"naive-ui": "2.44.1",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "3.0.4",
|
||||
"streamsaver": "^2.0.6",
|
||||
"tailwind-merge": "3.4.0",
|
||||
"vue": "3.5.27",
|
||||
"tailwind-merge": "3.5.0",
|
||||
"vue": "3.5.29",
|
||||
"vue-advanced-cropper": "^2.8.9",
|
||||
"vue-draggable-plus": "0.6.1",
|
||||
"vue-i18n": "11.2.8",
|
||||
"vue-router": "4.6.4"
|
||||
"vue-i18n": "11.3.0",
|
||||
"vue-router": "5.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@elegant-router/vue": "0.3.8",
|
||||
"@iconify/json": "2.2.430",
|
||||
"@iconify/json": "2.2.447",
|
||||
"@sa/scripts": "workspace:*",
|
||||
"@sa/uno-preset": "workspace:*",
|
||||
"@soybeanjs/eslint-config": "1.7.5",
|
||||
"@types/node": "25.0.9",
|
||||
"@soybeanjs/eslint-config-vue": "^0.0.2",
|
||||
"@types/node": "25.3.5",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@unocss/eslint-config": "66.6.0",
|
||||
"@unocss/preset-icons": "66.6.0",
|
||||
"@unocss/preset-uno": "66.6.0",
|
||||
"@unocss/transformer-directives": "66.6.0",
|
||||
"@unocss/transformer-variant-group": "66.6.0",
|
||||
"@unocss/vite": "66.6.0",
|
||||
"@vitejs/plugin-vue": "6.0.3",
|
||||
"@vitejs/plugin-vue-jsx": "5.1.3",
|
||||
"@vitejs/plugin-vue": "6.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "5.1.4",
|
||||
"consola": "3.4.2",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-plugin-vue": "10.7.0",
|
||||
"eslint": "10.0.3",
|
||||
"kolorist": "1.8.0",
|
||||
"sass": "1.97.2",
|
||||
"oxfmt": "^0.36.0",
|
||||
"oxlint": "^1.51.0",
|
||||
"sass": "1.97.3",
|
||||
"simple-git-hooks": "2.13.1",
|
||||
"tsx": "4.21.0",
|
||||
"typescript": "5.9.3",
|
||||
"unocss": "^66.6.6",
|
||||
"unplugin-icons": "23.0.1",
|
||||
"unplugin-vue-components": "31.0.0",
|
||||
"vite": "7.3.1",
|
||||
"vite-plugin-progress": "0.0.7",
|
||||
"vite-plugin-svg-icons": "2.0.1",
|
||||
"vite-plugin-vue-devtools": "8.0.5",
|
||||
"vite-plugin-vue-transition-root-validator": "^0.0.4",
|
||||
"vue-eslint-parser": "10.2.0",
|
||||
"vue-tsc": "3.2.2"
|
||||
"vite-plugin-vue-devtools": "8.0.7",
|
||||
"vite-plugin-vue-transition-root-validator": "^0.1.0",
|
||||
"vue-tsc": "3.2.5"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"commit-msg": "pnpm sa git-commit-verify",
|
||||
"pre-commit": "pnpm typecheck && pnpm lint && git diff --exit-code"
|
||||
"pre-commit": "pnpm typecheck && pnpm lint && pnpm fmt && git diff --exit-code"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0",
|
||||
"pnpm": ">=10.5.0"
|
||||
},
|
||||
"website": "https://ruoyi.xlsea.cn"
|
||||
}
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
{
|
||||
"name": "@sa/alova",
|
||||
"version": "2.0.2",
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./fetch": "./src/fetch.ts",
|
||||
"./client": "./src/client.ts",
|
||||
"./mock": "./src/mock.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@alova/mock": "2.0.18",
|
||||
"@alova/mock": "2.0.19",
|
||||
"@sa/utils": "workspace:*",
|
||||
"alova": "3.4.1"
|
||||
"alova": "3.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
{
|
||||
"name": "@sa/axios",
|
||||
"version": "2.0.2",
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@sa/utils": "workspace:*",
|
||||
"axios": "1.13.2",
|
||||
"axios": "1.13.6",
|
||||
"axios-retry": "4.5.0",
|
||||
"qs": "6.14.1"
|
||||
"qs": "6.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/qs": "6.14.0"
|
||||
"@types/qs": "6.15.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{
|
||||
"name": "@sa/color",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sa/utils": "workspace:*",
|
||||
"colord": "2.9.3"
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{
|
||||
"name": "@sa/hooks",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sa/axios": "workspace:*",
|
||||
"@sa/utils": "workspace:*"
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{
|
||||
"name": "@sa/materials",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sa/utils": "workspace:*",
|
||||
"simplebar-vue": "2.4.2"
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
{
|
||||
"name": "@sa/scripts",
|
||||
"version": "2.0.2",
|
||||
"version": "2.1.0",
|
||||
"bin": {
|
||||
"sa": "./bin.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@soybeanjs/changelog": "0.4.3",
|
||||
"bumpp": "10.4.0",
|
||||
"bumpp": "10.4.1",
|
||||
"c12": "3.3.3",
|
||||
"cac": "6.7.14",
|
||||
"consola": "3.4.2",
|
||||
"enquirer": "2.4.1",
|
||||
"execa": "9.6.1",
|
||||
"kolorist": "1.8.0",
|
||||
"npm-check-updates": "19.3.1",
|
||||
"npm-check-updates": "19.6.3",
|
||||
"picomatch": "4.0.3",
|
||||
"rimraf": "6.1.2"
|
||||
"rimraf": "6.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import cac from 'cac';
|
||||
import { cac } from 'cac';
|
||||
import { blue, lightGreen } from 'kolorist';
|
||||
import { version } from '../package.json';
|
||||
import { cleanup, genChangelog, generateRoute, gitCommit, gitCommitVerify, release, updatePkg } from './commands';
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"name": "@sa/uno-preset",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @unocss-include
|
||||
|
||||
import type { Preset } from '@unocss/core';
|
||||
import type { Theme } from '@unocss/preset-uno';
|
||||
import type { Theme } from '@unocss/preset-mini';
|
||||
|
||||
export function presetSoybeanAdmin(): Preset<Theme> {
|
||||
const preset: Preset<Theme> = {
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{
|
||||
"name": "@sa/utils",
|
||||
"version": "2.0.2",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": ["./src/*"]
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"colord": "2.9.3",
|
||||
"crypto-js": "4.2.0",
|
||||
|
||||
Generated
+2154
-1185
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,2 +1,2 @@
|
||||
packages:
|
||||
- "packages/*"
|
||||
- 'packages/*'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable */
|
||||
/* global self ReadableStream Response */
|
||||
|
||||
self.addEventListener('install', () => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { Router } from 'vue-router';
|
||||
|
||||
export function createProgressGuard(router: Router) {
|
||||
router.beforeEach((_to, _from, next) => {
|
||||
router.beforeEach(() => {
|
||||
window.NProgress?.start?.();
|
||||
next();
|
||||
return;
|
||||
});
|
||||
router.afterEach(_to => {
|
||||
router.afterEach(() => {
|
||||
window.NProgress?.done?.();
|
||||
});
|
||||
}
|
||||
|
||||
+10
-24
@@ -1,10 +1,4 @@
|
||||
import type {
|
||||
LocationQueryRaw,
|
||||
NavigationGuardNext,
|
||||
RouteLocationNormalized,
|
||||
RouteLocationRaw,
|
||||
Router
|
||||
} from 'vue-router';
|
||||
import type { LocationQueryRaw, RouteLocationNormalized, RouteLocationRaw, Router } from 'vue-router';
|
||||
import type { RouteKey, RoutePath } from '@elegant-router/types';
|
||||
import { useAuthStore } from '@/store/modules/auth';
|
||||
import { useRouteStore } from '@/store/modules/route';
|
||||
@@ -17,12 +11,11 @@ import { getRouteName } from '@/router/elegant/transform';
|
||||
* @param router router instance
|
||||
*/
|
||||
export function createRouteGuard(router: Router) {
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
router.beforeEach(async (to, from) => {
|
||||
const location = await initRoute(to);
|
||||
|
||||
if (location) {
|
||||
next(location);
|
||||
return;
|
||||
return location;
|
||||
}
|
||||
|
||||
const authStore = useAuthStore();
|
||||
@@ -40,30 +33,27 @@ export function createRouteGuard(router: Router) {
|
||||
|
||||
// if it is login route when logged in, then switch to the root page
|
||||
if (to.name === loginRoute && isLogin) {
|
||||
next({ name: rootRoute });
|
||||
return;
|
||||
return { name: rootRoute };
|
||||
}
|
||||
|
||||
// if the route does not need login, then it is allowed to access directly
|
||||
if (!needLogin) {
|
||||
handleRouteSwitch(to, from, next);
|
||||
handleRouteSwitch(to, from);
|
||||
return;
|
||||
}
|
||||
|
||||
// the route need login but the user is not logged in, then switch to the login page
|
||||
if (!isLogin) {
|
||||
next({ name: loginRoute, query: { redirect: to.fullPath } });
|
||||
return;
|
||||
return { name: loginRoute, query: { redirect: to.fullPath } };
|
||||
}
|
||||
|
||||
// if the user is logged in but does not have authorization, then switch to the 403 page
|
||||
if (!hasAuth) {
|
||||
next({ name: noAuthorizationRoute });
|
||||
return;
|
||||
return { name: noAuthorizationRoute };
|
||||
}
|
||||
|
||||
// switch route normally
|
||||
handleRouteSwitch(to, from, next);
|
||||
handleRouteSwitch(to, from);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -161,17 +151,13 @@ async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw
|
||||
return null;
|
||||
}
|
||||
|
||||
function handleRouteSwitch(to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) {
|
||||
function handleRouteSwitch(to: RouteLocationNormalized, from: RouteLocationNormalized) {
|
||||
// route with href
|
||||
if (to.meta.href) {
|
||||
window.open(to.meta.href, '_blank');
|
||||
|
||||
next({ path: from.fullPath, replace: true, query: from.query, hash: to.hash });
|
||||
|
||||
return;
|
||||
return { path: from.fullPath, replace: true, query: from.query, hash: to.hash };
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
function getRouteQueryOfLoginRoute(to: RouteLocationNormalized, routeHome: RouteKey) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { localStg } from '@/utils/storage';
|
||||
import { SetupStoreId } from '@/enum';
|
||||
import { useRouteStore } from '../route';
|
||||
import { useTabStore } from '../tab';
|
||||
import useNoticeStore from '../notice';
|
||||
import { useNoticeStore } from '../notice';
|
||||
import { clearAuthStorage, getToken } from './shared';
|
||||
|
||||
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
|
||||
@@ -10,8 +10,8 @@ interface NoticeItem {
|
||||
}
|
||||
|
||||
export const useNoticeStore = defineStore(SetupStoreId.Notice, () => {
|
||||
const state = reactive({
|
||||
notices: [] as NoticeItem[]
|
||||
const state: { notices: NoticeItem[] } = reactive({
|
||||
notices: []
|
||||
});
|
||||
|
||||
const addNotice = (notice: NoticeItem) => {
|
||||
@@ -46,5 +46,3 @@ export const useNoticeStore = defineStore(SetupStoreId.Notice, () => {
|
||||
clearNotice
|
||||
};
|
||||
});
|
||||
|
||||
export default useNoticeStore;
|
||||
|
||||
Vendored
+4
@@ -56,6 +56,8 @@ declare module 'vue' {
|
||||
IconMdiGithub: typeof import('~icons/mdi/github')['default']
|
||||
IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default']
|
||||
IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
|
||||
IconOcticonPin16: typeof import('~icons/octicon/pin16')['default']
|
||||
IconOcticonPinSlash16: typeof import('~icons/octicon/pin-slash16')['default']
|
||||
IconQuillCollapse: typeof import('~icons/quill/collapse')['default']
|
||||
IconQuillExpand: typeof import('~icons/quill/expand')['default']
|
||||
IconSimpleIconsGitee: typeof import('~icons/simple-icons/gitee')['default']
|
||||
@@ -205,6 +207,8 @@ declare global {
|
||||
const IconMdiGithub: typeof import('~icons/mdi/github')['default']
|
||||
const IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default']
|
||||
const IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
|
||||
const IconOcticonPin16: typeof import('~icons/octicon/pin16')['default']
|
||||
const IconOcticonPinSlash16: typeof import('~icons/octicon/pin-slash16')['default']
|
||||
const IconQuillCollapse: typeof import('~icons/quill/collapse')['default']
|
||||
const IconQuillExpand: typeof import('~icons/quill/expand')['default']
|
||||
const IconSimpleIconsGitee: typeof import('~icons/simple-icons/gitee')['default']
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import JSEncrypt from 'jsencrypt';
|
||||
import { JSEncrypt } from 'jsencrypt';
|
||||
// 密钥对生成 http://web.chacuo.net/netrsakeypair
|
||||
|
||||
const publicKey = import.meta.env.VITE_APP_RSA_PUBLIC_KEY;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { watch } from 'vue';
|
||||
import { useEventSource } from '@vueuse/core';
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
import { useNoticeStore } from '@/store/modules/notice';
|
||||
import { $t } from '@/locales';
|
||||
import { localStg } from './storage';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useWebSocket } from '@vueuse/core';
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
import { useNoticeStore } from '@/store/modules/notice';
|
||||
import { localStg } from './storage';
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,10 +59,10 @@ async function handleFileSelect(data: { file: UploadFileInfo }) {
|
||||
}
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
reader.addEventListener('load', () => {
|
||||
options.img = reader.result as string;
|
||||
options.fileName = file.name;
|
||||
};
|
||||
});
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
return false;
|
||||
|
||||
Vendored
+2
-2
@@ -321,7 +321,7 @@ function updateCharts() {
|
||||
|
||||
// 设置自定义颜色
|
||||
const newItemStyle = {
|
||||
...(opts.series[0].itemStyle || {}),
|
||||
...opts.series[0].itemStyle,
|
||||
color(param: { dataIndex: number }) {
|
||||
const index = param.dataIndex % colorPalette.length;
|
||||
return colorPalette[index >= 0 ? index : 0];
|
||||
@@ -332,7 +332,7 @@ function updateCharts() {
|
||||
|
||||
// 增强tooltip展示
|
||||
opts.tooltip = {
|
||||
...(opts.tooltip || {}),
|
||||
...opts.tooltip,
|
||||
formatter: function tooltipFormatter(params: any) {
|
||||
if (!params || typeof params !== 'object') return '';
|
||||
|
||||
|
||||
+2
-6
@@ -1,12 +1,8 @@
|
||||
import { defineConfig } from '@unocss/vite';
|
||||
import transformerDirectives from '@unocss/transformer-directives';
|
||||
import transformerVariantGroup from '@unocss/transformer-variant-group';
|
||||
import presetWind3 from '@unocss/preset-wind3';
|
||||
import type { Theme } from '@unocss/preset-uno';
|
||||
import { defineConfig, transformerDirectives, transformerVariantGroup, presetWind3 } from 'unocss';
|
||||
import { presetSoybeanAdmin } from '@sa/uno-preset';
|
||||
import { themeVars } from './src/theme/vars';
|
||||
|
||||
export default defineConfig<Theme>({
|
||||
export default defineConfig({
|
||||
content: {
|
||||
pipeline: {
|
||||
exclude: ['node_modules', 'dist']
|
||||
|
||||
Reference in New Issue
Block a user