first commit
This commit is contained in:
19
frontend/node_modules/antd/es/modal/locale.js
generated
vendored
Normal file
19
frontend/node_modules/antd/es/modal/locale.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import defaultLocale from '../locale/en_US';
|
||||
let runtimeLocale = Object.assign({}, defaultLocale.Modal);
|
||||
let localeList = [];
|
||||
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), defaultLocale.Modal);
|
||||
export function changeConfirmLocale(newLocale) {
|
||||
if (newLocale) {
|
||||
const cloneLocale = Object.assign({}, newLocale);
|
||||
localeList.push(cloneLocale);
|
||||
runtimeLocale = generateLocale();
|
||||
return () => {
|
||||
localeList = localeList.filter(locale => locale !== cloneLocale);
|
||||
runtimeLocale = generateLocale();
|
||||
};
|
||||
}
|
||||
runtimeLocale = Object.assign({}, defaultLocale.Modal);
|
||||
}
|
||||
export function getConfirmLocale() {
|
||||
return runtimeLocale;
|
||||
}
|
||||
Reference in New Issue
Block a user