提交 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数据:
```ts
// components/Foo.uvue
<view>
<slot name="test name" />
<slot msg="test msg" />
</view>
import { SlotsType } from 'vue'
export default {
slots: Object as SlotsType<{
default: { name: string }
default: { msg: string }
}>
}
// page.uvue
<view>
<Foo>
<template v-slot="slotProps">
<text>{{ slotProps.name }}</text>
<text>{{ slotProps.msg }}</text>
</template>
</Foo>
</view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册