1 Star 2 Fork 2

common-code-template / common-frontend-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

common-frontend-template(通用前端模板)

介绍

项目基础模板,提供基础的功能模块,base on yupi,具体如下:

  1. B站完整介绍教程:https://www.bilibili.com/video/BV1jN4y1S7eC/?spm_id_from=333.999.list.card_archive.click&vd_source=3c68c4954142f1c67c2386ed8e28d42c
  2. 项目语言:Vue3 + Typescript
  3. 组件库:Arco Design,字节跳动开发的组件库,官方文档:https://arco.design/vue/docs/start
  4. 接口工具:Axios + OpenAPI
  5. 代码规范:ESLint + Prettier
  6. 富文本编辑器:@bytemd/vue-next(md编辑器)+monaco-editor(代码编辑器)
  7. 状态管理:Vuex
  8. 路由管理:Vue Router
  9. 项目构建:Vue-Cli

软件架构

  1. public:存放公共资源
  2. src:
    1. components:存放组件,其中包括全局组件、页面组件(md、code编辑器)
    2. views:存放页面,包括页面组件
    3. assets:存放静态资源
    4. store:存放状态管理
    5. router:存放路由管理
    6. common:存放公共方法和枚举
    7. layouts:存放两种布局方式,与APP.vue联动
    8. access:存放权限控制逻辑
  3. 其余为配置类,可自行研究设置,尤其是vue.config.jsApp.vuemain.ts

安装教程

  1. 建议在WebStorm软件打开,并完成以下配置:

    1. 配置ESLint:

    2. 配置Prettier:

  2. 推荐使用node v18.16.0版本,npm v9.5.1版本,向上兼容(但也不要太新)

    1.5. npm install

  3. 运行package.json中的scripts.lint命令,保证代码格式不出错

  4. 运行package.json中的scripts.serve命令,运行项目

  5. 视情况可使用OpenAPI动态生成axios请求方法集合,官方文档:https://github.com/ferdikoomen/openapi-typescript-codegen

  6. 运行成功效果:

使用说明

  1. 写好了基本的Arco Design组件的使用,table、button、tag等组件的使用,详情可自行研究页面
  2. 遇事不决,使用Ctrl+Shift+F,全局搜索todo

后勤

有其他问题可至我的B站私信反馈(请标明来处和目的):https://space.bilibili.com/1198127286?spm_id_from=333.1007.0.0 bilibili

项目完整目录结构:

├─.idea
  ├─inspectionProfiles
  └─jsLinters
├─public
└─src
    ├─access
    ├─assets
    ├─common
      ├─enum
      └─utils
    ├─components
    ├─layouts
    ├─plugins
    ├─router
    ├─store
    └─views
        ├─question
        └─user
MIT License Copyright (c) 2023 朱卓烜 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

通用Vue3+Arco Design项目模板,集合了TypeScript、Axios、Vuex、OpenAPI等技术,详情请看README文件~ 展开 收起
TypeScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/cct_4/common-frontend-template.git
git@gitee.com:cct_4/common-frontend-template.git
cct_4
common-frontend-template
common-frontend-template
master

搜索帮助