使用ant-design-vue
// plugins/antd-ui.ts
import Vue from 'vue'
import * as Antd from 'ant-design-vue';//一定要这样做,方便类型检查
Vue.use(Antd)
tsconfig.json文件
{
"compilerOptions": {
"target": "ES2016",
"module": "ESNext",
"moduleResolution": "Node",
"lib": [
"ESNext",
"ESNext.AsyncIterable",
"DOM"
],
"esModuleInterop": true,
"allowJs": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"jsx": "preserve",
"noEmit": true,
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"~/*": [
"*",
"/*"
],
"@/*": [
"*",
"/*"
]
},
"types": [
"@types/node",
"@nuxt/types"
]
},
"lib": [
"es5",
"es6",
"es7",
"es2015.promise",
"esnext",
"dom",
"dom.iterable",
"scripthost"
],
"include": [
"shims-vue.d.ts",
"plugins/**/*.ts",
"pages/**/*.vue",
"store/**/*.ts",
"shims-tsx.d.ts"
],
"exclude": [
"node_modules",
".nuxt",
"dist"
]
}
目录结构