首页 > 其他 > 详细

nuxt+ts

时间:2020-09-10 14:53:46      阅读:126      评论:0      收藏:0      [点我收藏+]

使用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"
  ]
}

 

目录结构

技术分享图片

 

nuxt+ts

原文:https://www.cnblogs.com/zhizou/p/13645234.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!