UNPKG

bpmn-vue-iview

Version:

基于 'vue' 、'bpmn.io@7.0' 、 'iview@4.7' 和 'workflow-bpmn-modeler@0.2.8',实现 flowable 的 modeler 模型设计器

21 lines (17 loc) 522 B
import translations from '../lang/zh' export default function customTranslate(template, replacements) { replacements = replacements || {} // Translate template = translations[template] || template // Replace return template.replace(/{([^}]+)}/g, function(_, key) { var str = replacements[key] if ( translations[replacements[key]] !== null && translations[replacements[key]] !== 'undefined' ) { str = translations[replacements[key]] } return str || '{' + key + '}' }) }