Skip to content

Commit f587ccd

Browse files
authored
Update README.md
1 parent e90d508 commit f587ccd

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ Define in inline template:
4141

4242
```javascript
4343
this.$modal.open(`
44-
<template>
45-
<div>
46-
{{ message }}
47-
<button :click="onOk" }>ok</button>
48-
</div>
49-
</template>
44+
<div>
45+
{{ message }}
46+
<button :click="onOk" }>ok</button>
47+
</div>
5048
`, {
5149
props: {
5250
message: 'here is a message',
@@ -114,9 +112,9 @@ Include a position option when creating modal:
114112

115113
```javascript
116114
this.$modal.open(`
117-
<template>
115+
<div>
118116
...
119-
</template>
117+
</div>
120118
`, {
121119
position: {
122120
type: 'point',
@@ -182,9 +180,9 @@ This will close the modal on the top.
182180
You can disable esc detection by
183181
```javascript
184182
this.$modal.open(`
185-
<template>
183+
<div>
186184
...
187-
</template>
185+
</div>
188186
`, {
189187
...
190188
escOff: true
@@ -195,9 +193,9 @@ this.$modal.open(`
195193
When the modal is being closed, an onClose handler will be trigger. You can define it in the option.
196194
```javascript
197195
this.$modal.open(`
198-
<template>
196+
<div>
199197
...
200-
</template>
198+
</div>
201199
`, {
202200
...
203201
onClose: () => {console.log('on close')}
@@ -210,9 +208,9 @@ this.$modal.open(`
210208
You can set the lightbox color and transition by
211209
```javascript
212210
this.$modal.open(`
213-
<template>
211+
<div>
214212
...
215-
</template>
213+
</div>
216214
`, {
217215
...
218216
style: {
@@ -275,9 +273,9 @@ By default, modal will be created dynamically, and will be destroyed after being
275273

276274
```javascript
277275
this.$modal.open(`
278-
<template>
276+
<div>
279277
...
280-
</template>
278+
</div>
281279
`, {
282280
...
283281
name: 'modal-one'

0 commit comments

Comments
 (0)