From 3b1bf3ff2dfb1d566ed9cf2f36dbbba3afe10493 Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 6 Jan 2023 14:48:35 +0800 Subject: [PATCH] docs: vue2 composition-api for nvue --- docs/tutorial/vue-composition-api.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/vue-composition-api.md b/docs/tutorial/vue-composition-api.md index eb1bcb1f6..3efd380e7 100644 --- a/docs/tutorial/vue-composition-api.md +++ b/docs/tutorial/vue-composition-api.md @@ -42,11 +42,13 @@ unplugin-vue2-script-setup](https://github.com/antfu/unplugin-vue2-script-setup) ```js import '../../composition-api.js' - import { } from '@vue/composition-api' - import { } from '@dcloudio/uni-app' + import { defineComponent } from '@vue/composition-api' + import { onReady } from '@dcloudio/uni-app' export default defineComponent({ - setup () { - + setup() { + onReady(() => { + console.log('onReady') + }) } }) ``` -- GitLab