Skip to content

Commit

Permalink
refactor: async routes generation
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Jun 12, 2023
1 parent a0510f7 commit dc7b7a1
Show file tree
Hide file tree
Showing 40 changed files with 685 additions and 894 deletions.
18 changes: 8 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @type {import('eslint').ESLint.ConfigData}
*/
module.exports = {
root: true,
env: {
Expand All @@ -16,12 +19,12 @@ module.exports = {
tsx: true,
},
},
plugins: ['@typescript-eslint', 'prettier', 'import'],
plugins: ['vue', '@typescript-eslint', 'import'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
overrides: [
{
Expand All @@ -32,6 +35,8 @@ module.exports = {
},
],
rules: {
'no-unused-vars': 'off',

// js/ts
// 'no-console': ['warn', { allow: ['error'] }],
'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'],
Expand Down Expand Up @@ -64,13 +69,6 @@ module.exports = {
varsIgnorePattern: '^_',
},
],
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],

// vue
'vue/no-v-html': 'off',
Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @type {import('@babel/core').TransformOptions}
*/
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
Expand Down
10 changes: 10 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @type {import('stylelint').Config}
*/
module.exports = {
'*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
'*.json': ['prettier --write'],
'*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix --allow-empty-input'],
'*.{scss,less,styl,html}': ['stylelint --fix --allow-empty-input', 'prettier --write'],
'*.md': ['prettier --write'],
};
60 changes: 20 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:fix": "eslint --fix . --ext .vue,.js,.ts,.jsx,.tsx,.md,.json && pretty-quick --branch dev",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:stylelint": "stylelint \"**/*.{vue,css,less.scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged",
"prepare": "husky install",
"reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run dev",
Expand All @@ -37,8 +37,8 @@
"@vueuse/core": "~10.1.2",
"ant-design-vue": "3.2.20",
"axios": "~1.4.0",
"core-js": "~3.30.2",
"dayjs": "~1.11.7",
"core-js": "~3.31.0",
"dayjs": "~1.11.8",
"echarts": "^5.4.2",
"file-saver": "~2.0.5",
"lodash-es": "~4.17.21",
Expand All @@ -48,7 +48,7 @@
"pinia": "~2.1.3",
"qiniu-js": "^3.4.1",
"qs": "~6.11.2",
"socket.io-client": "~4.6.1",
"socket.io-client": "~4.6.2",
"sortablejs": "~1.15.0",
"vue": "3.3.4",
"vue-echarts": "^6.5.5",
Expand All @@ -61,50 +61,51 @@
"@commitlint/cli": "~17.6.5",
"@commitlint/config-conventional": "~17.6.5",
"@types/lodash-es": "~4.17.7",
"@types/node": "~20.2.5",
"@types/node": "~20.3.0",
"@types/webpack-env": "~1.18.1",
"@typescript-eslint/eslint-plugin": "~5.59.8",
"@typescript-eslint/parser": "~5.59.8",
"@typescript-eslint/eslint-plugin": "~5.59.9",
"@typescript-eslint/parser": "~5.59.9",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-router": "~5.0.8",
"@vue/cli-plugin-typescript": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/eslint-config-typescript": "~11.0.3",
"@vue/tsconfig": "^0.4.0",
"conventional-changelog-cli": "~2.2.2",
"conventional-changelog-cli": "~3.0.0",
"cross-env": "~7.0.3",
"cz-git": "~1.6.1",
"czg": "~1.6.1",
"eslint": "~8.41.0",
"eslint": "~8.42.0",
"eslint-config-prettier": "~8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-prettier": "~4.2.1",
"eslint-plugin-vue": "~9.14.1",
"husky": "~8.0.3",
"less": "~4.1.3",
"less-loader": "11.1.1",
"lint-staged": "~12.5.0",
"less-loader": "11.1.3",
"lint-staged": "~13.2.2",
"path-browserify": "~1.0.1",
"postcss-html": "~1.5.0",
"postcss-less": "~6.0.0",
"postcss-less": "^6.0.0",
"prettier": "~2.8.8",
"pretty-quick": "~3.1.3",
"regenerator-runtime": "~0.13.11",
"speed-measure-webpack-plugin": "~1.5.0",
"stylelint": "~15.6.2",
"stylelint": "~15.7.0",
"stylelint-config-html": "~1.1.0",
"stylelint-config-prettier": "~9.0.5",
"stylelint-config-property-sort-order-smacss": "^9.1.0",
"stylelint-config-recommended": "~12.0.0",
"stylelint-config-recommended-vue": "~1.4.0",
"stylelint-config-standard": "~33.0.0",
"stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-order": "~6.0.3",
"stylelint-prettier": "^3.0.0",
"svg-sprite-loader": "~6.0.11",
"ts-node": "^10.9.1",
"typescript": "~5.0.4",
"unplugin-vue-define-options": "~1.3.7",
"typescript": "~5.1.3",
"unplugin-vue-define-options": "~1.3.8",
"vue-cli-plugin-windicss": "~1.1.6",
"vue-eslint-parser": "~9.3.0",
"vue-eslint-parser": "~9.3.1",
"vue-tsc": "^1.6.5"
},
"__npminstall_done": false,
Expand All @@ -125,26 +126,5 @@
"license": "MIT",
"engines": {
"node": ">=14"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.json": [
"prettier --write"
],
"*.vue": [
"eslint --fix",
"prettier --write",
"stylelint --fix"
],
"*.{scss,less,styl,html}": [
"stylelint --fix",
"prettier --write"
],
"*.md": [
"prettier --write"
]
}
}
3 changes: 3 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @type {import('prettier').Config}
*/
module.exports = {
printWidth: 100,
semi: true,
Expand Down
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="referrer" content="origin" />
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<meta name="viewport" content="user-scalable=yes" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
Expand Down
10 changes: 5 additions & 5 deletions src/components/basic/context-menu/src/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,20 @@
}
.context-menu {
display: block;
position: fixed;
z-index: 200;
top: 0;
left: 0;
z-index: 200;
display: block;
width: 156px;
margin: 0;
list-style: none;
background-color: @component-background;
border: 1px solid rgb(0 0 0 / 8%);
border-radius: 0.25rem;
background-clip: padding-box;
background-color: @component-background;
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%),
0 1px 5px 0 rgb(0 0 0 / 6%);
background-clip: padding-box;
list-style: none;
user-select: none;
&__item {
Expand Down
1 change: 1 addition & 0 deletions src/components/basic/lockscreen/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
.slide-up-leave-active {
animation: slide-up 0.5s reverse;
}
@keyframes slide-up {
0% {
transform: translateY(-100%);
Expand Down
25 changes: 11 additions & 14 deletions src/components/basic/lockscreen/lockscreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,31 +148,28 @@

<style lang="less" scoped>
.lockscreen {
display: flex;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 9999;
display: flex;
inset: 0;
overflow: hidden;
color: white;
background: #000;
color: white;
&.unLockLogin {
background-color: rgba(25, 28, 34, 0.78);
background-color: rgb(25 28 34 / 78%);
backdrop-filter: blur(7px);
}
.login-box {
display: flex;
position: absolute;
top: 45%;
left: 50%;
display: flex;
transform: translate(-50%, -50%);
flex-direction: column;
justify-content: center;
align-items: center;
justify-content: center;
transform: translate(-50%, -50%);
> * {
margin-bottom: 14px;
Expand All @@ -187,8 +184,8 @@
position: absolute;
top: 12vh;
left: 50%;
font-size: 34px;
transform: translateX(-50%);
font-size: 34px;
.tips {
color: white;
Expand Down Expand Up @@ -246,15 +243,15 @@
position: relative;
&.offline::before {
content: '';
position: absolute;
z-index: 10;
top: 50%;
left: 50%;
z-index: 10;
width: 2px;
height: 28px;
background-color: red;
content: '';
transform: translate(-50%, -50%) rotate(45deg);
background-color: red;
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/basic/split-panel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
.scalable {
position: relative;
width: 240px;
max-width: 50vw;
min-width: 100px;
max-width: 50vw;
overflow: auto;
.left-content {
Expand All @@ -70,16 +70,16 @@
}
.separator {
display: flex;
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
width: 14px;
height: 100%;
box-shadow: -4px -2px 4px -5px rgb(0 0 0 / 35%), 4px 3px 4px -5px rgb(0 0 0 / 35%);
cursor: col-resize;
box-shadow: -4px -2px 4px -5px rgba(0, 0, 0, 0.35), 4px 3px 4px -5px rgba(0, 0, 0, 0.35);
align-items: center;
justify-content: center;
i {
width: 1px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/basic/svg-icon/svg-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<style lang="less">
.svg-icon {
overflow: hidden;
vertical-align: -0.15em;
fill: currentcolor;
vertical-align: -0.15em;
}
</style>
Loading

1 comment on commit dc7b7a1

@vercel
Copy link

@vercel vercel bot commented on dc7b7a1 Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue3-antd-admin – ./

vue3-antd-admin-buqiyuan.vercel.app
vue3-antd-admin.vercel.app
vue3-antd-admin-git-main-buqiyuan.vercel.app

Please sign in to comment.