From 67159cc6ded50d49cdcefe9221281c4c7709ed63 Mon Sep 17 00:00:00 2001 From: Yev Vlasenko Date: Thu, 10 Aug 2017 10:58:09 +0100 Subject: [PATCH] Update README.md --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 981aef4..7b298ea 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Vue.use(VModal, { componentName: "foo-modal" }) Create modal: -```html +```vue hello, world! @@ -63,7 +63,7 @@ methods: { You can easily send data into the modal: -```vue +```javascript this.$modal.show('hello-world', { foo: 'bar' }) ``` @@ -71,7 +71,8 @@ And receive it in `beforeOpen` event handler: ```vue -... +``` +```javascript methods: { beforeOpen (event) { console.log(event.params.foo); @@ -87,19 +88,19 @@ It is a simplified version of the modal, which has most parameters set by defaul To start using `` you will have set a configuration: -``` +```javascript Vue.use(VModal, { dialog: true }) ``` And include it in your project: -``` +```vue ``` Call it (all params except of “text” are optional): -``` +```javascript this.$modal.show('dialog', { title: 'Alert!', text: 'You are too awesome',