forked from detanx/Vue3-Element-Plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tangxudong
committed
Apr 9, 2021
1 parent
a778576
commit bb241e6
Showing
23 changed files
with
7,608 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
/dist | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module.exports = { | ||
extends: ['plugin:vue/vue3-essential', 'airbnb-base'], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['vue'], | ||
rules: { | ||
// 自己配置的规则 | ||
indent: [2, 4], | ||
'no-unused-vars': [ | ||
2, | ||
{ | ||
vars: 'all', // "local",允许声明未使用变量 | ||
args: 'all', // 检查所有参数 | ||
}, | ||
], | ||
quotes: ['error', 'single', { allowTemplateLiterals: true }], // 字符串使用单引号/模版字符串 | ||
'import/no-absolute-path': [0], // 关闭不能使用绝对路径导入模块 @ 别名 | ||
'import/no-unresolved': [0], | ||
'no-restricted-globals': [0], // 关闭不能使用 isNaN 等方法 | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.vue'], | ||
rules: { | ||
// 这里写覆盖vue文件的规则 | ||
'no-unused-vars': [0], | ||
}, | ||
}, | ||
], | ||
settings: { | ||
// @路径引入的文件也需要校验 | ||
'import/resolver': { | ||
alias: { | ||
map: [['@', './src']], | ||
extensions: ['.ts', '.js', '.jsx', '.json', '.vue'], | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [ | ||
2, | ||
'always', | ||
['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore', 'revert'], | ||
], | ||
'subject-full-stop': [0, 'never'], | ||
'subject-case': [0, 'never'], | ||
}, | ||
}; | ||
// 用 于说明 commit 的'别,只允许使'下面7个标识。 | ||
|
||
// feat:新功能('eat're) | ||
// fix:修补bug | ||
// docs:文档(documentation) | ||
// style: 格式(不影响代码运行的变动) | ||
// refactor:重构(即不是新增功能,也不是修改bug的代码变动) | ||
// test:增加测试 | ||
// chore:构建过程或辅助工具的变动 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "vite-project", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite --mode development", | ||
"build:beta": "vite build --mode beta", | ||
"build:release": "vite build --mode release", | ||
"serve": "vite preview", | ||
"lint": "eslint . --ext .js,.ts --ignore-path .gitignore", | ||
"fix": "npm run lint -- --fix" | ||
}, | ||
"lint-staged": { | ||
"src/**/*.{js,ts,tsx}": [ | ||
"prettier --write", | ||
"eslint --fix --ext .js", | ||
"git add ." | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -e $GIT_PARAMS" | ||
} | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-customizable" | ||
} | ||
}, | ||
"dependencies": { | ||
"@vitejs/plugin-vue": "^1.1.5", | ||
"axios": "^0.21.1", | ||
"element-plus": "^1.0.2-beta.35", | ||
"moment": "^2.29.1", | ||
"vite": "^2.1.0", | ||
"vite-plugin-babel-import": "^2.0.2", | ||
"vue": "^3.0.5", | ||
"vue-router": "4" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^4.5.12", | ||
"@vue/compiler-sfc": "^3.0.5", | ||
"babel-plugin-component": "^1.1.1", | ||
"babel-plugin-import": "^1.13.3", | ||
"eslint": "^7.22.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-import-resolver-alias": "^1.1.2", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-vue": "^7.8.0", | ||
"husky": "^6.0.0", | ||
"lint-staged": "^10.5.4", | ||
"sass": "^1.32.8" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<router-view></router-view> | ||
</template> | ||
|
||
<script setup> | ||
import index from './pages/index.vue'; | ||
// This starter template is using Vue 3 experimental <script setup> SFCs | ||
// Check out https://github.com/vuejs/rfcs/blob/script-setup-2/active-rfcs/0000-script-setup.md | ||
</script> | ||
|
||
<style lang="scss"> | ||
#app { | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
.detanx { | ||
color: $color; | ||
} | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
html, body, div, span, applet, object, iframe, | ||
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
a, abbr, acronym, address, big, cite, code, | ||
del, dfn, em, img, ins, kbd, q, s, samp, | ||
small, strike, strong, sub, sup, tt, var, | ||
b, u, i, center, | ||
dl, dt, dd, ol, ul, li, | ||
fieldset, form, label, legend, | ||
table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, canvas, details, embed, | ||
figure, figcaption, footer, header, hgroup, | ||
menu, nav, output, ruby, section, summary, | ||
time, mark, audio, video{ | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-size: 100%; | ||
font: inherit; | ||
font-weight: normal; | ||
vertical-align: baseline; | ||
} | ||
/* HTML5 display-role reset for older browsers */ | ||
article, aside, details, figcaption, figure, | ||
footer, header, hgroup, menu, nav, section{ | ||
display: block; | ||
} | ||
ol, ul, li{ | ||
list-style: none; | ||
} | ||
blockquote, q{ | ||
quotes: none; | ||
} | ||
blockquote:before, blockquote:after, | ||
q:before, q:after{ | ||
content: ''; | ||
content: none; | ||
} | ||
table{ | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
} | ||
|
||
/* custom */ | ||
a{ | ||
color: #7e8c8d; | ||
text-decoration: none; | ||
backface-visibility: hidden; | ||
} | ||
::-webkit-scrollbar{ | ||
width: 5px; | ||
height: 5px; | ||
} | ||
::-webkit-scrollbar-track-piece{ | ||
background-color: rgba(0, 0, 0, 0.2); | ||
border-radius: 6px; | ||
} | ||
::-webkit-scrollbar-thumb:vertical{ | ||
height: 5px; | ||
background-color: rgba(125, 125, 125, 0.7); | ||
border-radius: 6px; | ||
} | ||
::-webkit-scrollbar-thumb:horizontal{ | ||
width: 5px; | ||
background-color: rgba(125, 125, 125, 0.7); | ||
border-radius: 6px; | ||
} | ||
html, body{ | ||
width: 100%; | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
} | ||
body{ | ||
line-height: 1; | ||
-webkit-text-size-adjust: none; | ||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
} | ||
html{ | ||
overflow-y: scroll; | ||
} | ||
|
||
/*清除浮动*/ | ||
.clearfix:before, | ||
.clearfix:after{ | ||
content: " "; | ||
display: inline-block; | ||
height: 0; | ||
clear: both; | ||
visibility: hidden; | ||
} | ||
.clearfix{ | ||
*zoom: 1; | ||
} | ||
|
||
/*隐藏*/ | ||
.dn{ | ||
display: none; | ||
} | ||
|
||
// 生成 0,2,4,6...24的padding,margin及其四个方向 | ||
$directions:("t":"top", "b":"bottom", "l":"left", "r":"right"); | ||
$dimensions:("p":"padding", "m":"margin"); | ||
//获取padding margin间隔 | ||
@each $dim in $dimensions { | ||
//循环四个方向 | ||
@each $dir in $directions { | ||
@for $i from 0 through 12 { | ||
$size: $i*2; | ||
.#{nth($dim,1)}#{nth($dir,1)}-#{$size} { | ||
#{nth($dim,2)}-#{nth($dir,2)}: #{$size}px; | ||
} | ||
.m-#{$size} { | ||
#{nth($dim,2)}: #{$size}px; | ||
} | ||
.p-#{$size} { | ||
#{nth($dim,2)}: #{$size}px; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$color: blue; | ||
|
Oops, something went wrong.