Browse Source

chore: cleanup

main
刘凯 1 year ago
parent
commit
c31f69f429
  1. 2
      .env
  2. 3
      .env.development
  3. 3
      .env.production
  4. 3
      .env.static
  5. 2
      .env.test
  6. 54
      .gitee/ISSUE_TEMPLATE/bug.yml
  7. 5
      .gitee/ISSUE_TEMPLATE/config.yml
  8. 43
      .gitee/ISSUE_TEMPLATE/feature.yml
  9. 2
      .vscode/settings.json
  10. 119
      README.md
  11. BIN
      public/resource/img/preview.png
  12. BIN
      public/resource/img/wx.png
  13. BIN
      public/resource/img/wx2.png
  14. 2
      src/main.ts
  15. 23
      src/utils/tongji.ts

2
.env

@ -13,5 +13,3 @@ VITE_GLOB_APP_TENANT_ENABLE = true
# 验证码的开关
VITE_GLOB_APP_CAPTCHA_ENABLE = true
# 百度统计
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777

3
.env.development

@ -22,6 +22,3 @@ VITE_GLOB_UPLOAD_URL = /upload
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
VITE_GLOB_API_URL_PREFIX =
# 百度统计
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777

3
.env.production

@ -25,6 +25,3 @@ VITE_GLOB_API_URL_PREFIX =
# 打包是否开启pwa功能
VITE_USE_PWA = false
# 百度统计
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777

3
.env.static

@ -25,6 +25,3 @@ VITE_GLOB_API_URL_PREFIX =
# 打包是否开启pwa功能
VITE_USE_PWA = false
# 百度统计
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777

2
.env.test

@ -26,5 +26,3 @@ VITE_GLOB_API_URL_PREFIX =
# 打包是否开启pwa功能
VITE_USE_PWA = false
# 百度统计
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777

54
.gitee/ISSUE_TEMPLATE/bug.yml

