hide back button when not needed
This commit is contained in:
parent
b0390a3fc0
commit
2515319c08
|
@ -97,6 +97,7 @@ provideMetadataReceiver((info) => {
|
|||
pageMetadata = info;
|
||||
});
|
||||
provide("shouldOmitHeaderTitle", true);
|
||||
provide("shouldBackButton", false);
|
||||
provide("shouldHeaderThin", true);
|
||||
|
||||
const contextmenu = $computed(() => [
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="left">
|
||||
<div class="buttons">
|
||||
<button
|
||||
v-if="props.displayBackButton"
|
||||
v-if="displayBackButton"
|
||||
class="_buttonIcon button icon backButton"
|
||||
@click.stop="goBack()"
|
||||
@touchstart="preventDrag"
|
||||
|
@ -164,6 +164,8 @@ const props = defineProps<{
|
|||
to?: string;
|
||||
}>();
|
||||
|
||||
const displayBackButton = props.displayBackButton && history.length > 2 && inject("shouldBackButton", true);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "update:tab", key: string);
|
||||
}>();
|
||||
|
|
Loading…
Reference in New Issue