更新
This commit is contained in:
parent
9c1db27ebe
commit
2bcd3a83e4
@ -5,6 +5,14 @@
|
||||
|
||||
# CHANGE
|
||||
|
||||
## 1.0.8
|
||||
|
||||
2023年08月23日
|
||||
|
||||
### 修改
|
||||
|
||||
- 通知浏览修复
|
||||
|
||||
## 1.0.7
|
||||
|
||||
2023年06月27日
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wuhu-torn-helper",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "芜湖助手",
|
||||
"scripts": {
|
||||
"release": "cross-env NODE_ENV=production rollup -c && node build.mjs",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
import ClassName from "../container/ClassName";
|
||||
import ClassName, { GetClassName } from "../container/ClassName";
|
||||
import { Injectable } from "../container/Injectable";
|
||||
import Log from "./Log";
|
||||
import { InjectionKey } from "vue";
|
||||
@ -29,6 +29,23 @@ export default class Logger {
|
||||
getTime() {
|
||||
return Log.getTime()
|
||||
}
|
||||
|
||||
static factory<T extends {}>(classT: T): Logger {
|
||||
let className = GetClassName(classT);
|
||||
return new class extends Logger {
|
||||
info(...o: any): void {
|
||||
return super.info(`[${ className }]`, ...o);
|
||||
}
|
||||
|
||||
warn(...o: any): void {
|
||||
return super.warn(`[${ className }]`, ...o);
|
||||
}
|
||||
|
||||
error(...o: any): void {
|
||||
return super.error(`[${ className }]`, ...o);
|
||||
}
|
||||
}();
|
||||
}
|
||||
}
|
||||
|
||||
export const LoggerKey = Symbol() as InjectionKey<Logger>;
|
||||
|
||||
@ -36,7 +36,7 @@ const loadData = async () => {
|
||||
try {
|
||||
res = await (await doFetch()).json();
|
||||
if (res.success) {
|
||||
events.value = res.events;
|
||||
events.value = res.list;
|
||||
if (res['newEventsAmount']) {
|
||||
for (let i = 0; i < res['newEventsAmount']; i++) {
|
||||
events.value[i].isNew = true;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import { Check, Delete, Promotion } from "@element-plus/icons-vue"
|
||||
import { ElMessage } from "element-plus"
|
||||
import { inject, onMounted, ref, watch } from "vue"
|
||||
import { inject, onMounted, ref } from "vue"
|
||||
import { LoggerKey } from "../ts/class/Logger"
|
||||
import { itemNameDict } from "../ts/dictionary/translation"
|
||||
import Sleep from "../ts/func/utils/Sleep"
|
||||
@ -231,7 +231,7 @@ const _equipItem = async (item: Item) => {
|
||||
onMounted(async () => {
|
||||
itemList.value = parseListHtml(await fetchList())
|
||||
})
|
||||
watch(itemList, (_cb) => logger.info(_cb))
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user