ant-design/components/modal/locale.js

20 lines
389 B
JavaScript
Raw Normal View History

const defaultLocale = {
okText: '确定',
cancelText: '取消',
justOkText: '知道了',
};
let runtimeLocale = { ...defaultLocale };
export function changeConfirmLocale(newLocale) {
if (newLocale) {
runtimeLocale = { ...runtimeLocale, ...newLocale };
} else {
runtimeLocale = { ...defaultLocale };
}
}
2016-05-12 15:11:25 +08:00
export function getConfirmLocale() {
return runtimeLocale;
}