mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
fix(terminal): console相关正规化
This commit is contained in:
16
src/App.vue
16
src/App.vue
@@ -53,7 +53,7 @@ onMounted(async () => {
|
|||||||
async function checkLoad() {
|
async function checkLoad() {
|
||||||
await appStore.check();
|
await appStore.check();
|
||||||
if (appStore.loading) {
|
if (appStore.loading) {
|
||||||
console.log("数据已加载!");
|
console.info("数据已加载!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteTGData();
|
DeleteTGData();
|
||||||
@@ -61,32 +61,32 @@ async function checkLoad() {
|
|||||||
await writeData();
|
await writeData();
|
||||||
await writeIndex();
|
await writeIndex();
|
||||||
appStore.loading = true;
|
appStore.loading = true;
|
||||||
console.log("数据加载完成!");
|
console.info("数据加载完成!");
|
||||||
}
|
}
|
||||||
// 创建数据文件夹
|
// 创建数据文件夹
|
||||||
async function createDataDir() {
|
async function createDataDir() {
|
||||||
console.log("开始创建数据文件夹...");
|
console.info("开始创建数据文件夹...");
|
||||||
await fs.createDir("appData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
|
await fs.createDir("appData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
|
||||||
await fs.createDir("userData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
|
await fs.createDir("userData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
|
||||||
await fs.createDir("tempData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
|
await fs.createDir("tempData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
|
||||||
console.log("数据文件夹创建完成!");
|
console.info("数据文件夹创建完成!");
|
||||||
}
|
}
|
||||||
// 将数据写入文件夹
|
// 将数据写入文件夹
|
||||||
async function writeData() {
|
async function writeData() {
|
||||||
console.log("开始写入数据...");
|
console.info("开始写入数据...");
|
||||||
TGAppDataList.map(async item => {
|
TGAppDataList.map(async item => {
|
||||||
await fs.writeFile(`${appStore.dataPath.app}\\${item.name}`, JSON.stringify(item.data));
|
await fs.writeFile(`${appStore.dataPath.app}\\${item.name}`, JSON.stringify(item.data));
|
||||||
});
|
});
|
||||||
console.log("数据写入完成!");
|
console.info("数据写入完成!");
|
||||||
}
|
}
|
||||||
// 写入 IndexedDB
|
// 写入 IndexedDB
|
||||||
async function writeIndex() {
|
async function writeIndex() {
|
||||||
console.log("开始写入 IndexedDB...");
|
console.info("开始写入 IndexedDB...");
|
||||||
await InitTGData();
|
await InitTGData();
|
||||||
TGGetDataList.map(async item => {
|
TGGetDataList.map(async item => {
|
||||||
await WriteTGData(item.name, item.data);
|
await WriteTGData(item.name, item.data);
|
||||||
});
|
});
|
||||||
console.log("IndexedDB 写入完成!");
|
console.info("IndexedDB 写入完成!");
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css">
|
<style lang="css">
|
||||||
|
|||||||
@@ -229,8 +229,8 @@ function DividerParser(data: PostStructuredContent): HTMLDivElement {
|
|||||||
img.src =
|
img.src =
|
||||||
"https://mihoyo-community-web.oss-cn-shanghai.aliyuncs.com/upload/2022/07/13/line_4.png";
|
"https://mihoyo-community-web.oss-cn-shanghai.aliyuncs.com/upload/2022/07/13/line_4.png";
|
||||||
} else {
|
} else {
|
||||||
console.log(data);
|
console.error("Unknown divider type", data);
|
||||||
throw new Error("Unknown divider type");
|
return UnknownParser(data);
|
||||||
}
|
}
|
||||||
// 插入 img
|
// 插入 img
|
||||||
div.appendChild(img);
|
div.appendChild(img);
|
||||||
|
|||||||
Reference in New Issue
Block a user