mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
docs(notification): update options api to composition api in demo (#948)
This commit is contained in:
parent
e044578633
commit
41714e1ea1
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user