Skip to content
This repository was archived by the owner on Jan 9, 2022. It is now read-only.

Commit 53d7774

Browse files
committed
feat(demo): upgrade to 0.0.14
- upgrade layout for DialogLayout - add ScrollDialog example
1 parent 2b29450 commit 53d7774

File tree

5 files changed

+88
-15
lines changed

5 files changed

+88
-15
lines changed

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"license": "MIT",
99
"dependencies": {
10-
"gitart-vue-dialog": "^0.0.12",
10+
"gitart-vue-dialog": "0.0.14",
1111
"vue": "3.2.0-beta.7"
1212
},
1313
"devDependencies": {

demo/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ export default defineComponent({
5353

5454
<style lang="scss">
5555
.app {
56-
height: 2000px;
56+
min-height: 100vh;
5757
}
5858
</style>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<template>
2+
<GDialog
3+
v-model="value"
4+
max-width="400"
5+
height="600"
6+
scrollable
7+
>
8+
<div
9+
flex="~ col"
10+
bg="gray-50"
11+
border="rounded"
12+
>
13+
<DialogToolbar @close="onClose">
14+
<h4>
15+
Scroll Dialog
16+
</h4>
17+
</DialogToolbar>
18+
19+
<div
20+
p="x-5 y-4"
21+
overflow="auto"
22+
>
23+
<p v-for="item in 8" :key="item">
24+
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Totam quisquam iste assumenda
25+
voluptates optio dolorum facere, corrupti adipisci ex possimus,
26+
quis sunt. Quis dolorum voluptatibus ab quasi, nemo rem? Culpa!
27+
</p>
28+
</div>
29+
</div>
30+
</GDialog>
31+
</template>
32+
33+
<script lang="ts">
34+
import { defineComponent } from 'vue'
35+
import { GDialog } from 'plugin'
36+
37+
import { useModelWrapper } from '@/composables/modelWrapper'
38+
39+
import DialogToolbar from '@/components/Dialog/DialogToolbar.vue'
40+
41+
export default defineComponent({
42+
name: 'BaseDialog',
43+
components: {
44+
GDialog,
45+
DialogToolbar,
46+
},
47+
48+
props: {
49+
modelValue: {
50+
type: Boolean,
51+
default: false,
52+
},
53+
},
54+
55+
emits: ['update:modelValue'],
56+
57+
setup(props, { emit }) {
58+
const value = useModelWrapper(props, emit)
59+
60+
const onClose = () => {
61+
value.value = false
62+
}
63+
64+
return {
65+
value,
66+
onClose,
67+
}
68+
},
69+
})
70+
</script>

demo/src/components/Layout/DialogLayout.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<template>
2-
<div class="flex wrap">
2+
<div
3+
grid="inline gap-3 auto-cols-auto flow-col"
4+
>
35
<DialogStateWrapper
46
v-slot="{model, input}"
57
label="Base"
6-
class="mr-3"
78
>
89
<BaseDialog :model-value="model" @update:model-value="input" />
910
</DialogStateWrapper>
@@ -14,20 +15,29 @@
1415
>
1516
<StyledDialog :model-value="model" @update:model-value="input" />
1617
</DialogStateWrapper>
18+
19+
<DialogStateWrapper
20+
v-slot="{model, input}"
21+
label="Scroll"
22+
>
23+
<ScrollDialog :model-value="model" @update:model-value="input" />
24+
</DialogStateWrapper>
1725
</div>
1826
</template>
1927

2028
<script lang="ts">
2129
import DialogStateWrapper from '@/components/Dialog/DialogStateWrapper.vue'
2230
import BaseDialog from '@/components/Dialogs/BaseDialog/BaseDialog.vue'
2331
import StyledDialog from '@/components/Dialogs/StyledDialog/StyledDialog.vue'
32+
import ScrollDialog from '@/components/Dialogs/ScrollDialog/ScrollDialog.vue'
2433
2534
export default {
2635
name: 'DialogLayout',
2736
components: {
2837
DialogStateWrapper,
2938
BaseDialog,
3039
StyledDialog,
40+
ScrollDialog,
3141
},
3242
3343
setup() {},

demo/yarn.lock

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,6 @@ bluebird@^3.7.2:
322322
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
323323
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
324324

325-
body-scroll-lock@^4.0.0-beta.0:
326-
version "4.0.0-beta.0"
327-
resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz#4f78789d10e6388115c0460cd6d7d4dd2bbc4f7e"
328-
integrity sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==
329-
330325
braces@^3.0.1:
331326
version "3.0.2"
332327
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
@@ -520,12 +515,10 @@ get-intrinsic@^1.0.2:
520515
has "^1.0.3"
521516
has-symbols "^1.0.1"
522517

523-
gitart-vue-dialog@^0.0.12:
524-
version "0.0.12"
525-
resolved "https://registry.yarnpkg.com/gitart-vue-dialog/-/gitart-vue-dialog-0.0.12.tgz#829b524691fc4f678827dbdacb01a1123964a8dc"
526-
integrity sha512-3ix8ovWe+cJpGXWobx49TuCu2pGDt1sFSIcr4Zkhx133fZqWWYzyr+hbhVTj46OKGdI3Wb1ki2pq+PnDeqUFMA==
527-
dependencies:
528-
body-scroll-lock "^4.0.0-beta.0"
518+
519+
version "0.0.14"
520+
resolved "https://registry.yarnpkg.com/gitart-vue-dialog/-/gitart-vue-dialog-0.0.14.tgz#321a301b9db6df07941ab84a2b44027a454ff699"
521+
integrity sha512-RlVLe0YDttF3aimasnK9p97XqM5pKrDlJfZ6r37JoB2cqB2c+x9UlRkcrbvLgQCCuNybh4dJSPsD3qaUTV6xpg==
529522

530523
glob-parent@^5.1.2:
531524
version "5.1.2"

0 commit comments

Comments
 (0)