diff --git a/src/scripts/inject-view/app.vue b/src/scripts/inject-view/app.vue
index 677dca8..326bc37 100644
--- a/src/scripts/inject-view/app.vue
+++ b/src/scripts/inject-view/app.vue
@@ -283,7 +283,7 @@ export default defineComponent({
const picking = ref(false);
const keydownFunc = (e: KeyboardEvent) => {
- const { shortKeyPick, shortKeyGameStep, shortKeyGamePauseResume } = config.value;
+ const { shortKeyPick, shortKeyGameFresh, shortKeyGameStep, shortKeyGamePauseResume } = config.value;
switch (e.code) {
case shortKeyPick: {
if (picking.value === false) {
@@ -304,6 +304,20 @@ export default defineComponent({
showGameTip.value = !!cc.game.isPaused();
break;
}
+ case shortKeyGameFresh: {
+ const url = new URL(window.location.href);
+ const port = Number(url.port) || 7456;
+ fetch(`http://localhost:${port}/asset-db/refresh`)
+ .then((res) => {
+ res.text().then((a: string) => {
+ if (a === "success") {
+ window.location.reload();
+ }
+ });
+ })
+ .then((data) => {});
+ break;
+ }
}
};
/**是否显示游戏暂停的提示 */
diff --git a/src/scripts/inject-view/shortkeys.vue b/src/scripts/inject-view/shortkeys.vue
index 7cf2ba4..eeb22e3 100644
--- a/src/scripts/inject-view/shortkeys.vue
+++ b/src/scripts/inject-view/shortkeys.vue
@@ -3,6 +3,7 @@
+