fix: 增加流程图前端代码

This commit is contained in:
yunlong.li
2021-11-18 12:06:24 +08:00
parent 00f59fdc75
commit 3f90e79d8a
30 changed files with 7241 additions and 4 deletions

View File

@ -0,0 +1,12 @@
import translations from './zn'
export default function customTranslate(template, replacements) {
replacements = replacements || {};
// Translate
template = translations[template] || template;
// Replace
return template.replace(/{([^}]+)}/g, function(_, key) {
return replacements[key] || '{' + key + '}';
});
}