update 优化bpmn位置
This commit is contained in:
15
src/bpmn/assets/module/Translate/index.ts
Normal file
15
src/bpmn/assets/module/Translate/index.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import zh from '../../lang/zh';
|
||||
|
||||
const customTranslate = (template: any, replacements: any) => {
|
||||
replacements = replacements || {};
|
||||
template = zh[template] || template;
|
||||
return template.replace(/{([^}]+)}/g, function (_: any, key: any) {
|
||||
return replacements[key] || '{' + key + '}';
|
||||
});
|
||||
};
|
||||
|
||||
export const translateModule = {
|
||||
translate: ['value', customTranslate]
|
||||
};
|
||||
|
||||
export default translateModule;
|
||||
Reference in New Issue
Block a user