vue-cli-plugin-element-plus
vue-cli-plugin-element-plus copied to clipboard
ElNotification icon color presents always red as error type, no matter what type it is set
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)
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.
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