提交 139b1b71 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

refactor(slots): 调整作用域插槽获取参数方式

上级 c2694ea8
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<view class="content"> <view class="content">
<child> <child>
<template v-slot:header="slotProps"> <template v-slot:header="slotProps">
<!-- TODO: composition API 方式时未获取正确类型信息,只能通过索引方式获取 --> <view class="header">{{ slotProps.msg }}</view>
<view class="header">{{ slotProps['msg'] }}</view>
</template> </template>
<template v-slot:default="{ msg }"> <template v-slot:default="{ msg }">
<view class="main">{{ msg }}</view> <view class="main">{{ msg }}</view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册