You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
556 B

export interface ModalLocale {
okText: string;
cancelText: string;
justOkText: string;
}
const defaultLocale: ModalLocale = {
okText: '确定',
cancelText: '取消',
justOkText: '知道了',
};
let runtimeLocale: ModalLocale = {
...defaultLocale,
};
export function changeConfirmLocale(newLocale?: ModalLocale) {
if (newLocale) {
runtimeLocale = {
...runtimeLocale,
...newLocale,
};
} else {
runtimeLocale = {
...defaultLocale,
};
}
}
export function getConfirmLocale() {
return runtimeLocale;
}