1 Star 2 Fork 0

zedream / vue3-ts

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

vue3-ts

关键字

运行项目

开发环境运行
yarn start
生产环境打包
yarn build

webpack全局定义的方法

无需引用,直接在代码中使用。可通过webpack.ProvidePlugin继续添加

方法名 说明
cloneDeep 深拷贝
throttle 节流
debounce 防抖

process.env下的环境变量

可在config中配置

变量名 说明 可能的值
NODE_ENV 区分开发环境与生产环境 developmentproduction
APP_NODE_ENV 区分production下的自定义环境 devprodsituat
PUBLIC_PATH 项目资源基础路径 //app///app.cdn.com
BASE_URL http请求目标 /https://tanghaoo.com
ENV_NAME 当前环境名称 开发环境、测试环境

目录结构

├── .husky    [git hooks,用于在git commit成功前进行eslint检测,规范即将提交的代码风格]      
├── config    [项目配置文件]
│   ├── config.js    [项目基础配置]
│   ├── webpack.base.config.js    [webpack公共基础配置]
│   ├── webpack.dev.config.js    [webpack开发环境配置]
│   └── webpack.prod.config.js    [webpack生产环境配置]
├── node_modules
├── public
│   └── index.html
├── scripts    [项目配置脚本]
│   ├── build.js    [生产环境打包脚本]
│   ├── env.js    [处理config里的环境变量]
│   ├── start.js    [开发环境运行脚本]
│   └── utils.js    [脚本所需公共方法]
├── src    [项目源代码 快捷目录(@/)]
│   ├── api
│   ├── assets    [项目使用的公共资源]
│   │   ├── iconfont    [字体图标]
│   │   ├── image    [图片 快捷目录(img/)]
│   │   └── styles    [公共样式]
│   ├── components    [公共组件]
│   ├── hooks    [自定义hook函数]
│   ├── pages    [非常用业务组件]
│   │   ├── access    [账号相关页]
│   │   └── error    [错误页]
│   ├── request    [http请求]
│   ├── router    [页面路由]
│   │   ├── views    [业务页面route]
│   │   ├── pages.routes.ts    [非常用业务页面route组合]
│   │   └── views.routes.ts    [业务页面route组合]
│   ├── store    [状态]
│   │   ├── modules    [不同模块状态]
│   │   └── mutation.types.ts    [mutation方法名定义]
│   ├── types    [类型定义]
│   ├── utils    [公共方法]
│   ├── views    [业务组件]
│   └── works    [webwork]
MIT License Copyright (c) 2021 zedream 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.

简介

webpack5搭建的vue3 + typescript项目 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/tanghao_th/vue3-ts.git
git@gitee.com:tanghao_th/vue3-ts.git
tanghao_th
vue3-ts
vue3-ts
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891