code: function (source, data) {
                  return source.replace(/\$\{([\w.]+)\}/g, function ($0, $1) {
                      var ref = $1.split('.');
                      var refObject = data;
                      var level;
  
                      while (refObject != null && (level = ref.shift())) {
                          refObject = refObject[level];
                      }
  
                      return refObject != null ?  refObject : '';
                  });
              }
docs: 字符串格式化，支持如 ${xxx.xxx} 的语法
  @param {string} source 模板字符串
  @param {Object} data 数据
  @return {string} 格式化后字符串