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

fix(slots): 调整示例规避编译错误

上级 f20f7d00
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<view class="content"> <view class="content">
<child> <child>
<template v-slot:header="slotProps"> <template v-slot:header="slotProps">
<view class="header">{{ slotProps.msg }}</view> <!-- TODO: composition API 方式时未获取正确类型信息,只能通过索引方式获取 -->
<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.
先完成此消息的编辑!
想要评论请 注册