mm_machine 1.4.4 → 1.4.5

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 +12 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -35,7 +35,7 @@ class Item {
35
35
  /**
36
36
  * 配置参数
37
37
  */
38
- this.config = conf({
38
+ this.config = {
39
39
  /**
40
40
  * 名称, 由中英文和下“_”组成, 用于卸载接口 例如: demo
41
41
  */
@@ -61,10 +61,10 @@ class Item {
61
61
  */
62
62
  "sort": 10,
63
63
  /**
64
- * 开关, true表示开启,false表示关闭
64
+ * 状态, 1表示开启,0表示未开启
65
65
  */
66
- "switch": true
67
- });
66
+ "state": 1
67
+ };
68
68
 
69
69
  /**
70
70
  * 模块目录
@@ -73,6 +73,14 @@ class Item {
73
73
  }
74
74
  }
75
75
 
76
+ /**
77
+ * 设置配置
78
+ * @param {Object} config 配置
79
+ */
80
+ Item.prototype.set_config = function(config){
81
+ this.config = conf(Object.assign(this.config, config));
82
+ }
83
+
76
84
  /**
77
85
  * @description 加载完成时
78
86
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制",
5
5
  "main": "index.js",
6
6
  "scripts": {