分类网站模版,黑马程序员python教程,做百度联盟怎么才能创建多个网站,鞍山做网站专业公司原理#xff1a;通知在组件标签中传递参数已达到传参的目的 在组件的js的 properties中接受传递来的参数 然后在页面是展示这些数据 源码#xff1a;
!--components/my-info/my-info.wxml--
view classtitle
text classtexts通知在组件标签中传递参数已达到传参的目的 在组件的js的 properties中接受传递来的参数 然后在页面是展示这些数据 源码
!--components/my-info/my-info.wxml--
view classtitle
text classtexts{{title}}/text
/view
view classconut
text classnumber{{conut}}/text
/view// components/my-info/my-info.js
Component({/*** 组件的属性列表*/properties: {title:{type:String,value:标题},conut:{type:String,value:内容没有写哦}},/*** 组件的初始数据*/data: {},/*** 组件的方法列表*/methods: {}
})
/* components/my-info/my-info.wxss */
.texts{color: blue;font-size: large;}
.number{color:chartreuse;font-size: larger;
}
{component: true,usingComponents: {}
} 并在需要引入组件传参的地方使用组件即可
my-info title牛马程序员1 conut我是牛马程序员/my-info
my-info title牛马程序员2 conut我是牛马程序员2/my-info
my-info title牛马程序员3 conut我是牛马程序员3/my-info