docs(@vant/use): fix demo (#7763)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
```js
|
||||
// Parent.vue
|
||||
import { ref } from 'vue';
|
||||
import { useChildren } from '@vant/use';
|
||||
|
||||
const RELATION_KEY = 'my-relation';
|
||||
@@ -29,6 +30,8 @@ export default {
|
||||
// Child.vue
|
||||
import { useParent } from '@vant/use';
|
||||
|
||||
const RELATION_KEY = 'my-relation';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const { parent } = useParent(RELATION_KEY);
|
||||
|
||||
Reference in New Issue
Block a user