Open noyalin opened 9 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>
还需要安装ant-design-vue 文档中没有xie
浏览器中审查元素,发现ant开头的class样式等都不生效,不知道为什么?代码如下:
nuxt.config.ts
package.json
app.vue