摘要:
1.父组件 <template> <view class=""> <!-- :title="title" 这是动态传值 ,content="this.content" content="这里面是写死的字符串,无法获得data中content的值(内容1)"这是静态传值 --> <mycomponen 阅读全文
posted @ 2021-05-24 16:06
程序杨%
阅读(210)
评论(0)
推荐(0)
摘要:
1.子组件定义 <template> <view> <h1 @click="tap1">{{title}}</h1> <div>{{content}}</div> </view> </template> <script> export default { props:{ title : { type 阅读全文
posted @ 2021-05-24 11:24
程序杨%
阅读(80)
评论(0)
推荐(0)
摘要:
1.定义子组件 <template> <view> <!-- 2.{{title}}直接使用属性 --> <h1 @tap="tap1">{{title}}</h1> <div>{{content}}</div> </view> </template> <script> export default 阅读全文
posted @ 2021-05-24 10:32
程序杨%
阅读(520)
评论(0)
推荐(0)
浙公网安备 33010602011771号