Skip to content

Commit 2b0b11a

Browse files
committed
docs: refine docs #36
1 parent e6e82a4 commit 2b0b11a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ export default {
143143

144144
### **Open modal with API**
145145

146+
> `v-model` is necessary when you open a modal with `$vfm.show(name)` API.
147+
146148
```html
147149
<vue-final-modal v-model="showModal" name="example">
148150
Modal Content Here
@@ -246,6 +248,8 @@ Or get `params` on `@beforeOpen` event:
246248
</script>
247249
```
248250

251+
> `v-model` is necessary when you open a modal with `$vfm.show(name)` API.
252+
249253
### `$vfm.hide(name)`
250254

251255
- Type: `Function`
@@ -329,6 +333,7 @@ All modal instances include show and hide.
329333
```js
330334
{
331335
value: { type: Boolean, default: false },
336+
name: { type: String, default: null },
332337
ssr: { type: Boolean, default: true },
333338
classes: { type: [String, Object, Array], default: '' },
334339
overlayClass: { type: [String, Object, Array], default: '' },

docs/content/en/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ export default {
153153

154154
### **Open modal with API**
155155

156+
<alert>`v-model` is necessary when you open a modal with `$vfm.show(name)` API.</alert>
157+
156158
```html
157159
<vue-final-modal v-model="showModal" name="example">
158160
Modal Content Here
@@ -251,6 +253,8 @@ Or get `params` on `@beforeOpen` event:
251253
</script>
252254
```
253255

256+
<alert>`v-model` is necessary when you open a modal with `$vfm.show(name)` API.</alert>
257+
254258
### `$vfm.hide(name)`
255259

256260
- Type: `Function`
@@ -332,6 +336,15 @@ All modal instances include show and hide.
332336

333337
## **Props**
334338

339+
### `name`
340+
341+
- Type: `String`
342+
- Default: `null`
343+
344+
Modal name for global API `$vfm.show(name)`, `$vfm.hide(name)`, etc.
345+
346+
<alert>`v-model` is necessary when you open a modal with `$vfm.show(name)` API.</alert>
347+
335348
### `ssr`
336349

337350
- Type: `Boolean`

0 commit comments

Comments
 (0)