Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
3,262 additions
and
14,675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
{ | ||
"presets": ["@babel/preset-env"] | ||
} | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"exclude": ["@babel/plugin-transform-regenerator"] | ||
} | ||
] | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# default | ||
dist | ||
types/**/*.d.ts | ||
docs | ||
|
||
# docs | ||
docs/.nuxt | ||
docs/docs | ||
docs/static | ||
|
||
# example | ||
example/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: Scoped Slots | ||
description: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.' | ||
position: 6 | ||
category: Guide | ||
fullscreen: true | ||
--- | ||
|
||
## close | ||
|
||
- type: `Function` | ||
|
||
When you are using vue-final-modal as a HOC. you can `close` modal with scoped-slot: | ||
|
||
```vue | ||
<template> | ||
<vue-final-modal v-slot="{ close }" v-bind="$attrs" v-on="$listeners"> | ||
<div>Hello Vue Final Modal</div> | ||
<button @click="close">close modal</button> | ||
</vue-final-modal> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'VModal', | ||
inheritAttrs: false | ||
} | ||
</script> | ||
``` | ||
|
||
## params | ||
|
||
- type: `Any` | ||
- default: `{}` | ||
|
||
When you open a modal though the [API](/api) `$vfm.show(name, params)`, you can get `params` with scoped-slot: | ||
|
||
```html | ||
<template v-slot="{ params }"> | ||
<!-- modal content --> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: 作用域插槽 (Scoped Slots) | ||
description: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.' | ||
position: 6 | ||
category: Guide | ||
fullscreen: true | ||
--- | ||
|
||
## close | ||
|
||
- 型別: `Function` | ||
|
||
當你以 HOC 的方式使用 vue-final-modal 時. 你可以以 scoped-slot 關閉(close) modal: | ||
|
||
```vue | ||
<template> | ||
<vue-final-modal v-slot="{ close }" v-bind="$attrs" v-on="$listeners"> | ||
<div>哈囉,Vue Final Modal</div> | ||
<button @click="close">close modal</button> | ||
</vue-final-modal> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'VModal', | ||
inheritAttrs: false | ||
} | ||
</script> | ||
``` | ||
|
||
## params | ||
|
||
- 型別: `Any` | ||
- 預設: `{}` | ||
|
||
當你透過 [API](/zh-Hant/api) `$vfm.show(name, params)` 開啟 modal,你可以使用 scoped-slot 取得 params: | ||
|
||
```html | ||
<template v-slot="{ params }"> | ||
<!-- modal content --> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.