1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| <template>
| <div class="screen-container">
| <screen :isFull="isScreenfull" @clickFull="clickFullscreen"></screen>
| </div>
| </template>
|
| <script lang="ts">
| import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
| import screen from '../components/screen.vue'
| import screenfull from 'screenfull'
| import { ElMessage, ElMessageBox } from 'element-plus';
|
| // 定义接口来定义对象的类型
| interface TableDataState {
| isScreenfull: boolean
| }
|
| export default defineComponent({
| name: 'fullScreen',
| components: {screen},
| setup() {
| const state = reactive<TableDataState>({
| isScreenfull: true,
| });
|
| // 页面加载时
| onMounted(() => {
|
| });
|
| const clickFullscreen =() => {
|
| }
|
| return {
| clickFullscreen,
| ...toRefs(state)
| };
| }
| });
| </script>
| <style lang="scss" scoped>
| .screen-container{
| height: 100vh;
| }
| </style>
|
|