提交 7d265c3a 编写于 作者: D DCloud_LXH

Merge branch 'master' of github.com:dcloudio/unidocs-zh; branch 'master' of...

Merge branch 'master' of github.com:dcloudio/unidocs-zh; branch 'master' of gitcode.net:dcloud/unidocs-zh
...@@ -129,20 +129,20 @@ uts中有2种方式使用json数据: ...@@ -129,20 +129,20 @@ uts中有2种方式使用json数据:
```ts ```ts
// components/Foo.uvue // components/Foo.uvue
<view> <view>
<slot name="test name" /> <slot msg="test msg" />
</view> </view>
import { SlotsType } from 'vue' import { SlotsType } from 'vue'
export default { export default {
slots: Object as SlotsType<{ slots: Object as SlotsType<{
default: { name: string } default: { msg: string }
}> }>
} }
// page.uvue // page.uvue
<view> <view>
<Foo> <Foo>
<template v-slot="slotProps"> <template v-slot="slotProps">
<text>{{ slotProps.name }}</text> <text>{{ slotProps.msg }}</text>
</template> </template>
</Foo> </Foo>
</view> </view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册