无法更改Bootstrap-vue中的主题颜色

发布于 2025-02-08 22:00:38 字数 505 浏览 1 评论 0原文

我想更改bootstrap-vue 主题颜色,主要,成功,危险...

我已经阅读了文档,但仍然无法做到

这是主题。 SCSS

$body-bg: red;
$body-color: #111;

$theme-colors: (
  "primary": red,
  "danger": #caaf12
);

$primary:red;

@import '../node_modules/bootstrap/scss/bootstrap';

@import '../node_modules/bootstrap-vue/src/index.scss';

和我已经在Main.scs中导入了此文件

@import url('./theme.scss');
body{
...
 }

,但仍然没有更改原色?

我该如何修复?

I want to change Bootstrap-vue theme colors , primary , success , danger ...

I have read document but still can't do that

this is theme.scss

$body-bg: red;
$body-color: #111;

$theme-colors: (
  "primary": red,
  "danger": #caaf12
);

$primary:red;

@import '../node_modules/bootstrap/scss/bootstrap';

@import '../node_modules/bootstrap-vue/src/index.scss';

and I have imported this file in my main.scss like this

@import url('./theme.scss');
body{
...
 }

But still primary color does not change

How can I fix this ?

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

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

发布评论

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

评论(1

春花秋月 2025-02-15 22:00:38

我找到了答案。

我必须在nuxt-config中添加them.scss。
CSS:['./ Assets/theme.scss']

也这样的导入地址

@import 'node_modules/bootstrap/scss/bootstrap';

@import 'node_modules/bootstrap-vue/src/index.scss';

I found answer .

I have to add theme.scss in nuxt-config like this
css:['./assets/theme.scss']

also ichanged import address like this

@import 'node_modules/bootstrap/scss/bootstrap';

@import 'node_modules/bootstrap-vue/src/index.scss';
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文