Skip to content

Commit 1a8053c

Browse files
committed
v0.0.1
1 parent 238f8a2 commit 1a8053c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+16887
-0
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

.eslintrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:vue/essential',
8+
'@vue/prettier'
9+
],
10+
rules: {
11+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
13+
},
14+
parserOptions: {
15+
parser: 'babel-eslint'
16+
}
17+
}

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
/tests/e2e/videos/
6+
/tests/e2e/screenshots/
7+
8+
# local env files
9+
.env.local
10+
.env.*.local
11+
12+
# Log files
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
17+
# Editor directories and files
18+
.idea
19+
.vscode
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw*

.npmrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
2+
chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
3+
4+
registry=https://registry.npm.taobao.org

.postcssrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
"postcss-import": {},
4+
autoprefixer: {}
5+
}
6+
}

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
# vue-cli3-demo
22
A demo about vue cli 3.
3+
4+
> 注意,本项目采用 `Vue CLI 3` 进行初始化构建而来,更多初始化方式请参考官方站点:[Vue CLI 3](https://cli.vuejs.org/)
5+
6+
## Feature
7+
8+
- 使用 `vuex` 进行状态管理。
9+
- 使用 `vue-router` 做路由管理。
10+
- 引入 `babel-polyfill`
11+
- 使用 `mockjs` 做数据模拟。
12+
- 模拟登陆和登出的操作。
13+
- 权限简单判断。
14+
- 使用 `iconfont` 作为字体图标管理。
15+
- 同时支持 `less``sass` 的编写。
16+
- 简单组件封装示例 `z-icon`
17+
- 自定义过滤器方法。
18+
- 请求 API 方法入口封装。~~暂无后台,无实际交互,可根据需要自行封装~~
19+
- 本地开发时支持直接获取局域网 IP 进行访问。
20+
21+
注意:
22+
23+
- 因为个人编码喜好原因,`eslint` 不在编码时进行限制和检查,后续统一在代码审查环节进行,具体操作方式这里不做过多说明。
24+
- 分号的风格,个人崇尚自由。

babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
}

config/getLocalIp.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
3+
/**
4+
* 获取本机局域网内的 IP 地址
5+
*/
6+
7+
const os = require('os');
8+
9+
module.exports = function getLocalIp(ns = '本地连接') {
10+
var nifs = os.networkInterfaces(); // 获取网卡信息
11+
var _ns = nifs[ns] || [];
12+
for (var i = 0; i < _ns.length; i++) {
13+
if (_ns[i].family === 'IPv4') {
14+
return _ns[i].address;
15+
}
16+
}
17+
return '';
18+
};

cypress.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pluginsFile": "tests/e2e/plugins/index.js"
3+
}

0 commit comments

Comments
 (0)