2016-06-22 13:18:43 +08:00
|
|
|
import assign from 'object-assign';
|
|
|
|
|
2016-05-12 13:25:00 +08:00
|
|
|
const defaultLocale = {
|
|
|
|
okText: '确定',
|
|
|
|
cancelText: '取消',
|
|
|
|
justOkText: '知道了',
|
|
|
|
};
|
|
|
|
|
2016-06-22 13:18:43 +08:00
|
|
|
let runtimeLocale = assign({}, 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) {
|
2016-06-22 13:18:43 +08:00
|
|
|
runtimeLocale = assign({}, runtimeLocale, newLocale);
|
2016-05-12 13:25:00 +08:00
|
|
|
} else {
|
2016-06-22 13:18:43 +08:00
|
|
|
runtimeLocale = assign({}, 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;
|
|
|
|
}
|