add reload
This commit is contained in:
parent
77cfb03b1c
commit
ff8d8ae73c
2 changed files with 17 additions and 7 deletions
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<div class="yrolvcoq" :style="{ background: pageMetadata?.value?.bg }">
|
||||
<RouterView :router="router" />
|
||||
<RouterView :key="reloadCount" :router="router" />
|
||||
</div>
|
||||
</XWindow>
|
||||
</template>
|
||||
|
@ -78,15 +78,21 @@ const buttonsLeft = $computed(() => {
|
|||
});
|
||||
const buttonsRight = $computed(() => {
|
||||
const buttons = [
|
||||
{
|
||||
icon: "ph-arrows-out-simple ph-bold ph-lg",
|
||||
title: i18n.ts.showInPage,
|
||||
onClick: expand,
|
||||
},
|
||||
{
|
||||
icon: 'ph-arrow-clockwise ph-bold ph-lg',
|
||||
title: i18n.ts.reload,
|
||||
onClick: reload,
|
||||
},
|
||||
{
|
||||
icon: "ph-arrows-out-simple ph-bold ph-lg",
|
||||
title: i18n.ts.showInPage,
|
||||
onClick: expand,
|
||||
},
|
||||
];
|
||||
|
||||
return buttons;
|
||||
});
|
||||
let reloadCount = $ref(0);
|
||||
|
||||
router.addListener("push", (ctx) => {
|
||||
history.push({ path: ctx.path, key: ctx.key });
|
||||
|
@ -140,6 +146,10 @@ function back() {
|
|||
);
|
||||
}
|
||||
|
||||
function reload() {
|
||||
reloadCount++;
|
||||
}
|
||||
|
||||
function close() {
|
||||
windowEl.close();
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</FormSlot>
|
||||
<div class="buttons">
|
||||
<MkButton inline @click="addItem"><i class="ph-plus ph-bold ph-lg"></i> {{ i18n.ts.addItem }}</MkButton>
|
||||
<MkButton inline danger @click="reset"><i class="ph-arrows-clockwise ph-bold ph-lg"></i> {{ i18n.ts.default }}</MkButton>
|
||||
<MkButton inline danger @click="reset"><i class="ph-arrow-clockwise ph-bold ph-lg"></i> {{ i18n.ts.default }}</MkButton>
|
||||
<MkButton inline primary class="save" @click="save"><i class="ph-floppy-disk ph-bold ph-lg"></i> {{ i18n.ts.save }}</MkButton>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue