mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +08:00
27 lines
429 B
TypeScript
27 lines
429 B
TypeScript
const defaultLocale = {
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
justOkText: '知道了',
|
|
};
|
|
|
|
let runtimeLocale = {
|
|
...defaultLocale,
|
|
};
|
|
|
|
export function changeConfirmLocale(newLocale?: Object) {
|
|
if (newLocale) {
|
|
runtimeLocale = {
|
|
...runtimeLocale,
|
|
...newLocale,
|
|
};
|
|
} else {
|
|
runtimeLocale = {
|
|
...defaultLocale,
|
|
};
|
|
}
|
|
}
|
|
|
|
export function getConfirmLocale() {
|
|
return runtimeLocale;
|
|
}
|