You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.js 604 B

4 years ago
12345678910111213141516171819202122
  1. /**
  2. * 设置全局配置
  3. * @name template.config
  4. * @param {String} 名称
  5. * @param {Any} 值
  6. */
  7. template.config = function (name, value) {
  8. defaults[name] = value;
  9. };
  10. var defaults = template.defaults = {
  11. openTag: '<%', // 逻辑语法开始标签
  12. closeTag: '%>', // 逻辑语法结束标签
  13. escape: true, // 是否编码输出变量的 HTML 字符
  14. cache: true, // 是否开启缓存(依赖 options 的 filename 字段)
  15. compress: false, // 是否压缩输出
  16. parser: null // 自定义语法格式器 @see: template-syntax.js
  17. };