·propertiess属性是组件对外的属性,用来接受外界传递到数组中的数据。
/*子组件的*/
Component({
properties:{
max:{ //完整定义属性的方式
type:Number; //属性值类型
value:10; //属性默认值
}
max:Number;//简化定义属性的方式
}
})
/*父组件的*/
<my-test1 max= '10'></My-test1>