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

Commit a07e6ff

Browse files
committed
feat(demo): upgrade to 0.2.0-alpha.3
1 parent bb6e61b commit a07e6ff

File tree

6 files changed

+32
-21
lines changed

6 files changed

+32
-21
lines changed

demo/package.json

Lines changed: 2 additions & 2 deletions
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": "0.2.0-alpha.1",
11+
"gitart-vue-dialog": "0.2.0-alpha.3",
1212
"vue": "3.2.4"
1313
},
1414
"devDependencies": {
@@ -17,7 +17,7 @@
1717
"typescript": "^4.3.2",
1818
"vite": "^2.4.4",
1919
"vite-plugin-windicss": "^1.2.7",
20-
"vue-tsc": "0.2.3",
20+
"vue-tsc": "0.3.0",
2121
"windicss": "^3.1.6"
2222
}
2323
}

demo/src/components/Interface/TheFooter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
text="xs gray-400"
77
>
88
<span>
9-
9+
1010
</span>
1111

1212
<span m="l-auto">

demo/src/components/Layout/ProgrammaticalDialogLayout.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<script lang="ts">
1414
import { defineAsyncComponent, defineComponent, inject } from 'vue'
15-
import { DialogMethodsKey } from 'plugin'
15+
import { dialogInjectionKey } from 'plugin'
1616
1717
import Btn from '@/components/UI/Btn/Btn.vue'
1818
import ScrollDialog from '@/components/Dialogs/ScrollDialog/ScrollDialog.vue'
@@ -29,16 +29,18 @@ export default defineComponent({
2929
},
3030
3131
setup() {
32-
const $dialog = inject(DialogMethodsKey)
32+
const {
33+
addDialog,
34+
} = inject(dialogInjectionKey)!
3335
3436
const onOpenProfilePhotoDialog = () => {
35-
$dialog?.add({
37+
addDialog({
3638
component: ProfilePhotoDialog,
3739
})
3840
}
3941
4042
const onOpenScrollDialog = () => {
41-
$dialog?.add({
43+
addDialog({
4244
component: ScrollDialog,
4345
})
4446
}

demo/src/main.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { createApp } from 'vue'
2-
import { plugin as dialogPlugin } from 'plugin' // gitart-vue-dialog
3-
import 'plugin-css' // gitart-vue-dialog/dist/style.css
4-
52
import App from './App.vue'
63
import 'virtual:windi.css'
4+
import getDialogPlugin from './plugins/g-dialog'
75

86
export const app = createApp(App)
9-
.use(dialogPlugin)
10-
.mount('#app')
7+
8+
app.use(getDialogPlugin())
9+
app.mount('#app')

demo/src/plugins/g-dialog.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { plugin as dialogPlugin, IDialog } from 'plugin' // gitart-vue-dialog
2+
import 'plugin-css' // gitart-vue-dialog/dist/style.css
3+
4+
declare module '@vue/runtime-core' {
5+
export interface GDialogProperties {
6+
$dialog: IDialog
7+
}
8+
}
9+
10+
export default () => dialogPlugin

demo/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,10 @@ get-intrinsic@^1.0.2:
479479
has "^1.0.3"
480480
has-symbols "^1.0.1"
481481

482-
483-
version "0.2.0-alpha.1"
484-
resolved "https://registry.yarnpkg.com/gitart-vue-dialog/-/gitart-vue-dialog-0.2.0-alpha.1.tgz#368ee79986307b03815463b7b7912ea3889b37d8"
485-
integrity sha512-jGyHoIT5GPVIBakKGALfzyRdLDj9jYSmKxkC35ih/Fm6R7xpmfD26C8jCIZEz6JINc0p2tkSqul2/DaVEB5zRw==
482+
483+
version "0.2.0-alpha.3"
484+
resolved "https://registry.yarnpkg.com/gitart-vue-dialog/-/gitart-vue-dialog-0.2.0-alpha.3.tgz#2e3372c327f7fd932ce4050a870ee22a59b64b7f"
485+
integrity sha512-eRzWZc+7O52TkOXrx6r70CahOpfRa9mbVeV5Oq5j39GiZ9IeSwfEUlPIQ65L/lxQ+fTtZ0Xa433U0HyJNgQDew==
486486

487487
glob-parent@^5.1.2:
488488
version "5.1.2"
@@ -1019,7 +1019,7 @@ vscode-json-languageservice@^4.1.5:
10191019
vscode-nls "^5.0.0"
10201020
vscode-uri "^3.0.2"
10211021

1022-
[email protected], vscode-jsonrpc@^8.0.0-next.1:
1022+
10231023
version "8.0.0-next.1"
10241024
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.0-next.1.tgz#1964688a9851f86900c55e298939a157b2e224ad"
10251025
integrity sha512-NoSPIqVWpztdC91oUaiN9PmjAupRAEF8vdXRDLWw2lX2k760dn0gO4CCXkT6GdLSBcF/xKq0zWVTsfd3lpje7g==
@@ -1122,10 +1122,10 @@ vue-demi@*:
11221122
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.11.2.tgz#faa06da53887c493a695b997f4fcb4784a667990"
11231123
integrity sha512-J+X8Au6BhQdcej6LY4O986634hZLu55L0ewU2j8my7WIKlu8cK0dqmdUxqVHHMd/cMrKKZ9SywB/id6aLhwCtA==
11241124

1125-
vue-tsc@0.2.3:
1126-
version "0.2.3"
1127-
resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-0.2.3.tgz#12bf48e3c9b1e553d31aad0c641722d5d15841d8"
1128-
integrity sha512-0ahxAnQolmv6EOnv5zxeMi4vCpM4PkhjU70i/EI44OzMWq4OErjLZhEh8EXOLtMx6FBRuuqS5fiBXcuqLpoL7Q==
1125+
vue-tsc@0.3.0:
1126+
version "0.3.0"
1127+
resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-0.3.0.tgz#3b3872bf4f1d2e4409b57adbd826032e253db406"
1128+
integrity sha512-zaDRZBxwRIz1XjhNP92FqugG71st6BUMnA2EwPeXrAyzbEYVRz6TezNFceYl3QYqqN8CtaxbqUhaQEDj/ntoCA==
11291129
dependencies:
11301130
vscode-vue-languageservice "^0.27.0"
11311131

0 commit comments

Comments
 (0)