雏菊UI自定义主题在导入后不起作用

发布于 2025-01-28 15:18:22 字数 112 浏览 3 评论 0原文

我曾导入雏菊UI插件。但是,仍然将自己转换为黑暗模式如何解决该问题?我希望我的主题在光模式下不使用 data-theme html属性中的光

I had imported daisy UI plugins. But still converts itself to dark mode how to fix that problem? I wanted my theme in light mode without using data-theme light in the html attribute

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘿咻 2025-02-04 15:18:22

在tailwind.config.js中,将主题设置为false。例子:
module.exports = {plugins:[require('daisyui')],daisyui:{themes:false}}};

In tailwind.config.js set themes to false. Example:
module.exports = { plugins: [require('daisyui')], daisyui: { themes: false } };

剑心龙吟 2025-02-04 15:18:22

将此代码放在 tailwind.config.js 中,将应用光主题。如果要使用不同的主题,则可以访问此处

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [require("daisyui")],
  daisyui: {
    themes: ["light"],
  },
};

Put this code to tailwind.config.js, the light theme will be applied. If you want to use different themes then you can visit here

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [require("daisyui")],
  daisyui: {
    themes: ["light"],
  },
};
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文