@fe6/water-pro
Version:
An enterprise-class UI design language and Vue-based implementation
29 lines (24 loc) • 491 B
text/typescript
import defaultLocale from '../locale/default';
export interface ModalLocale {
okText: string;
cancelText: string;
justOkText: string;
}
let runtimeLocale = {
...defaultLocale.Modal,
};
export function changeConfirmLocale(newLocale?: ModalLocale) {
if (newLocale) {
runtimeLocale = {
...runtimeLocale,
...newLocale,
};
} else {
runtimeLocale = {
...defaultLocale.Modal,
};
}
}
export function getConfirmLocale() {
return runtimeLocale;
}