docs(notification): update options api to composition api in demo (#948)

This commit is contained in:
songjianet 2021-08-25 07:10:03 +08:00 committed by GitHub
parent e044578633
commit 41714e1ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -18,19 +18,21 @@ For example:
```
```js
import { defineComponent } from 'vue'
import { useNotification } from 'naive-ui'
// content
export default {
export default defineComponent({
setup () {
const notification = useNotification()
return {
warning () {
notification.warning('...')
}
}
}
}
})
```
</n-space>

View File

@ -18,19 +18,21 @@
```
```js
import { defineComponent } from 'vue'
import { useNotification } from 'naive-ui'
// content
export default {
export default defineComponent({
setup () {
const notification = useNotification()
return {
warning () {
notification.warning('...')
}
}
}
}
})
```
</n-space>