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.
- package/index.js +12 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -35,7 +35,7 @@ class Item {
|
|
|
35
35
|
/**
|
|
36
36
|
* 配置参数
|
|
37
37
|
*/
|
|
38
|
-
this.config =
|
|
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
|
-
*
|
|
64
|
+
* 状态, 1表示开启,0表示未开启
|
|
65
65
|
*/
|
|
66
|
-
"
|
|
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
|
*/
|