【问题标题】:Loading CSS bootstrap-4 theme for sweet-alert2为 sweetalert2 加载 CSS bootstrap-4 主题
【发布时间】:2021-04-09 20:24:56
【问题描述】:

我在我的项目中使用 SweetAlert2。我将 VueJS 和 vue-cli-service 与 webpack 一起使用。

因为我想使用 boostrap-4 主题,所以我按照说明进行操作:

npm i npm install @sweetalert2/theme-bootstrap-4

我在 index.html 中包含了这个 css

<link rel="stylesheet" href="@sweetalert2/themes/bootstrap-4/bootstrap-4.css">

但它只会导致404错误,当然主题也不显示。我似乎不明白它应该如何工作以及出了什么问题。

感谢您的帮助。

【问题讨论】:

    标签: vue.js npm webpack webpack-dev-server sweetalert2


    【解决方案1】:

    根据README of @sweetalert2/theme-bootstrap-4你需要使用

    <link rel="stylesheet" href="@sweetalert2/theme-bootstrap-4/bootstrap-4.css">
    

    【讨论】:

    • 不,没用,还是404。
    猜你喜欢
    • 1970-01-01
    • 2016-09-29
    • 2021-09-27
    • 1970-01-01
    • 2018-08-02
    • 2014-07-23
    • 1970-01-01
    • 1970-01-01
    • 2017-06-15
    相关资源
    最近更新 更多