@nimbus2d/core 0.0.1
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/dist/index.mjs +18433 -0
- package/package.json +39 -0
- package/src/base/EventEmitter.js +187 -0
- package/src/base/Subsystem.js +183 -0
- package/src/base/index.js +6 -0
- package/src/core/Application/AppState.js +27 -0
- package/src/core/Application/Application.js +480 -0
- package/src/core/Application/DefaultConfig.js +63 -0
- package/src/core/Application/index.js +7 -0
- package/src/core/AssetManager/AssetManager.js +711 -0
- package/src/core/AssetManager/AssetTypes.js +108 -0
- package/src/core/AssetManager/adapters/IResourceAdapter.js +50 -0
- package/src/core/AssetManager/adapters/PixiAdapter.js +90 -0
- package/src/core/AssetManager/core/RefCounter.js +167 -0
- package/src/core/AssetManager/core/ResourceCache.js +281 -0
- package/src/core/AssetManager/core/ResourceEntry.js +191 -0
- package/src/core/AssetManager/core/ResourceEventBus.js +127 -0
- package/src/core/AssetManager/handlers/IResourceHandler.js +45 -0
- package/src/core/AssetManager/index.js +26 -0
- package/src/core/AssetManager/plugins/IResourcePlugin.js +56 -0
- package/src/core/Camera/Camera.js +534 -0
- package/src/core/Camera/CameraTypes.js +59 -0
- package/src/core/Camera/index.js +13 -0
- package/src/core/ConfigSystem/ConfigLayer.js +230 -0
- package/src/core/ConfigSystem/ConfigLayerType.js +31 -0
- package/src/core/ConfigSystem/ConfigMerger.js +50 -0
- package/src/core/ConfigSystem/ConfigPath.js +96 -0
- package/src/core/ConfigSystem/ConfigSystem.js +378 -0
- package/src/core/ConfigSystem/ConfigTypes.js +29 -0
- package/src/core/ConfigSystem/ConfigWatcher.js +84 -0
- package/src/core/ConfigSystem/index.js +19 -0
- package/src/core/EventBus/EventBus.js +797 -0
- package/src/core/EventBus/Interceptor.js +26 -0
- package/src/core/EventBus/PerformanceStats.js +105 -0
- package/src/core/EventBus/index.js +7 -0
- package/src/core/Lifecycle/Lifecycle.js +265 -0
- package/src/core/Lifecycle/LifecycleState.js +31 -0
- package/src/core/Lifecycle/index.js +6 -0
- package/src/core/Logger/ConsoleHandler.js +55 -0
- package/src/core/Logger/LogHandler.js +34 -0
- package/src/core/Logger/LogLevel.js +38 -0
- package/src/core/Logger/Logger.js +234 -0
- package/src/core/Logger/index.js +8 -0
- package/src/core/PluginSystem/Plugin.js +156 -0
- package/src/core/PluginSystem/PluginEntry.js +102 -0
- package/src/core/PluginSystem/PluginState.js +30 -0
- package/src/core/PluginSystem/PluginSystem.js +530 -0
- package/src/core/PluginSystem/index.js +8 -0
- package/src/core/PoolManager/DefaultConfig.js +19 -0
- package/src/core/PoolManager/ObjectPool.js +326 -0
- package/src/core/PoolManager/PoolManager.js +253 -0
- package/src/core/PoolManager/PoolTypes.js +92 -0
- package/src/core/PoolManager/index.js +15 -0
- package/src/core/SceneManager/FadeTransition.js +64 -0
- package/src/core/SceneManager/MaskTransition.js +234 -0
- package/src/core/SceneManager/Scene.js +221 -0
- package/src/core/SceneManager/SceneManager.js +658 -0
- package/src/core/SceneManager/SceneState.js +29 -0
- package/src/core/SceneManager/SlideTransition.js +113 -0
- package/src/core/SceneManager/Transition.js +102 -0
- package/src/core/SceneManager/ZoomTransition.js +119 -0
- package/src/core/SceneManager/index.js +12 -0
- package/src/core/SpriteGPULayer/SpriteGPULayer.js +321 -0
- package/src/core/SpriteGPULayer/SpriteGPULayerTypes.js +49 -0
- package/src/core/SpriteGPULayer/index.js +11 -0
- package/src/core/Timeline/Clip.js +101 -0
- package/src/core/Timeline/DefaultConfig.js +41 -0
- package/src/core/Timeline/Easing.js +176 -0
- package/src/core/Timeline/Timeline.js +458 -0
- package/src/core/Timeline/TimelineTypes.js +89 -0
- package/src/core/Timeline/Track.js +202 -0
- package/src/core/Timeline/index.js +22 -0
- package/src/errors/ConfigError.js +47 -0
- package/src/errors/LifecycleError.js +58 -0
- package/src/errors/NimbusError.js +43 -0
- package/src/errors/PluginError.js +138 -0
- package/src/errors/ResourceError.js +166 -0
- package/src/errors/SceneError.js +124 -0
- package/src/errors/SubsystemError.js +68 -0
- package/src/errors/index.js +53 -0
- package/src/index.js +86 -0
- package/src/types/index.js +141 -0
- package/src/utils/MemoryChecker.js +374 -0
- package/src/utils/Validator.js +60 -0
- package/src/utils/index.js +84 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Nimbus2D - 配置层
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// 封装单层配置的读写操作
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
import { deepFreeze } from './ConfigMerger.js'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 配置层类
|
|
11
|
+
* 封装单层配置的读写操作,支持深度路径访问
|
|
12
|
+
*/
|
|
13
|
+
class ConfigLayer {
|
|
14
|
+
/**
|
|
15
|
+
* 构造函数
|
|
16
|
+
* @param {string} type - ConfigLayerType 枚举值
|
|
17
|
+
* @param {Object} [data={}] - 初始数据
|
|
18
|
+
* @param {boolean} [freezable=true] - 是否可深度冻结
|
|
19
|
+
*/
|
|
20
|
+
constructor(type, data = {}, freezable = true) {
|
|
21
|
+
/** @type {string} 层类型 */
|
|
22
|
+
this._type = type
|
|
23
|
+
|
|
24
|
+
/** @type {Object} 配置数据 */
|
|
25
|
+
this._data = { ...data }
|
|
26
|
+
|
|
27
|
+
/** @type {boolean} 是否可深度冻结 */
|
|
28
|
+
this._freezable = freezable
|
|
29
|
+
|
|
30
|
+
// 如果 freezable 为 true,立即冻结
|
|
31
|
+
if (this._freezable && Object.keys(this._data).length > 0) {
|
|
32
|
+
deepFreeze(this._data)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** @type {string} 层类型 */
|
|
37
|
+
get type() {
|
|
38
|
+
return this._type
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** @type {Object} 配置数据(只读快照) */
|
|
42
|
+
get data() {
|
|
43
|
+
return this._data
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 读取配置(支持深度路径)
|
|
48
|
+
* @param {string} path - 配置路径(如 'pixi.width')
|
|
49
|
+
* @returns {{ found: boolean, value: any }} 查找结果
|
|
50
|
+
*/
|
|
51
|
+
get(path) {
|
|
52
|
+
const segments = path.split('.')
|
|
53
|
+
let current = this._data
|
|
54
|
+
|
|
55
|
+
for (const segment of segments) {
|
|
56
|
+
if (current === null || current === undefined || typeof current !== 'object') {
|
|
57
|
+
return { found: false, value: undefined }
|
|
58
|
+
}
|
|
59
|
+
if (!Object.prototype.hasOwnProperty.call(current, segment)) {
|
|
60
|
+
return { found: false, value: undefined }
|
|
61
|
+
}
|
|
62
|
+
current = current[segment]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return { found: true, value: current }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 写入配置(支持深度路径)
|
|
70
|
+
* 对于 freezable=true 的层,写入前会先解冻再冻结
|
|
71
|
+
* @param {string} path - 配置路径
|
|
72
|
+
* @param {any} value - 配置值
|
|
73
|
+
* @returns {boolean} 是否设置成功
|
|
74
|
+
*/
|
|
75
|
+
set(path, value) {
|
|
76
|
+
const segments = path.split('.')
|
|
77
|
+
|
|
78
|
+
// 如果 freezable,需要先解冻
|
|
79
|
+
if (this._freezable && Object.isFrozen(this._data)) {
|
|
80
|
+
this._data = _deepClone(this._data)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let current = this._data
|
|
84
|
+
|
|
85
|
+
// 遍历到倒数第二层
|
|
86
|
+
for (let i = 0; i < segments.length - 1; i++) {
|
|
87
|
+
const segment = segments[i]
|
|
88
|
+
if (current[segment] === undefined || typeof current[segment] !== 'object') {
|
|
89
|
+
// 中间节点不存在或不是对象,创建中间对象
|
|
90
|
+
current[segment] = {}
|
|
91
|
+
} else if (Object.isFrozen(current[segment])) {
|
|
92
|
+
// 中间节点被冻结,需要解冻
|
|
93
|
+
current[segment] = _deepClone(current[segment])
|
|
94
|
+
}
|
|
95
|
+
current = current[segment]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// 设置最后一层的值
|
|
99
|
+
const lastKey = segments[segments.length - 1]
|
|
100
|
+
current[lastKey] = value
|
|
101
|
+
|
|
102
|
+
// 如果 freezable,重新冻结
|
|
103
|
+
if (this._freezable) {
|
|
104
|
+
deepFreeze(this._data)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return true
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 检查配置是否存在
|
|
112
|
+
* @param {string} path - 配置路径
|
|
113
|
+
* @returns {boolean}
|
|
114
|
+
*/
|
|
115
|
+
has(path) {
|
|
116
|
+
return this.get(path).found
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 删除配置
|
|
121
|
+
* @param {string} path - 配置路径
|
|
122
|
+
* @returns {boolean} 是否删除成功
|
|
123
|
+
*/
|
|
124
|
+
delete(path) {
|
|
125
|
+
const segments = path.split('.')
|
|
126
|
+
|
|
127
|
+
// 如果 freezable,需要先解冻
|
|
128
|
+
if (this._freezable && Object.isFrozen(this._data)) {
|
|
129
|
+
this._data = _deepClone(this._data)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
let current = this._data
|
|
133
|
+
|
|
134
|
+
// 遍历到倒数第二层
|
|
135
|
+
for (let i = 0; i < segments.length - 1; i++) {
|
|
136
|
+
const segment = segments[i]
|
|
137
|
+
if (current[segment] === undefined || typeof current[segment] !== 'object') {
|
|
138
|
+
return false
|
|
139
|
+
}
|
|
140
|
+
if (Object.isFrozen(current[segment])) {
|
|
141
|
+
current[segment] = _deepClone(current[segment])
|
|
142
|
+
}
|
|
143
|
+
current = current[segment]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const lastKey = segments[segments.length - 1]
|
|
147
|
+
if (!Object.prototype.hasOwnProperty.call(current, lastKey)) {
|
|
148
|
+
return false
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
delete current[lastKey]
|
|
152
|
+
|
|
153
|
+
if (this._freezable) {
|
|
154
|
+
deepFreeze(this._data)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return true
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 批量加载配置(深度合并)
|
|
162
|
+
* @param {Object} json - 配置对象
|
|
163
|
+
*/
|
|
164
|
+
loadJSON(json) {
|
|
165
|
+
// 如果 freezable,先解冻
|
|
166
|
+
if (this._freezable && Object.isFrozen(this._data)) {
|
|
167
|
+
this._data = _deepClone(this._data)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
this._data = _deepMergeSimple(this._data, json)
|
|
171
|
+
|
|
172
|
+
if (this._freezable) {
|
|
173
|
+
deepFreeze(this._data)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* 清空配置
|
|
179
|
+
*/
|
|
180
|
+
clear() {
|
|
181
|
+
this._data = {}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 深度克隆对象(解除冻结,递归克隆所有子对象)
|
|
187
|
+
* @param {Object} obj - 要克隆的对象
|
|
188
|
+
* @returns {Object} 克隆后的对象
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
function _deepClone(obj) {
|
|
192
|
+
const clone = {}
|
|
193
|
+
for (const key of Object.keys(obj)) {
|
|
194
|
+
const value = obj[key]
|
|
195
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
196
|
+
clone[key] = _deepClone(value)
|
|
197
|
+
} else {
|
|
198
|
+
clone[key] = value
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return clone
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* 简单深度合并(ConfigLayer 内部用)
|
|
206
|
+
* @param {Object} target - 目标
|
|
207
|
+
* @param {Object} source - 源
|
|
208
|
+
* @returns {Object}
|
|
209
|
+
* @private
|
|
210
|
+
*/
|
|
211
|
+
function _deepMergeSimple(target, source) {
|
|
212
|
+
const result = { ...target }
|
|
213
|
+
for (const key of Object.keys(source)) {
|
|
214
|
+
if (
|
|
215
|
+
source[key] &&
|
|
216
|
+
typeof source[key] === 'object' &&
|
|
217
|
+
!Array.isArray(source[key]) &&
|
|
218
|
+
target[key] &&
|
|
219
|
+
typeof target[key] === 'object' &&
|
|
220
|
+
!Array.isArray(target[key])
|
|
221
|
+
) {
|
|
222
|
+
result[key] = _deepMergeSimple(target[key], source[key])
|
|
223
|
+
} else {
|
|
224
|
+
result[key] = source[key]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return result
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export { ConfigLayer }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Nimbus2D - 配置层类型枚举
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// 4 层配置:DEFAULT → MODULE → USER → RUNTIME(优先级递增)
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 配置层类型枚举
|
|
9
|
+
* @enum {string}
|
|
10
|
+
*/
|
|
11
|
+
export const ConfigLayerType = {
|
|
12
|
+
/** 默认配置层(代码内置,freezable=true) */
|
|
13
|
+
DEFAULT: 'default',
|
|
14
|
+
/** 模块配置层(各模块自带,freezable=false) */
|
|
15
|
+
MODULE: 'module',
|
|
16
|
+
/** 用户配置层(构造参数传入,freezable=false) */
|
|
17
|
+
USER: 'user',
|
|
18
|
+
/** 运行时配置层(set() 修改,freezable=false) */
|
|
19
|
+
RUNTIME: 'runtime'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 各层的 freezable 默认值
|
|
24
|
+
* 只有 DEFAULT 层默认冻结
|
|
25
|
+
*/
|
|
26
|
+
export const LAYER_FREEZABLE_DEFAULTS = {
|
|
27
|
+
[ConfigLayerType.DEFAULT]: true,
|
|
28
|
+
[ConfigLayerType.MODULE]: false,
|
|
29
|
+
[ConfigLayerType.USER]: false,
|
|
30
|
+
[ConfigLayerType.RUNTIME]: false
|
|
31
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Nimbus2D - 深度合并 + 深度冻结工具
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// 提供 deepMerge 和 deepFreeze 工具函数
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 深度合并两个对象(source 覆盖 target)
|
|
9
|
+
* 数组直接替换,不递归合并
|
|
10
|
+
* @param {Object} target - 目标对象
|
|
11
|
+
* @param {Object} source - 源对象
|
|
12
|
+
* @returns {Object} 合并后的新对象
|
|
13
|
+
*/
|
|
14
|
+
export function deepMerge(target, source) {
|
|
15
|
+
const result = { ...target }
|
|
16
|
+
for (const key of Object.keys(source)) {
|
|
17
|
+
if (
|
|
18
|
+
source[key] &&
|
|
19
|
+
typeof source[key] === 'object' &&
|
|
20
|
+
!Array.isArray(source[key]) &&
|
|
21
|
+
target[key] &&
|
|
22
|
+
typeof target[key] === 'object' &&
|
|
23
|
+
!Array.isArray(target[key])
|
|
24
|
+
) {
|
|
25
|
+
result[key] = deepMerge(target[key], source[key])
|
|
26
|
+
} else {
|
|
27
|
+
result[key] = source[key]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return result
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 深度冻结对象(递归冻结所有属性)
|
|
35
|
+
* @param {Object} obj - 要冻结的对象
|
|
36
|
+
* @returns {Object} 冻结后的对象
|
|
37
|
+
*/
|
|
38
|
+
export function deepFreeze(obj) {
|
|
39
|
+
if (obj === null || typeof obj !== 'object') return obj
|
|
40
|
+
|
|
41
|
+
// 先冻结所有子属性
|
|
42
|
+
for (const key of Object.keys(obj)) {
|
|
43
|
+
const value = obj[key]
|
|
44
|
+
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
45
|
+
deepFreeze(value)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return Object.freeze(obj)
|
|
50
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Nimbus2D - 配置路径解析工具
|
|
3
|
+
// ----------------------------------------------------------------------------
|
|
4
|
+
// 提供路径解析和通配符匹配功能,含路径缓存
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 路径解析工具
|
|
9
|
+
* 提供路径段解析和通配符匹配功能
|
|
10
|
+
*/
|
|
11
|
+
class ConfigPath {
|
|
12
|
+
/**
|
|
13
|
+
* 构造函数
|
|
14
|
+
*/
|
|
15
|
+
constructor() {
|
|
16
|
+
/**
|
|
17
|
+
* 路径缓存:path(string) => segments(string[])
|
|
18
|
+
* @type {Map<string, string[]>}
|
|
19
|
+
*/
|
|
20
|
+
this._cache = new Map()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 解析路径为段数组(带缓存)
|
|
25
|
+
* @param {string} path - 配置路径(如 'modules.logger.level')
|
|
26
|
+
* @returns {string[]} 路径段数组(如 ['modules', 'logger', 'level'])
|
|
27
|
+
*/
|
|
28
|
+
resolve(path) {
|
|
29
|
+
if (this._cache.has(path)) {
|
|
30
|
+
return this._cache.get(path)
|
|
31
|
+
}
|
|
32
|
+
const segments = path.split('.')
|
|
33
|
+
this._cache.set(path, segments)
|
|
34
|
+
return segments
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 检查路径是否匹配通配符模式
|
|
39
|
+
* 支持 'modules.*.level'(单层通配)和 'modules.**'(多层通配)
|
|
40
|
+
* @param {string} pattern - 通配符模式
|
|
41
|
+
* @param {string} path - 实际路径
|
|
42
|
+
* @returns {boolean} 是否匹配
|
|
43
|
+
*/
|
|
44
|
+
match(pattern, path) {
|
|
45
|
+
const patternParts = pattern.split('.')
|
|
46
|
+
const pathParts = path.split('.')
|
|
47
|
+
return this._matchParts(patternParts, 0, pathParts, 0)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 递归匹配路径段
|
|
52
|
+
* @param {string[]} patternParts - 模式段
|
|
53
|
+
* @param {number} pi - 模式索引
|
|
54
|
+
* @param {string[]} pathParts - 路径段
|
|
55
|
+
* @param {number} pathi - 路径索引
|
|
56
|
+
* @returns {boolean}
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
_matchParts(patternParts, pi, pathParts, pathi) {
|
|
60
|
+
// 模式和路径都遍历完毕 → 匹配
|
|
61
|
+
if (pi === patternParts.length && pathi === pathParts.length) return true
|
|
62
|
+
// 模式遍历完但路径未完 → 不匹配
|
|
63
|
+
if (pi === patternParts.length) return false
|
|
64
|
+
|
|
65
|
+
const part = patternParts[pi]
|
|
66
|
+
|
|
67
|
+
if (part === '**') {
|
|
68
|
+
// ** 匹配零个或多个段
|
|
69
|
+
// 跳过 **,尝试从路径的每个位置匹配剩余模式
|
|
70
|
+
for (let i = pathi; i <= pathParts.length; i++) {
|
|
71
|
+
if (this._matchParts(patternParts, pi + 1, pathParts, i)) return true
|
|
72
|
+
}
|
|
73
|
+
return false
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (part === '*') {
|
|
77
|
+
// * 匹配一个段
|
|
78
|
+
if (pathi >= pathParts.length) return false
|
|
79
|
+
return this._matchParts(patternParts, pi + 1, pathParts, pathi + 1)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// 精确匹配
|
|
83
|
+
if (pathi >= pathParts.length) return false
|
|
84
|
+
if (part !== pathParts[pathi]) return false
|
|
85
|
+
return this._matchParts(patternParts, pi + 1, pathParts, pathi + 1)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 清理缓存
|
|
90
|
+
*/
|
|
91
|
+
clearCache() {
|
|
92
|
+
this._cache.clear()
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { ConfigPath }
|