ant-design/components/modal/locale.tsx

27 lines
429 B
TypeScript
Raw Normal View History

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