29 lines
483 B
TypeScript
29 lines
483 B
TypeScript
![]() |
import defaultLocale from '../locale/default';
|
||
![]() |
|
||
![]() |
export interface ModalLocale {
|
||
|
okText: string;
|
||
|
cancelText: string;
|
||
|
justOkText: string;
|
||
|
}
|
||
![]() |
|
||
|
let runtimeLocale = {
|
||
|
...defaultLocale.Modal,
|
||
![]() |
};
|
||
![]() |
|
||
![]() |
export function changeConfirmLocale(newLocale?: any) {
|
||
![]() |
if (newLocale) {
|
||
|
runtimeLocale = {
|
||
|
...runtimeLocale,
|
||
|
...newLocale,
|
||
![]() |
};
|
||
![]() |
} else {
|
||
|
runtimeLocale = {
|
||
|
...defaultLocale.Modal,
|
||
![]() |
};
|
||
![]() |
}
|
||
|
}
|
||
|
|
||
![]() |
export function getConfirmLocale() {
|
||
|
return runtimeLocale;
|
||
![]() |
}
|