ant-design-vue/components/modal/locale.js
2018-03-06 19:14:41 +08:00

29 lines
498 B
JavaScript

import defaultLocale from '../locale-provider/default'
// export interface ModalLocale {
// okText: string;
// cancelText: string;
// justOkText: string;
// }
let runtimeLocale = {
...defaultLocale.Modal,
}
export function changeConfirmLocale (newLocale) {
if (newLocale) {
runtimeLocale = {
...runtimeLocale,
...newLocale,
}
} else {
runtimeLocale = {
...defaultLocale.Modal,
}
}
}
export function getConfirmLocale () {
return runtimeLocale
}