vue-cli-plugin-element-plus icon indicating copy to clipboard operation
vue-cli-plugin-element-plus copied to clipboard

ElNotification icon color presents always red as error type, no matter what type it is set

Open egao5566 opened this issue 4 years ago • 2 comments
trafficstars

i tried

this.$notify.success({
            title: "transaction successed",
            message: 'success',
            duration: 3000,
})

and

this.$notify({
            title: "transaction successed",
            message: 'success',
            type: 'success',  //or 'info' or 'warning'
            duration: 3000,
});

at last always get a right icon with color red (type error)

egao5566 avatar Nov 16 '21 07:11 egao5566

Did you upgrade it?

Try import { ElNotification } from 'element-plus'.

ElNotification({
    title: 'Success',
    message: 'This is a success message',
    type: 'success',
  })

More info see https://element-plus.org/en-US/component/notification.html#notification.

YunYouJun avatar Nov 20 '21 09:11 YunYouJun

Did you upgrade it?

Try import { ElNotification } from 'element-plus'.

ElNotification({
    title: 'Success',
    message: 'This is a success message',
    type: 'success',
  })

More info see https://element-plus.org/en-US/component/notification.html#notification.

sure. version 0.013 which noted latest version in vue-cli. and import action is done in main.js

import { ElNotification } from 'element-plus'
...
app.config.globalProperties.$notify = ElNotification

egao5566 avatar Nov 22 '21 09:11 egao5566