Coder Social home page Coder Social logo

southliu / vue-admin Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 6.0 1.75 MB

Vue3+Vite+TypeScript+Ant Design Vue+Pinia等主流技术的后台管理系统项目,支持keepalive和Vite自动生成路由。

Home Page: https://southliu.gitee.io

License: MIT License

HTML 0.22% Vue 62.38% TypeScript 35.35% Less 1.31% Shell 0.03% CSS 0.72%
antv typescript pinia unocss ant-design vue-admin vue3 admin-template vue

vue-admin's Introduction

✨ 简介

使用Vue3,Vite,TypeScript,Ant Design Vue等主流技术开发的开箱即用的中后台前端项目,支持keepalive功能,Vite自动生成路由,pinia状态管理,vxe-table虚拟滚动表格,UnoCss开发样式。

🚀 项目演示

演示地址

💻 安装使用

  • 获取项目代码
git clone https://github.com/southliu/vue-admin.git
  • 选择目录
cd vue-admin
  • 安装全局依赖依赖,存在则不用安装
npm i -g pnpm
  • 安装依赖
pnpm install
  • 运行
pnpm dev
  • 打包
pnpm build

🧩 图标(iconify)

  • 参考 iconify官方地址
  • VS Code安装Iconify IntelliSense - 图标内联显示和自动补全

🎗️ Git 提交示例

Git提交不规范会导致无法提交,feat关键字可以按照下面Git 贡献提交规范来替换。

git add .
git commit -m "feat: 新增功能"
git push

🎯 Git 贡献提交规范

  • 参考 vue 规范

    • feat 增加新功能
    • fix 修复问题/BUG
    • style 代码风格相关无影响运行结果的
    • perf 优化/性能提升
    • refactor 重构
    • revert 撤销修改
    • test 测试相关
    • docs 文档/注释
    • chore 依赖更新/脚手架配置修改等
    • workflow 工作流改进
    • ci 持续集成
    • types 类型定义文件更改
    • wip 开发中
  • 如果无法运行commitlint,请运行以下指令:

  npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'

💡 计划

  • 主题换肤功能
  • i18n语言切换
  • 表单嵌套结构
  • 包分析工具
  • cli生成增删改查
  • 剪切板功能
  • 富文本组件
  • 虚拟滚动组件
  • 水印组件
  • 密码强度显示
  • 内容最大化功能
  • 404错误页
  • 封装文档说明
  • 密码规则
  • 弹窗拖拽功能
  • 弹窗最大化功能
  • Icon封装
  • 标签页右键功能
  • 搜索菜单功能

🐓 keep-alive说明:

如果需要使用keep-alive功能则需要文件名里面添加name即可。

/**
 * 需要通过路径转换成对应的name
 * /system/user => SystemUser
 * /content/article => ContentArticle
 */
defineOptions({
  name: 'SystemUser'
});

🐵 关于封装

  1. 功能扩展,在原有的api上拓展。
  2. 功能整合,合并两个或两个以上组件的api。
  3. 样式统一,避免后期样式变动,导致牵一发而动全身。

🤖 组件说明

表单(BasicForm):

属性名 必填 属性说明
name 表单域字段,如果是嵌套格式,则为数组
label 表单标签
rules 表单规则,参考模板
component 组件名,参考Antv名称,如Input
componentProps 组件属性,参考对应文档API,方法都是on开头,如dropdownVisibleChange要改为onDropdownVisibleChange

表格(BasicTable):

属性名 必填 属性说明
id 唯一标识(被某些特定的功能所依赖)
data 表格数据
columns 列数据
isLoading 加载动画
offsetHeight 高度偏移差,当表格高度过高出现滚动条的时候使用
isResize 是否开启监听窗口变化而更改高度

分页器(BasicPagination):

属性名 必填 属性说明
total 数据总数
page 当前页数
pageSize 每页条数
isLoading 加载动画

API下拉框(ApiSelect、ApiTreeSelect):

属性名 必填 属性说明
value 下拉框绑定值
componentProps 下拉框值,ApiSelect属性ApiTreeSelect属性
api API接口
params 接口参数
onDropdownVisibleChange 展开下拉菜单的回调

自定义组件

业务组件存放在src/components/Business目录下,每次新增组件想要在src/components/Business/index.tsx文件中引入。

vue-admin's People

Contributors

clshong avatar southliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vue-admin's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.