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