ant-design-vue/components/modal/locale.js

29 lines
501 B
JavaScript
Raw Normal View History

2019-01-12 03:33:27 +00:00
import defaultLocale from '../locale-provider/default';
2018-03-06 11:14:41 +00:00
// export interface ModalLocale {
// okText: string;
// cancelText: string;
// justOkText: string;
// }
let runtimeLocale = {
...defaultLocale.Modal,
2019-01-12 03:33:27 +00:00
};
2018-03-06 11:14:41 +00:00
2019-01-12 03:33:27 +00:00
export function changeConfirmLocale(newLocale) {
2018-03-06 11:14:41 +00:00
if (newLocale) {
runtimeLocale = {
...runtimeLocale,
...newLocale,
2019-01-12 03:33:27 +00:00
};
2018-03-06 11:14:41 +00:00
} else {
runtimeLocale = {
...defaultLocale.Modal,
2019-01-12 03:33:27 +00:00
};
2018-03-06 11:14:41 +00:00
}
}
2019-01-12 03:33:27 +00:00
export function getConfirmLocale() {
return runtimeLocale;
2018-03-06 11:14:41 +00:00
}