@ -1,54 +0,0 @@
name: Bug 反馈
description: 当你在代码中发现了一个 Bug,导致应用崩溃或抛出异常,或者有一个组件存在问题,或者某些地方看起来不对劲。
title: '[Bug]: '
labels: [bug]
body:
- type: markdown
attributes:
value: |
感谢对项目的支持与关注。在提出问题之前,请确保你已查看相关开发或使用文档:
- http://vben-doc.x-surge.com/
- type: checkboxes
attributes:
label: 这个问题是否已经存在?
options:
- label: 我已经搜索过现有的问题 (https://gitee.com/yudaocode/yudao-ui-admin-vben/issues)
required: true
- type: textarea
attributes:
label: 如何复现
description: 请详细告诉我们如何复现你遇到的问题,如涉及代码,可提供一个最小代码示例,并使用反引号```附上它
placeholder: |
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
attributes:
label: 预期结果
description: 请告诉我们你预期会发生什么。
validations:
required: true
- type: textarea
attributes:
label: 实际结果
description: 请告诉我们实际发生了什么。
validations:
required: true
- type: textarea
attributes:
label: 截图或视频
description: 如果可以的话,上传任何关于 bug 的截图。
value: |
[在这里上传图片]
- type: dropdown
id: version
attributes:
label: 版本
description: 你当前正在使用我们软件的哪个版本/分支?
options:
- master (默认)
- dev (开发分支)
validations:
required: true

5
.gitee/ISSUE_TEMPLATE/config.yml

@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: 项目开发文档
url: http://vben-doc.x-surge.com/
about: 提供项目启动、开发的相关文档

43
.gitee/ISSUE_TEMPLATE/feature.yml

@ -1,43 +0,0 @@
name: 功能建议
description: 对本项目提出一个功能建议
title: '[功能建议]: '
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
感谢提出功能建议,我们将仔细考虑!
- type: textarea
id: related-problem
attributes:
label: 你的功能建议是否和某个问题相关?
description: 清晰并简洁地描述问题是什么,例如,当我...时,我总是感到困扰。
validations:
required: false
- type: textarea
id: desired-solution
attributes:
label: 你希望看到什么解决方案?
description: 清晰并简洁地描述你希望发生的事情。
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: 你考虑过哪些替代方案?
description: 清晰并简洁地描述你考虑过的任何替代解决方案或功能。
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: 你有其他上下文或截图吗?
description: 在此处添加有关功能请求的任何其他上下文或截图。
validations:
required: false
- type: checkboxes
attributes:
label: 意向参与贡献
options:
- label: 我有意向参与具体功能的开发实现并将代码贡献回到上游社区
required: false

2
.vscode/settings.json vendored

@ -53,8 +53,6 @@
"**/dist/**": true,
"**/yarn.lock": true
},
"stylelint.enable": true,
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
"path-intellisense.mappings": {
"@/": "${workspaceRoot}/src"
},

119
README.md

@ -1,119 +0,0 @@
# yudao-ui-admin-vben
**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!!**
**「我喜欢写代码,乐此不疲」**
**「我喜欢做开源,以此为乐」**
如果这个项目让你有所收获,记得 Star 关注哦,这对我是非常不错的鼓励与支持。
## 预览地址
- [预览地址](http://dashboard-vben.yudao.iocoder.cn/)
- [启动文档](https://doc.iocoder.cn/quick-start/)
- [开发文档](https://doc.vvbin.cn/)
- [视频教程](https://doc.iocoder.cn/video/)
## 外包项目请联系 [ xinyu370 ]
- ![alt 定制开发](./public/resource/img/wx2.png)
## 交流群
- ![alt 交流群](./public/resource/img/wx.png)
## 框架
| 框架 | 说明 | 版本 |
| -------------------------------------------------------------------- | --------------------- | ------ |
| [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.3.8 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.5.0 |
| [ant-design-vue](https://antdv.com/) | ant-design-vue | 4.0.7 |
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 5.2.2 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.1.7 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 10.6.0 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.6.5 |
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.2.5 |
| [unocss](https://uno.antfu.me/) | 原子 css | 0.57.3 |
| [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 3.1.1 |
- ![alt Admin](./public/resource/img/preview.png)
## 准备
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
- [Vite4](https://vitejs.dev/) - 熟悉 vite 特性
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
- [Ant-Design-Vue-4.0](https://antdv.com/) - ui 基本使用
## 安装使用
- 获取项目代码
```bash
git clone https://gitee.com/xingyuv/yudao-ui-admin-vben.git
or
git clone https://github.com/xingyuv/yudao-ui-admin-vben.git
```
- 安装依赖
```bash
pnpm i
如提示 Expected version: >=8.9.0
使用 cmd 等升级 pnpm 版本
npm add -g pnpm
```
- 运行
```bash
pnpm dev
or
// 如果不想启动后端
pnpm front
```
- 打包
```bash
pnpm build
```
## Git 贡献提交规范
- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
- `feat` 增加新功能
- `fix` 修复问题/BUG
- `style` 代码风格相关无影响运行结果的
- `perf` 优化/性能提升
- `refactor` 重构
- `revert` 撤销修改
- `test` 测试相关
- `docs` 文档/注释
- `chore` 依赖更新/脚手架配置修改等
- `workflow` 工作流改进
- `ci` 持续集成
- `types` 类型定义文件更改
- `wip` 开发中
## 浏览器支持
本地开发推荐使用`Chrome 80+` 浏览器
支持现代浏览器, 不支持 IE
| ![alt IE](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_32x32.png) | ![alt Edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_32x32.png) | ![alt Firefox](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_32x32.png) | ![alt Chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_32x32.png) | ![alt Safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_32x32.png) |
| :---------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: |
| [IE](http://godban.github.io/browsers-support-badges/) | [Edge](http://godban.github.io/browsers-support-badgess/) | [Firefox](http://godban.github.io/browsers-support-badges/) | [Chrome](http://godban.github.io/browsers-support-badges/) | [Safari](http://godban.github.io/browsers-support-badges/) |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

BIN
public/resource/img/preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

BIN
public/resource/img/wx.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

BIN
public/resource/img/wx2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

2
src/main.ts

@ -15,8 +15,6 @@ import { setupGlobDirectives } from '@/directives'
import { setupI18n } from '@/locales/setupI18n'
import { registerGlobComp } from '@/components/registerGlobComp'
import '@/utils/tongji'
async function bootstrap() {
const app = createApp(App)

23
src/utils/tongji.ts

@ -1,23 +0,0 @@
import { router } from '@/router'
// 用于 router push
window._hmt = window._hmt || []
// HM_ID
const HM_ID = import.meta.env.VITE_APP_BAIDU_CODE
;(function () {
// 有值的时候,才开启
if (!HM_ID)
return
const hm = document.createElement('script')
hm.src = `https://hm.baidu.com/hm.js?${HM_ID}`
const s = document.getElementsByTagName('script')[0]
s.parentNode?.insertBefore(hm, s)
})()
router.afterEach((to) => {
if (!HM_ID)
return
window._hmt.push(['_trackPageview', to.fullPath])
})