@@ -11,23 +11,23 @@ Vuejs-dialog is a vue plugin that's designed to serve as a replacement to the na
1111 <CodeGroupItem title =" pnpm " >
1212
1313``` shell title="installation via pnpm"
14- pnpm add vuejs-dialog
14+ pnpm add vuejs-dialog@next
1515```
1616
1717 </CodeGroupItem >
1818
1919 <CodeGroupItem title =" yarn " >
2020
2121``` shell title="installation via yarn"
22- yarn add vuejs-dialog
22+ yarn add vuejs-dialog@next
2323```
2424
2525 </CodeGroupItem >
2626
2727 <CodeGroupItem title =" npm " active >
2828
2929``` bash{2} title="installation via npm"
30- npm i -S vuejs-dialog
30+ npm i -S vuejs-dialog@next
3131```
3232
3333 </CodeGroupItem >
@@ -55,49 +55,41 @@ app.mount('#app')
5555
5656### Script tag
5757
58+ View it on [ jsfiddle] ( https://jsfiddle.net/godofbrowser/rhxkz14f/3/ )
59+
5860``` html
59- // Todo: update for vue3
60- <!-- // Include vuejs-->
61- <!-- <script type="text/javascript" src="./path/to/vue.min.js"></script>-->
62-
63- <!-- // Include vuejs-dialog plugin-->
64- <!-- <link href="./path/to/vuejs-dialog.min.css" rel="stylesheet">-->
65- <!-- <script type="text/javascript" src="./path/to/vuejs-dialog.min.js"></script>-->
66- <!-- <script type="text/javascript" src="./path/to/vuejs-dialog-mixin.min.js"></script> // only needed in custom components-->
67-
68- <!-- <script>-->
69- <!-- // Tell Vue to install the plugin.-->
70- <!-- window.Vue.use(VuejsDialog.main.default)-->
71- <!-- </script>-->
72-
73-
74- // <link href =" ./path/to/vuejs-dialog.min.css" rel =" stylesheet" >
75- // <script src =" https://unpkg.com/vue@3.5.4/dist/vue.global.js" ></script >
76- // <script src =" ../vuejs-dialog.umd.js" ></script >
77- //
78- // ...then...
79- //
80- // <div id =" app" >{{ message }}</div >
81- // <script >
82- // // Create Vue 3 app
83- // const app = Vue.createApp({
84- // data() {
85- // return {
86- // message: 'Hello Vue 3!',
87- // };
88- // },
89- // });
90- //
91- // app.use(window.VuejsDialog.PromiseDialog, {
92- // message: {
93- // title: 'Quick one',
94- // body: 'Please confirm that you wish to proceed'
95- // }
96- // })
97- //
98- // // Mount the app to the DOM element
99- // app.mount('#app');
100- // </script >
61+ <head >
62+ <!-- // Include vuejs-->
63+ <link href =" https://unpkg.com/vuejs-dialog@next/dist/vuejs-dialog.min.css" rel =" stylesheet" >
64+ <script src =" https://unpkg.com/vue@3.5.4/dist/vue.global.js" ></script >
65+ <script src =" https://unpkg.com/vuejs-dialog@next/dist/vuejs-dialog.umd.js" ></script >
66+ </head >
67+ <body >
68+ <div id =" app" >
69+ <button @click =" $dialog.alert(message)" >
70+ {{ message }}
71+ </button >
72+ </div >
73+ <script >
74+ // Create Vue 3 app
75+ const app = window .Vue .createApp ({
76+ data () {
77+ return {
78+ message: ' Hello Vue 3!' ,
79+ };
80+ },
81+ });
82+
83+ app .use (window .VuejsDialog .PromiseDialog , {
84+ animation: ' bounce'
85+ })
86+
87+ // Mount the app to the DOM element
88+ app .mount (' #app' );
89+ </script >
90+ </body >
91+
92+
10193```
10294
10395## Opening a dialog
0 commit comments