vueComponent / ant-design-vue-nuxt

MIT License
68 stars 7 forks source link

antd所有样式不生效 #46

Open noyalin opened 7 months ago

noyalin commented 7 months ago

浏览器中审查元素,发现ant开头的class样式等都不生效,不知道为什么?代码如下:

nuxt.config.ts

export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    '@ant-design-vue/nuxt'
  ],
})

package.json

{
  "name": "nuxt-app",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "dependencies": {
    "nuxt": "^3.10.3",
    "vue": "^3.4.19",
    "vue-router": "^4.3.0"
  },
  "devDependencies": {
    "@ant-design-vue/nuxt": "^1.4.1"
  }
}

app.vue

<template>
  <div>
    <a-button>
      button
    </a-button>
  </div>
</template>
luyaozi commented 4 months ago

还需要安装ant-design-vue 文档中没有xie