Commit baf21430 by liuwange1

优化一部分

parent e1b7a753
......@@ -38,8 +38,8 @@ export default {
components: { gaojing },
props: {
osc: {
type: String || Number,
default: "10",
type: Number,
default: 10,
},
},
data() {
......
......@@ -14,9 +14,19 @@
<div class="style-line"></div>
</div>
<div class="option-box">
<div class="btn3 active">路线1</div>
<div class="btn3">路线2</div>
<div class="btn3">路线3</div>
<div
class="btn3"
:class="{ active: roadActiveIndex == index }"
v-for="(item, index) in roadList"
:key="index + 'c'"
@click="roadClick(index)"
>
{{ item }}
</div>
</div>
<div class="option-box operation-box">
<div class="btn2">编辑</div>
<div class="btn2">新增</div>
</div>
</div>
</div>
......@@ -63,6 +73,8 @@ export default {
optionActiveIndex: 0,
osc: 11,
oscName: "/EZ_AF",
roadList: ["路线1", "路线2", "路线3"],
roadActiveIndex: 0,
};
},
methods: {
......@@ -80,6 +92,9 @@ export default {
});
});
},
roadClick(index) {
this.roadActiveIndex = index;
},
},
};
</script>
......@@ -138,6 +153,14 @@ export default {
margin-right: 12px;
}
}
.operation-box {
margin-top: 15px;
flex-flow: row-reverse;
> div {
transform-origin: center;
transform: scale(0.8);
}
}
.bottom {
margin-top: 20px;
}
......
......@@ -51,15 +51,13 @@ export default {
optionActiveIndex: 0,
};
},
created() {
this.init();
},
created() {},
methods: {
changeOption(index) {
this.optionActiveIndex = index;
this.$axios
.post("/osc/sendInt", {
arg: 10,
arg: 15,
name: "/YJ",
})
.then(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment