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

Commit 1cca48c

Browse files
committed
feat(demo): update to [email protected]
1 parent beea143 commit 1cca48c

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

packages/demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"license": "MIT",
99
"dependencies": {
1010
"@vueuse/core": "^5.2.0",
11-
"gitart-vue-dialog": "1.0.3"
11+
"gitart-vue-dialog": "1.1.0"
1212
},
1313
"devDependencies": {
1414
"@vitejs/plugin-vue": "^1.3.0",

packages/demo/src/App.vue

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
<NestingDialogLayout />
2626
</div>
2727

28+
<div p="y-3">
29+
<ActivatorDialogLayout />
30+
</div>
31+
2832
<TheFooter m="t-4" />
2933
</div>
3034
</div>
@@ -41,6 +45,7 @@ import TheFooter from '@/components/Interface/TheFooter.vue'
4145
import DialogLayout from '@/components/Layout/DialogLayout.vue'
4246
import ProgrammaticalDialogLayout from '@/components/Layout/ProgrammaticalDialogLayout.vue'
4347
import NestingDialogLayout from '@/components/Layout/NestingDialogLayout.vue'
48+
import ActivatorDialogLayout from '@/components/Layout/ActivatorDialogLayout.vue'
4449
4550
export default defineComponent({
4651
name: 'App',
@@ -51,6 +56,7 @@ export default defineComponent({
5156
DialogLayout,
5257
ProgrammaticalDialogLayout,
5358
NestingDialogLayout,
59+
ActivatorDialogLayout,
5460
},
5561
})
5662
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<template>
2+
<div>
3+
<h3 m="b-3">
4+
Dialogs using #activator slot
5+
</h3>
6+
7+
<GDialog
8+
v-model="dialog"
9+
max-width="400"
10+
>
11+
<template #activator="attrs">
12+
<Btn v-bind="attrs" m="r-2">
13+
Activator
14+
</Btn>
15+
</template>
16+
17+
<DialogToolbar @close="dialog = false" />
18+
19+
<div p="x-5 y-4">
20+
<h3 m="b-4">
21+
Activator
22+
</h3>
23+
</div>
24+
</GDialog>
25+
</div>
26+
</template>
27+
28+
<script lang="ts">
29+
import { ref, defineComponent } from 'vue'
30+
import { GDialog } from 'gitart-vue-dialog'
31+
32+
import DialogToolbar from '@/components/Dialog/DialogToolbar.vue'
33+
34+
import Btn from '@/components/UI/Btn/Btn.vue'
35+
36+
export default defineComponent({
37+
name: 'DialogLayout',
38+
components: {
39+
GDialog,
40+
DialogToolbar,
41+
Btn,
42+
},
43+
44+
setup() {
45+
const dialog = ref(false)
46+
47+
return {
48+
dialog,
49+
}
50+
},
51+
})
52+
</script>

0 commit comments

Comments
 (0)