【问题标题】:How do i add a style to notifications in vue.js?如何在 vue.js 中为通知添加样式?
【发布时间】:2022-01-06 23:04:13
【问题描述】:
this.$notify({
        title: 'İşlem Başarılı',
        message: 'REQUEST SUCCESSFULLY SAVED',
        type: 'success',
        classes: 'notfClas'
      })

当我添加一个类时,它看不到它。如何为通知添加样式?

【问题讨论】:

    标签: javascript vue.js vuejs2 vue-component vuetify.js


    【解决方案1】:

    如果您使用vue-notifications package,您可以通过described here 的组件属性管理它的设置(包括类列表)。喜欢:

    <notifications classes="your-class-name"/>
    

    还有一个小例子可能有用http://vue-notification.yev.io/

    【讨论】:

    • 我正在使用 Element UI。它不能那样工作。
    【解决方案2】:

    classes 更改为customClass

    属性:customClass

    描述:通知的自定义类名

    https://element.eleme.io/#/en-US/component/notification

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-15
      • 1970-01-01
      • 2012-07-17
      • 1970-01-01
      • 1970-01-01
      • 2022-08-13
      • 2011-01-11
      相关资源
      最近更新 更多