docs: function bind(from, node, comPrefix, valPrefix, clsPrefix, ignores) {
    ignores = Object.assign({
      true: true,
      false: true,
      null: true,
      undefined: true
    }, ignores);
  
    let hasPath = false;
  
    //处理节点属性
    let attributes = node.attributes;
    for (let i in attributes) {
      if (!/^\d+$/.test(i)) continue;
      let attr = attributes[i];
  
      //处理属性值
      if (attr.value.indexOf('{') > -1) {
        attr.value = replaceString(from, attr.value, valPrefix, ignores);
      }
  
      //绑定事件
      if (/^(bind|catch)\w+/.test(attr.name)) {
        node.setAttribute('data-' + attr.name, attr.value);
        attr.value = '_dispatch';
        if (!hasPath && comPrefix) {
          node.setAttribute('data-path', comPrefix);
        }
      }
  
      //如果是循环标签,则在子标签中忽略循环索引和值变量
      if (attr.name === 'wx:for') {
        let index = node.getAttribute('wx:for-index') || 'index';
        let item = node.getAttribute('wx:for-item') || 'item';
        ignores[index] = true;
        ignores[item] = true;
      }
  
      if (clsPrefix && attr.name === 'class') {
        const matchArr = [];
        // "xxx {{a ? 'b' : 'c'}}"
        // => "xxx $"
        attr.value = attr.value.replace(/\{\{([^}]+)\}\}/ig, function (match) {
          matchArr.push(match);
          matchArr.push(match);
          return '$';
        });
  
        // => "xxx prefix-xxx $ prefix-$"
        attr.value = attr.value.split(' ').map(cls => `${cls} ${clsPrefix}-${cls}`).join(' ');
  
        // => "xxx prefix-xxx {{a ? 'b' : 'c'}} prefix-{{a ? 'b' : 'c'}}"
        attr.value = attr.value.replace(/\$/g, function () {
          const matchItem = matchArr.shift();
          return matchItem;
        });
      }
    }
  
    //如果节点为文本
    if (node.nodeName === '#text') {
      let data = node.data;
      if (data) {
        node.replaceData(0, data.length, replaceString(from, data, valPrefix, ignores));
      }
    }
  
    //递归处理子节点
    for (let i in node.childNodes) {
      if (!/^\d+$/.test(i)) continue;
      let n = node.childNodes[i];
      // 不转换template 定义
      if (n.nodeName === 'template' && n.getAttribute('name')) {
        bindTemplateEvents(n);
        continue;
      }
      bind(from, n, comPrefix, valPrefix, clsPrefix, ignores);
    }
  }