Skip to content

Commit

Permalink
Merge pull request #18 from Explicit12/Change-notify-locale-struture
Browse files Browse the repository at this point in the history
Changed notify locale structure
  • Loading branch information
Explicit12 authored May 1, 2024
2 parents be506cb + 74d2b7e commit 7fe5b92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/ui.notify/configs/default.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ export default /*tw*/ {
long: 12000,
},
i18n: {
success: "Operation successful.",
warning: "Operation warning.",
error: "Operation error.",
success: {
default: "Operation successful.",
},
warning: {
default: "Operation warning.",
},
error: {
default: "Operation error.",
},
},
positionClasses: {
page: "UNotifyPage",
Expand Down
2 changes: 1 addition & 1 deletion src/ui.notify/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function setPosition() {
}
function getText(notificationText, type) {
return notificationText || currentLocale.value[type];
return notificationText || currentLocale.value[type]?.default;
}
function getNotificationClasses(notification) {
Expand Down

0 comments on commit 7fe5b92

Please sign in to comment.