mm_tpl 2.1.5 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +13 -0
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -70,6 +70,11 @@ class Tpl {
70
70
  * 错误提示
71
71
  */
72
72
  this.error = null;
73
+
74
+ /**
75
+ * 初始化
76
+ */
77
+ this.init(config);
73
78
  }
74
79
  }
75
80
 
@@ -90,6 +95,14 @@ Tpl.prototype.set_config = function(config) {
90
95
  }
91
96
  };
92
97
 
98
+ /**
99
+ * 初始化
100
+ * @param {Object} config 配置参数
101
+ */
102
+ Tpl.prototype.init = function(config) {
103
+ this.set_config(config);
104
+ }
105
+
93
106
  /**
94
107
  * 渲染模板(之前)
95
108
  * @param {String} body 模板
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_tpl",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "这是超级美眉模板帮助类模块,用于MVC模式下的视图渲染",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,6 +27,6 @@
27
27
  "homepage": "https://github.com/qiuwenwu/mm_tpl#readme",
28
28
  "dependencies": {
29
29
  "art-template": "^4.13.2",
30
- "mm_expand": "^1.5.1"
30
+ "mm_expand": "^1.5.5"
31
31
  }
32
32
  }