mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-05-07 01:01:09 +08:00
自动遍历zip包中的json配置
This commit is contained in:
@@ -46,7 +46,7 @@ export class JsonUtil {
|
||||
content = await ZipLoader.getJson(pathZip, `${name}.json`);
|
||||
}
|
||||
else {
|
||||
content = await resLoader.load(url, JsonAsset);
|
||||
content = await resLoader.loadAsync(url, JsonAsset);
|
||||
}
|
||||
|
||||
if (content) {
|
||||
@@ -71,6 +71,7 @@ export class JsonUtil {
|
||||
if (this.zip) {
|
||||
let zip = await ZipLoader.load(pathZip);
|
||||
for (let key in zip.files) {
|
||||
let f = zip.files[key];
|
||||
let name = key.replace(".json", "");
|
||||
data.set(name, ZipLoader.getJson(pathZip, `${name}.json`));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user