mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
22 lines
447 B
TypeScript
22 lines
447 B
TypeScript
import assign from 'object-assign';
|
|
|
|
const defaultLocale = {
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
justOkText: '知道了',
|
|
};
|
|
|
|
let runtimeLocale = assign({}, defaultLocale);
|
|
|
|
export function changeConfirmLocale(newLocale?: Object) {
|
|
if (newLocale) {
|
|
runtimeLocale = assign({}, runtimeLocale, newLocale);
|
|
} else {
|
|
runtimeLocale = assign({}, defaultLocale);
|
|
}
|
|
}
|
|
|
|
export function getConfirmLocale() {
|
|
return runtimeLocale;
|
|
}
|