デッキのカラムからリロードできる機能を追加 (#12274)

* デッキのカラムからリロードできる機能を追加

* tweak

---------

Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
おさむのひと
2023-11-10 17:49:09 +09:00
committed by GitHub
parent 54870d067b
commit 253c0c42e2
10 changed files with 55 additions and 11 deletions

View File

@@ -57,6 +57,7 @@ const props = withDefaults(defineProps<{
isStacked?: boolean;
naked?: boolean;
menu?: MenuItem[];
refresher?: () => Promise<void>;
}>(), {
isStacked: false,
naked: false,
@@ -183,6 +184,18 @@ function getMenu() {
items = props.menu.concat(items);
}
if (props.refresher) {
items = [{
icon: 'ti ti-refresh',
text: i18n.ts.reload,
action: () => {
if (props.refresher) {
props.refresher();
}
},
}, ...items];
}
return items;
}