TDesignOteam / tdesign-nuxt

TDesign module for Nuxt
MIT License
13 stars 2 forks source link

怎么添加插件呢,插件名在哪里看 #19

Open RedCarl opened 2 months ago

RedCarl commented 2 months ago

我想使用 MessagePlugin.error("错误"); 但是 500 Cannot read properties of undefined (reading 'querySelector')

// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ compatibilityDate: '2024-04-03', devtools: { enabled: true }, modules: ['@tdesign-vue-next/nuxt', '@nuxtjs/tailwindcss'], tdesign: { resolveIcons: true, plugins: ['MessagePlugin'] } })

liweijie0812 commented 1 day ago

不配置plugins ,插件是默认全部导入的 我试了没问题

image image

引用后运行 npm run generate,生成.nuxt ,vscode 有提示

image