//子组件 {{item.name}}({{item.numData}}个){{ itemVal.stationName }} {{itemVal.stationType==1?'手工':"自动"}}
//父组件import leftSelectMore from "@/components/leftSelect/leftSelectMore.vue"; components: { leftSelectMore }, data() { return { leftSelectMoreArr: [ { name: "省控断面", numData: "1", nameNumber: 1, stationArr: [ { stationName: "桥1", stationLabel: 1, stationType: 1, //1是手工,2是自动 }, { stationName: "桥2", stationLabel: 2, stationType: 2, //1是手工,2是自动 }, ], }, { name: "市控断面", numData: "1", nameNumber: 2, stationArr: [ { stationName: "桥3", stationLabel: 3, stationType: 1, //1是手工,2是自动 }, { stationName: "桥4", stationLabel: 4, stationType: 2, //1是手工,2是自动 }, ], }, ], leftSelectMoreFlag: true, } }, methods: { // 点击了左侧的哪一个选项 getSingleVal(val, stationType) { console.log("选中的") } }
还没有评论,来说两句吧...