
<template>
<div>
<div>手機: 價格<input type="text"
v-model="mobliePriceL"> 數量<input type="text"
v-model="moblieNum">小計{{moblieNum*mobliePriceL}}元</div>
<div>電腦: 價格<input type="text"
v-model="comPriceL"> 數量<input type="text"
v-model="comNum">小計{{comPriceL*comNum}}元</div>
<div>運費: <input type="text"
v-model="fieight">元 </div>
<div>共計: {{total}}元</div>
<div>優惠: {{discounts}}元</div>
<div>應付: {{total-discounts}}元</div>
</div>
</template>
<script>
export default {
data () {
return {
fieight: 10,
mobliePriceL: 2989,
comPriceL: 6000,
moblieNum: 0,
comNum: 0
}
},
methods: {},
computed: {
Total () {
return this.moblieNum * this.mobliePriceL + this.comPriceL * this.comNum
},
total () {
const total = this.Total - this.fieight
if (total > 0) {
return total
} else {
return 0
}
},
discounts () {
if (this.Total > 8000) {
return 200
} else if (this.Total > 5000) {
return 100
} else {
return 0
}
}
}
}
</script>
<style scoped lang='less'>
</style>
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/304579.html
標籤:其他
上一篇:徹底解決:-bash: mpiexec: command not found
下一篇:排序演算法——堆排
