This repository was archived by the owner on Jan 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +91
-0
lines changed
Expand file tree Collapse file tree 2 files changed +91
-0
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <GDialog
3+ v-model =" value"
4+ fullscreen
5+ >
6+ <div
7+ bg =" gray-50"
8+ min-h =" full"
9+ >
10+ <DialogToolbar @close =" onClose" >
11+ <h4 >
12+ Fullscreen Dialog
13+ </h4 >
14+ </DialogToolbar >
15+
16+ <div p =" x-5 y-4" >
17+ <BooleanSwitch
18+ v-model =" longContent"
19+ label =" Long Content"
20+ />
21+
22+ <div
23+ v-if =" longContent"
24+ bg =" purple-500"
25+ font =" semibold"
26+ h =" screen"
27+ p =" 6"
28+ rounded =" md"
29+ text =" xl white"
30+ >
31+ Long Content
32+ </div >
33+ </div >
34+ </div >
35+ </GDialog >
36+ </template >
37+
38+ <script lang="ts">
39+ import { defineComponent , ref } from ' vue'
40+ import { useVModel } from ' @vueuse/core'
41+ import { GDialog } from ' plugin'
42+
43+ import DialogToolbar from ' @/components/Dialog/DialogToolbar.vue'
44+ import BooleanSwitch from ' @/components/PropControls/BooleanSwitch/BooleanSwitch.vue'
45+
46+ export default defineComponent ({
47+ name: ' FullscreenDialog' ,
48+ components: {
49+ GDialog ,
50+ DialogToolbar ,
51+ BooleanSwitch ,
52+ },
53+
54+ props: {
55+ modelValue: {
56+ type: Boolean ,
57+ default: false ,
58+ },
59+ },
60+
61+ emits: [' update:modelValue' ],
62+
63+ setup(props , { emit }) {
64+ const value = useVModel (props , ' modelValue' , emit )
65+ const onClose = () => {
66+ value .value = false
67+ }
68+
69+ const longContent = ref (false )
70+
71+ return {
72+ value ,
73+ onClose ,
74+
75+ longContent ,
76+ }
77+ },
78+ })
79+ </script >
Original file line number Diff line number Diff line change 3030 @update:model-value =" input"
3131 />
3232 </DialogStateWrapper >
33+
34+ <DialogStateWrapper
35+ v-slot =" {model, input}"
36+ label =" Fullscreen"
37+ >
38+ <FullscreenDialog
39+ :model-value =" model"
40+ @update:model-value =" input"
41+ />
42+ </DialogStateWrapper >
3343 </ButtonGrid >
3444</template >
3545
@@ -42,6 +52,7 @@ import ButtonGrid from '@/components/Layout/ButtonGrid.vue'
4252const BaseDialog = defineAsyncComponent (() => import (' @/components/Dialogs/BaseDialog/BaseDialog.vue' ))
4353const StyledDialog = defineAsyncComponent (() => import (' @/components/Dialogs/StyledDialog/StyledDialog.vue' ))
4454const ScrollDialog = defineAsyncComponent (() => import (' @/components/Dialogs/ScrollDialog/ScrollDialog.vue' ))
55+ const FullscreenDialog = defineAsyncComponent (() => import (' @/components/Dialogs/FullscreenDialog/FullscreenDialog.vue' ))
4556
4657export default defineComponent ({
4758 name: ' DialogLayout' ,
@@ -51,6 +62,7 @@ export default defineComponent({
5162 BaseDialog ,
5263 StyledDialog ,
5364 ScrollDialog ,
65+ FullscreenDialog ,
5466 },
5567
5668 setup() {},
You can’t perform that action at this time.
0 commit comments