-
使用组件,并传值
<dialog orderlists="[{count:1},{count:2}]" mount="3"> </dialog>
接受传过来的值
- // components/dialog/dialog.js
- Component({
- properties:{
- orderlists:Array,
- mount:String
- },
- ready(){
- console.log(this.data.orderlists);
- console.log(this.data.mount);
- },
- })
结果输出的值为
[ ]
3
请问各位大神 该怎么解决?