feat: 添加了 element-plus
This commit is contained in:
parent
15393967a3
commit
4c46021389
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
@ -4,6 +4,7 @@
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"jsx": "preserve",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
|
13
package.json
13
package.json
@ -11,6 +11,8 @@
|
||||
"dependencies": {
|
||||
"axios": "^0.27.2",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "1.3.0-beta.5",
|
||||
"lint-staged": "13.0.3",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuex": "^4.0.0"
|
||||
@ -25,6 +27,7 @@
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"@vue/composition-api": "^1.1.0",
|
||||
"@vue/eslint-config-standard": "^6.1.0",
|
||||
"cz-customizable": "^6.3.0",
|
||||
"eslint": "^7.32.0",
|
||||
@ -34,11 +37,19 @@
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"husky": "^7.0.1",
|
||||
"sass": "^1.32.7",
|
||||
"sass-loader": "^12.0.0"
|
||||
"sass-loader": "^12.0.0",
|
||||
"unplugin-auto-import": "^0.9.3",
|
||||
"unplugin-vue-components": "^0.21.1"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "node_modules/cz-customizable"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,16 @@
|
||||
<template>
|
||||
<nav>
|
||||
<el-button>Default</el-button>
|
||||
<el-button type="primary">Primary</el-button>
|
||||
<el-button type="success">Success</el-button>
|
||||
<el-button type="info">Info</el-button>
|
||||
<el-button type="warning">Warning</el-button>
|
||||
<el-button type="danger">Danger</el-button>
|
||||
<el-button>中文</el-button>
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
</nav>
|
||||
<router-view/>
|
||||
<router-view />
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -1,4 +1,19 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
||||
// const { defineConfig } = require('@vue/cli-service')
|
||||
// module.exports = defineConfig({
|
||||
// transpileDependencies: true
|
||||
// })
|
||||
|
||||
const AutoImport = require('unplugin-auto-import/webpack')
|
||||
const Components = require('unplugin-vue-components/webpack')
|
||||
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
|
||||
|
||||
module.exports = {
|
||||
configureWebpack: config => {
|
||||
config.plugins.push(AutoImport({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}))
|
||||
config.plugins.push(Components({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}))
|
||||
},
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user