mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +08:00
fix(full-screen): dom fullscreen status text (#3130)
* chore: Fix ts type error * chore: fix type:check error * fix(full-screen): dom fullscreen status text
This commit is contained in:
parent
5a388be15e
commit
e161c1449a
@ -19,7 +19,9 @@
|
|||||||
ref="domRef"
|
ref="domRef"
|
||||||
class="flex items-center justify-center w-1/2 h-64 mx-auto mt-10 bg-white rounded-md"
|
class="flex items-center justify-center w-1/2 h-64 mx-auto mt-10 bg-white rounded-md"
|
||||||
>
|
>
|
||||||
<a-button type="primary" @click="toggleDom" class="mr-2"> Exit Dom Full Screen </a-button>
|
<a-button type="primary" @click="toggleDom" class="mr-2">
|
||||||
|
{{ isDomFullscreen ? 'Exit Dom Full Screen' : 'Enter Dom Full Screen' }}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
@ -37,12 +39,13 @@
|
|||||||
const domRef = ref<Nullable<HTMLElement>>(null);
|
const domRef = ref<Nullable<HTMLElement>>(null);
|
||||||
const { enter, toggle, exit, isFullscreen } = useFullscreen();
|
const { enter, toggle, exit, isFullscreen } = useFullscreen();
|
||||||
|
|
||||||
const { toggle: toggleDom } = useFullscreen(domRef);
|
const { toggle: toggleDom, isFullscreen: isDomFullscreen } = useFullscreen(domRef);
|
||||||
return {
|
return {
|
||||||
enter,
|
enter,
|
||||||
toggleDom,
|
toggleDom,
|
||||||
toggle,
|
toggle,
|
||||||
isFullscreen,
|
isFullscreen,
|
||||||
|
isDomFullscreen,
|
||||||
exit,
|
exit,
|
||||||
domRef,
|
domRef,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user