refactor: migrate backend to TypeScript
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
node_modules
|
||||
dist
|
||||
build
|
||||
.taro
|
||||
.cache
|
||||
coverage
|
||||
*.d.ts
|
||||
public
|
||||
src/assets
|
||||
web/public
|
||||
web/src/assets
|
||||
@@ -1,4 +0,0 @@
|
||||
shamefully-hoist=true
|
||||
strict-peer-dependencies=false
|
||||
shell-emulator=true
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
node_modules
|
||||
dist
|
||||
build
|
||||
.taro
|
||||
.cache
|
||||
coverage
|
||||
pnpm-lock.yaml
|
||||
web/public
|
||||
web/src/assets
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
tabWidth: 2,
|
||||
bracketSpacing: true,
|
||||
singleQuote: false,
|
||||
arrowParens: "avoid",
|
||||
trailingComma: "none"
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
node_modules
|
||||
dist
|
||||
build
|
||||
.taro
|
||||
.cache
|
||||
coverage
|
||||
web/public
|
||||
web/src/assets
|
||||
web/src/style/reset.scss
|
||||
src/style/reset.scss
|
||||
app/src/app.scss
|
||||
app/src/pages/index/index.scss
|
||||
src/app.scss
|
||||
src/pages/index/index.scss
|
||||
+16
-5
@@ -1,10 +1,20 @@
|
||||
# Frontend
|
||||
|
||||
This workspace contains:
|
||||
Frontend packages are managed by the root pnpm workspace.
|
||||
|
||||
This directory contains:
|
||||
|
||||
- `web`: Vite + Vue 3 admin frontend.
|
||||
- `app`: Taro + Vue 3 app frontend.
|
||||
|
||||
Run commands from the repository root:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev:web
|
||||
pnpm dev:app:weapp
|
||||
```
|
||||
|
||||
## Environment Files
|
||||
|
||||
Frontend environment variables are maintained in each app directory.
|
||||
@@ -29,9 +39,10 @@ VITE_COMPRESSION="none"
|
||||
VITE_APP_BASE_API=/dev-api
|
||||
```
|
||||
|
||||
For Docker Compose production deployment, `frontend/web/.env.production` uses
|
||||
`VITE_APP_BASE_API=/prod-api`. The web container's Nginx config proxies
|
||||
`/prod-api` to the backend container.
|
||||
For Vercel deployment, create a Web project with `frontend/web` as the Root
|
||||
Directory. Use the Vite framework preset, `pnpm install`, `pnpm build`, and
|
||||
`dist` as the output directory. Configure `VITE_APP_BASE_API` in Vercel with
|
||||
the deployed backend URL.
|
||||
|
||||
### App
|
||||
|
||||
@@ -49,4 +60,4 @@ TARO_APP_API_BASE=
|
||||
```
|
||||
|
||||
When `TARO_APP_API_BASE` is empty, the app HTTP client falls back to
|
||||
`http://localhost:8080`.
|
||||
`http://localhost:3000`.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// ESLint 检查 .vue 文件需要单独配置编辑器:
|
||||
// https://eslint.vuejs.org/user-guide/#editor-integrations
|
||||
{
|
||||
"extends": ["taro/vue3", "../eslint.base.cjs"],
|
||||
"extends": ["taro/vue3", "../../eslint.base.cjs"],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { UserConfigExport } from "@tarojs/cli"
|
||||
|
||||
export default {
|
||||
|
||||
defineConstants: {
|
||||
TARO_APP_API_BASE: JSON.stringify("http://localhost:3000")
|
||||
},
|
||||
mini: {},
|
||||
h5: {}
|
||||
} satisfies UserConfigExport<'vite'>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@simple-template/app",
|
||||
"name": "@collab_ledger/app",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "simple app",
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev:qq": "pnpm build:qq --watch",
|
||||
"dev:jd": "pnpm build:jd --watch",
|
||||
"dev:harmony-hybrid": "pnpm build:harmony-hybrid --watch",
|
||||
"lint": "eslint --ignore-path ../.eslintignore \"{src,config}/**/*.{vue,js,ts,tsx}\" && pnpm --dir .. exec stylelint \"app/src/**/*.{vue,css,scss}\" --config ./stylelint.config.cjs --ignore-path ./.stylelintignore",
|
||||
"lint": "eslint --ignore-path ../../.eslintignore \"{src,config}/**/*.{vue,js,ts,tsx}\" && pnpm --dir ../.. exec stylelint \"frontend/app/src/**/*.{vue,css,scss}\" --config stylelint.config.cjs --ignore-path .stylelintignore",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"browserslist": [
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Taro from '@tarojs/taro'
|
||||
import type { TokenDTO, UserInfoDTO } from '@/api/types'
|
||||
|
||||
const tokenKey = 'simple-todo-app-token'
|
||||
const userKey = 'simple-todo-app-user'
|
||||
const tokenKey = 'collab_ledger_app_token'
|
||||
const userKey = 'collab_ledger_app_user'
|
||||
|
||||
export function getToken() {
|
||||
return Taro.getStorageSync<string>(tokenKey) || ''
|
||||
|
||||
@@ -21,7 +21,7 @@ interface UploadOptions {
|
||||
showLoading?: boolean
|
||||
}
|
||||
|
||||
const baseURL = process.env.TARO_APP_API_BASE || 'http://localhost:8080'
|
||||
const baseURL = process.env.TARO_APP_API_BASE || 'http://localhost:3000'
|
||||
|
||||
export async function request<T>(options: RequestOptions) {
|
||||
if (options.showLoading !== false) {
|
||||
@@ -137,4 +137,3 @@ function handleResponse<T>(data: ResponseData<T>) {
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "es2017",
|
||||
"module": "commonjs",
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module"
|
||||
},
|
||||
rules: {
|
||||
"no-debugger": "off",
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"author": "GIN",
|
||||
"description": "simple template frontend",
|
||||
"scripts": {
|
||||
"dev:web": "pnpm --filter @simple-template/web dev",
|
||||
"build:web": "pnpm --filter @simple-template/web build",
|
||||
"preview:web": "pnpm --filter @simple-template/web preview",
|
||||
"typecheck:web": "pnpm --filter @simple-template/web typecheck",
|
||||
"dev:app:weapp": "pnpm --filter @simple-template/app dev:weapp",
|
||||
"build:app:weapp": "pnpm --filter @simple-template/app build:weapp",
|
||||
"dev:app:h5": "pnpm --filter @simple-template/app dev:h5",
|
||||
"build:app:h5": "pnpm --filter @simple-template/app build:h5",
|
||||
"lint:web": "pnpm --filter @simple-template/web lint",
|
||||
"lint:app": "pnpm --filter @simple-template/app lint",
|
||||
"lint": "pnpm lint:web && pnpm lint:app",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,vue,css,scss,html,json,md}\"",
|
||||
"typecheck:app": "pnpm --filter @simple-template/app typecheck",
|
||||
"typecheck": "pnpm typecheck:web && pnpm typecheck:app"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
||||
"@typescript-eslint/parser": "^5.60.0",
|
||||
"postcss-html": "^1.5.0",
|
||||
"postcss-scss": "^4.0.6",
|
||||
"prettier": "^2.8.8",
|
||||
"stylelint": "^16.4.0",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-recess-order": "^4.2.0",
|
||||
"stylelint-config-recommended-vue": "^1.4.0",
|
||||
"stylelint-config-standard": "^38.0.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"stylelint-order": "^6.0.3",
|
||||
"stylelint-scss": "^6.12.1",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
"ignoreMissing": [
|
||||
"rollup",
|
||||
"webpack",
|
||||
"core-js"
|
||||
]
|
||||
},
|
||||
"allowedDeprecatedVersions": {
|
||||
"sourcemap-codec": "*",
|
||||
"w3c-hr-time": "*",
|
||||
"stable": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-13591
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
packages:
|
||||
- "web"
|
||||
- "app"
|
||||
allowBuilds:
|
||||
'@parcel/watcher': true
|
||||
'@swc/core': true
|
||||
'@tarojs/binding': true
|
||||
'@tarojs/cli': true
|
||||
core-js: true
|
||||
core-js-pure: true
|
||||
esbuild: true
|
||||
typeit: true
|
||||
vue-demi: true
|
||||
@@ -1,86 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
"stylelint-config-standard",
|
||||
"stylelint-config-html/vue",
|
||||
"stylelint-config-recess-order"
|
||||
],
|
||||
plugins: ["stylelint-order", "stylelint-scss"],
|
||||
overrides: [
|
||||
{
|
||||
files: ["**/*.{css,html,vue}"],
|
||||
customSyntax: "postcss-html"
|
||||
},
|
||||
{
|
||||
files: ["**/*.scss"],
|
||||
customSyntax: "postcss-scss",
|
||||
extends: [
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-config-recommended-vue/scss"
|
||||
]
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
"selector-class-pattern": null,
|
||||
"no-empty-source": null,
|
||||
"no-descending-specificity": null,
|
||||
"declaration-property-value-no-unknown": null,
|
||||
"scss/dollar-variable-pattern": null,
|
||||
"selector-pseudo-class-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ["deep", "global"]
|
||||
}
|
||||
],
|
||||
"selector-pseudo-element-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: ["v-deep", "v-global", "v-slotted"]
|
||||
}
|
||||
],
|
||||
"at-rule-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignoreAtRules: [
|
||||
"tailwind",
|
||||
"apply",
|
||||
"variants",
|
||||
"responsive",
|
||||
"screen",
|
||||
"function",
|
||||
"if",
|
||||
"each",
|
||||
"include",
|
||||
"mixin",
|
||||
"use"
|
||||
]
|
||||
}
|
||||
],
|
||||
"rule-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
ignore: ["after-comment", "first-nested"]
|
||||
}
|
||||
],
|
||||
"unit-no-unknown": [true, { ignoreUnits: ["rpx"] }],
|
||||
"order/order": [
|
||||
[
|
||||
"dollar-variables",
|
||||
"custom-properties",
|
||||
"at-rules",
|
||||
"declarations",
|
||||
{
|
||||
type: "at-rule",
|
||||
name: "supports"
|
||||
},
|
||||
{
|
||||
type: "at-rule",
|
||||
name: "media"
|
||||
},
|
||||
"rules"
|
||||
],
|
||||
{ severity: "warning" }
|
||||
]
|
||||
},
|
||||
ignoreFiles: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"]
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"strict": false,
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "preserve"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.eslintcache
|
||||
report.html
|
||||
|
||||
yarn.lock
|
||||
npm-debug.log*
|
||||
.pnpm-error.log*
|
||||
.pnpm-debug.log
|
||||
tests/**/coverage/
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
tsconfig.tsbuildinfo
|
||||
@@ -3,5 +3,4 @@ VITE_PUBLIC_PATH = ./
|
||||
VITE_ROUTER_HISTORY = "hash"
|
||||
VITE_CDN = false
|
||||
VITE_COMPRESSION = "none"
|
||||
VITE_APP_BASE_API = '/prod-api'
|
||||
|
||||
VITE_APP_BASE_API =
|
||||
|
||||
@@ -3,5 +3,4 @@ VITE_PUBLIC_PATH = ./
|
||||
VITE_ROUTER_HISTORY = "hash"
|
||||
VITE_CDN = true
|
||||
VITE_COMPRESSION = "none"
|
||||
VITE_APP_BASE_API = '/stage-api'
|
||||
|
||||
VITE_APP_BASE_API =
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = {
|
||||
withDefaults: "readonly"
|
||||
},
|
||||
extends: [
|
||||
"../eslint.base.cjs",
|
||||
"../../eslint.base.cjs",
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended",
|
||||
"@vue/typescript/recommended",
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
FROM node:22-alpine AS build-stage
|
||||
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare pnpm@11.1.3 --activate
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.base.json ./
|
||||
COPY web/package.json web/package.json
|
||||
RUN pnpm install --frozen-lockfile --filter @simple-template/web...
|
||||
|
||||
COPY web web
|
||||
WORKDIR /app/web
|
||||
RUN pnpm build
|
||||
|
||||
FROM nginx:stable-alpine AS production-stage
|
||||
|
||||
COPY --from=build-stage /app/web/dist /usr/share/nginx/html
|
||||
COPY web/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
+44
-123
@@ -1,145 +1,66 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Release-V1.8.0-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.1-blue.svg" alt="Downloads">
|
||||
<a target="_blank" href="https://bladex.vip">
|
||||
<img src="https://img.shields.io/badge/Author-valarchie-ff69b4.svg" alt="Downloads">
|
||||
</a>
|
||||
<a target="_blank" href="https://bladex.vip">
|
||||
<img src="https://img.shields.io/badge/Copyright%20-@Agileboot-%23ff3f59.svg" alt="Downloads">
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
# CollabLedger Web
|
||||
|
||||
<img alt="logo" height="200" src="https://oscimg.oschina.net/oscnet/up-eda2a402cc061f1f5f40d9ac4c084f4c98c.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">AgileBoot v2.0.0</h1>
|
||||
Vite + Vue 3 Web 管理端,作为根目录 pnpm workspace 的子包维护。
|
||||
|
||||
<h4 align="center">基于SpringBoot+Vue3前后端分离的Java快速开发框架</h4>
|
||||
<p align="center">
|
||||
</p>
|
||||
## 本地开发
|
||||
|
||||
## ⚡ 平台简介 ⚡
|
||||
从仓库根目录执行:
|
||||
|
||||
- 本仓库是 Agilboot 快速开发脚手架的配套前端项目。前端是基于优秀的开源项目[Pure-Admin](https://github.com/pure-admin/vue-pure-admin)开发而成。在此感谢 Pure-Admin 作者。
|
||||
- 本仓库前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。
|
||||
- 配套后端代码仓库地址[AgileBoot-Back-End](https://github.com/valarchie/AgileBoot-Back-End) 版本。
|
||||
|
||||
- 规范请参照该文档 [前端规范](https://gitee.com/MinJieLiu/web-standard#/MinJieLiu/web-standard)
|
||||
|
||||
### 前端配套资料
|
||||
|
||||
#### 配套视频
|
||||
|
||||
- [点我查看教程](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||
- [点我查看 UI 设计](https://www.bilibili.com/video/BV17g411T7rq)
|
||||
|
||||
#### 配套保姆级文档
|
||||
|
||||
- [查看文档](https://yiming_chang.gitee.io/pure-admin-doc)
|
||||
|
||||
#### Pure-Admin 框架预览
|
||||
|
||||
- [查看预览](https://pure-admin-thin.netlify.app/#/login)
|
||||
|
||||
#### Pure-Admin 维护者
|
||||
|
||||
- [xiaoxian521](https://github.com/xiaoxian521)
|
||||
|
||||
## ✨ 使用 ✨
|
||||
|
||||
### 开发环境
|
||||
|
||||
Node.js 版本要求:16.0+
|
||||
pnpm 版本要求:6.0+
|
||||
|
||||
优先选择 node=16, pnpm=7.30.5的环境.
|
||||
|
||||
如果您还没安装 pnpm,请执行下面命令进行安装(mac 用户遇到安装报错请在命令前加上 sudo) 如果是 windows 用户,使用 power shell 管理员权限执行
|
||||
|
||||
```
|
||||
npm install -g pnpm
|
||||
```
|
||||
|
||||
安装依赖
|
||||
|
||||
```
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev:web
|
||||
```
|
||||
|
||||
启动平台
|
||||
`frontend/web/.env.development` 默认使用:
|
||||
|
||||
```
|
||||
pnpm run dev
|
||||
```env
|
||||
VITE_PORT=80
|
||||
VITE_APP_BASE_API=/dev-api
|
||||
```
|
||||
|
||||
不管是什么源,我们都可以不用管,直接执行下面命令即可
|
||||
开发环境下,`vite.config.ts` 会把 `/dev-api` 代理到本地后端 `http://localhost:3000`。
|
||||
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
## Vercel 部署
|
||||
|
||||
上面的命令是将本地的源换成国内源 npmmirror
|
||||
(opens new window),经过几轮测试,发现它的下载速度快且同步率高,同步频率 10 分钟一次,如果您之前的源是这个 http://registry.npm.taobao.org ,那您必须换成 npmmirror 啦,因为原淘宝 npm 域名即将停止解析
|
||||
Web 管理端作为独立的 Vercel Project 部署。先全局安装并登录 Vercel CLI:
|
||||
|
||||
## 🙊 系统内置功能 🙊
|
||||
|
||||
🙂 大部分功能,均有通过 **单元测试** **集成测试** 保证质量。
|
||||
|
||||
| | 功能 | 描述 |
|
||||
| --- | ---------- | ------------------------------------------------------------- |
|
||||
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
|
||||
| ⭐ | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
|
||||
| ⭐ | 岗位管理 | 配置系统用户所属担任职务 |
|
||||
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
|
||||
| ⭐ | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
|
||||
| | 参数管理 | 对系统动态配置常用参数 |
|
||||
| | 通知公告 | 系统通知公告信息发布维护 |
|
||||
| 🚀 | 操作日志 | 系统正常操作日志记录和查询;系统异常信息日志记录和查询 |
|
||||
| | 登录日志 | 系统登录日志记录查询包含登录异常 |
|
||||
| | 在线用户 | 当前系统中活跃用户状态监控 |
|
||||
| | 系统接口 | 根据业务代码自动生成相关的 api 接口文档 |
|
||||
| | 服务监控 | 监视当前系统 CPU、内存、磁盘、堆栈等相关信息 |
|
||||
| | 缓存监控 | 对系统的缓存信息查询,命令统计等 |
|
||||
| | 连接池监视 | 监视当前系统数据库连接池状态,可进行分析 SQL 找出系统性能瓶颈 |
|
||||
|
||||
## 💥 在线体验 💥
|
||||
|
||||
演示地址:
|
||||
|
||||
- <www.agileboot.vip>
|
||||
- <www.agileboot.cc>
|
||||
> 账号密码:admin/admin123
|
||||
|
||||
[项目文档](https://juejin.cn/column/7159946528827080734)
|
||||
|
||||
## 🎬 AgileBoot 全栈交流群 🎬
|
||||
|
||||
QQ 群: [](https://qm.qq.com/cgi-bin/qm/qr?k=TR5guoXS0HssErVWefmdFRirJvfpEvp1&jump_from=webapi&authKey=VkWMmVhp/pNdWuRD8sqgM+Sv2+Vy2qCJQSeLmeXlLtfER2RJBi6zL56PdcRlCmTs) 点击按钮入群。
|
||||
|
||||
如果觉得该项目对您有帮助,可以小额捐赠支持本项目演示网站服务器等费用~
|
||||
|
||||
<img alt="logo" height="200" src="https://oscimg.oschina.net/oscnet/up-28b63fdd7b3ce003bd30c25883f2276212b.png">
|
||||
|
||||
### 用法
|
||||
|
||||
#### 安装依赖
|
||||
|
||||
```
|
||||
pnpm install
|
||||
```bash
|
||||
pnpm add -g vercel
|
||||
vercel login
|
||||
```
|
||||
|
||||
#### 安装一个包
|
||||
进入 Web 目录并关联项目:
|
||||
|
||||
```
|
||||
pnpm add 包名
|
||||
```bash
|
||||
cd frontend/web
|
||||
vercel link
|
||||
```
|
||||
|
||||
#### 卸载一个包
|
||||
推荐配置:
|
||||
|
||||
```
|
||||
pnpm remove 包名
|
||||
```text
|
||||
Framework Preset: Vite
|
||||
Install Command: pnpm install
|
||||
Build Command: pnpm build
|
||||
Output Directory: dist
|
||||
```
|
||||
|
||||
### 许可证
|
||||
在 Vercel 项目环境变量中配置后端地址:
|
||||
|
||||
原则上不收取任何费用及版权,可商用,不过如需二次开源(比如用此平台二次开发并开源,要求前端代码必须开源免费)请联系作者获取许可!(免费,走个记录而已)
|
||||
```bash
|
||||
vercel env add VITE_APP_BASE_API production
|
||||
```
|
||||
|
||||
变量值示例:
|
||||
|
||||
```env
|
||||
VITE_APP_BASE_API=https://your-backend.example.com
|
||||
```
|
||||
|
||||
部署:
|
||||
|
||||
```bash
|
||||
vercel deploy --prod
|
||||
```
|
||||
|
||||
`vercel.json` 已配置 SPA 路由回退,刷新管理端子路由时会返回 `index.html`。
|
||||
|
||||
@@ -21,8 +21,8 @@ export function viteBuildInfo(): Plugin {
|
||||
bold(
|
||||
green(
|
||||
`👏欢迎使用${blue(
|
||||
"[Agileboot全栈项目]"
|
||||
)},如果您感觉不错,记得点击后面链接给个star哦💖 https://github.com/valarchie/agileboot-back-end`
|
||||
"[CollabLedger全栈项目]"
|
||||
)},如果您感觉不错,记得点击后面链接给个star哦💖 https://github.com/valarchie/collab_ledger-back-end`
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
||||
/>
|
||||
<title>Agileboot管理系统</title>
|
||||
<title>CollabLedger管理系统</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
window.process = {};
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location /prod-api/ {
|
||||
proxy_pass http://app:8080/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@simple-template/web",
|
||||
"name": "@collab_ledger/web",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -13,9 +13,9 @@
|
||||
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
||||
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
|
||||
"clean:cache": "rimraf node_modules && pnpm install",
|
||||
"lint:eslint": "eslint --ignore-path ../.eslintignore --cache --cache-location node_modules/.cache/eslint/.eslintcache --max-warnings 0 \"{src,build}/**/*.{vue,js,ts,tsx}\"",
|
||||
"lint:prettier": "prettier --check \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
|
||||
"lint:stylelint": "pnpm --dir .. exec stylelint \"web/**/*.{html,vue,css,scss}\" --config ./stylelint.config.cjs --ignore-path ./.stylelintignore --cache --cache-location web/node_modules/.cache/stylelint/",
|
||||
"lint:eslint": "eslint --ignore-path ../../.eslintignore --cache --cache-location node_modules/.cache/eslint/.eslintcache --max-warnings 0 \"{src,build}/**/*.{vue,js,ts,tsx}\"",
|
||||
"lint:prettier": "prettier --check --ignore-path ../../.prettierignore \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
|
||||
"lint:stylelint": "pnpm --dir ../.. exec stylelint \"frontend/web/**/*.{html,vue,css,scss}\" --config stylelint.config.cjs --ignore-path .stylelintignore --cache --cache-location node_modules/.cache/stylelint/",
|
||||
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
||||
"prepare": "echo \"Git hooks are managed by ../../.githooks\"",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
@@ -96,7 +96,7 @@
|
||||
"vue-eslint-parser": "^9.3.1",
|
||||
"vue-tsc": "^1.8.1"
|
||||
},
|
||||
"repository": "git@github.com:valarchie/agileboot-front-end-pure.git",
|
||||
"repository": "git@github.com:valarchie/collab_ledger-front-end-pure.git",
|
||||
"author": "valarchie",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"Version": "4.4.0",
|
||||
"Title": "Agileboot",
|
||||
"Title": "CollabLedger",
|
||||
"FixedHeader": true,
|
||||
"HiddenSideBar": false,
|
||||
"MultiTagsCache": false,
|
||||
|
||||
@@ -23,7 +23,7 @@ export function rsaEncrypt(txt): string {
|
||||
return encryptedValue;
|
||||
}
|
||||
|
||||
const aesKey = "agileboot1234567";
|
||||
const aesKey = "collab_ledger123";
|
||||
|
||||
export function aesEncrypt(txt): string {
|
||||
if (isEmpty(txt)) {
|
||||
|
||||
@@ -529,7 +529,7 @@ onBeforeUnmount(() => {
|
||||
<!-- 底部 -->
|
||||
<div class="flex items-center justify-center h-full">
|
||||
<div class="flex flex-col items-center justify-center mb-3">
|
||||
<span>Copyright © 2018-2023 Agileboot All Rights Reserved. </span>
|
||||
<span>Copyright © 2018-2023 CollabLedger All Rights Reserved. </span>
|
||||
<el-link
|
||||
href="https://beian.miit.gov.cn"
|
||||
rel="external nofollow"
|
||||
|
||||
@@ -162,7 +162,7 @@ export function useLoginLogHook() {
|
||||
CommonUtils.fillPaginationParams(searchFormParams, pagination);
|
||||
CommonUtils.fillTimeRangeParams(searchFormParams, timeRange.value);
|
||||
|
||||
exportLoginLogExcelApi(toRaw(searchFormParams), "登录日志.xls");
|
||||
exportLoginLogExcelApi(toRaw(searchFormParams), "登录日志.xlsx");
|
||||
}
|
||||
|
||||
async function handleDelete(row) {
|
||||
|
||||
@@ -175,7 +175,7 @@ export function useOperationLogHook() {
|
||||
CommonUtils.fillPaginationParams(searchFormParams, pagination);
|
||||
CommonUtils.fillTimeRangeParams(searchFormParams, timeRange.value);
|
||||
|
||||
exportOperationLogExcelApi(toRaw(searchFormParams), "操作日志.xls");
|
||||
exportOperationLogExcelApi(toRaw(searchFormParams), "操作日志.xlsx");
|
||||
}
|
||||
|
||||
async function handleDelete(row) {
|
||||
|
||||
@@ -176,7 +176,7 @@ export function useHook() {
|
||||
|
||||
async function exportAllExcel() {
|
||||
CommonUtils.fillPaginationParams(searchFormParams, pagination);
|
||||
exportUserExcelApi(toRaw(searchFormParams), "用户列表.xls");
|
||||
exportUserExcelApi(toRaw(searchFormParams), "用户列表.xlsx");
|
||||
}
|
||||
|
||||
async function handleAdd(row, done) {
|
||||
|
||||
@@ -25,7 +25,7 @@ const upload = reactive({
|
||||
function downloadTemplate() {
|
||||
http.download(
|
||||
"system/users/excelTemplate",
|
||||
`user_template_${new Date().getTime()}.xls`
|
||||
`user_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
|
||||
Vendored
+2
-2
@@ -30,8 +30,8 @@ declare global {
|
||||
/** 内嵌的`iframe`链接 `可选` */
|
||||
frameSrc?: string;
|
||||
/** 是否是内部页面 使用frameSrc来嵌入页面时,当isFrameSrcInternal=true的时候, 前端需要做特殊处理 */
|
||||
/** 比如链接是 /druid/login.html */
|
||||
/** 前端需要处理成 http://localhost:8080/druid/login.html */
|
||||
/** 比如链接是 /internal/page.html */
|
||||
/** 前端需要处理成当前后端服务可访问的完整地址 */
|
||||
isFrameSrcInternal?: boolean;
|
||||
/** `iframe`页是否开启首次加载动画(默认`true`)`可选` */
|
||||
frameLoading?: boolean;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
"destination": "/index.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
// 本地跨域代理 https://cn.vitejs.dev/config/server-options.html#server-proxy
|
||||
proxy: {
|
||||
"/dev-api": {
|
||||
target: "http://localhost:8080",
|
||||
target: "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/dev-api/, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user