|
@@ -58,8 +58,8 @@ export default {
|
|
|
watch:{
|
|
watch:{
|
|
|
customData:{
|
|
customData:{
|
|
|
handler(){
|
|
handler(){
|
|
|
- this.buyNum = parseFloat(this.customData.buyNum)
|
|
|
|
|
- this.unitPrice = parseFloat(this.customData.bigPrice)
|
|
|
|
|
|
|
+ this.buyNum = this.customData.buyNum ? parseFloat(this.customData.buyNum) : 1
|
|
|
|
|
+ this.unitPrice = this.customData.bigPrice ? parseFloat(this.customData.bigPrice) : 0
|
|
|
|
|
|
|
|
this.bigStockNum = Math.floor(this.customData.stock)
|
|
this.bigStockNum = Math.floor(this.customData.stock)
|
|
|
let smallCount = this.customData.stock - this.bigStockNum
|
|
let smallCount = this.customData.stock - this.bigStockNum
|
|
@@ -67,7 +67,8 @@ export default {
|
|
|
this.smallStockNum = smallStockNum.toFixed(2)
|
|
this.smallStockNum = smallStockNum.toFixed(2)
|
|
|
this.smallStockNum = parseFloat(this.smallStockNum)
|
|
this.smallStockNum = parseFloat(this.smallStockNum)
|
|
|
},
|
|
},
|
|
|
- deep:true
|
|
|
|
|
|
|
+ deep:true,
|
|
|
|
|
+ immediate:true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -146,7 +147,7 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.boardset-flowert {
|
|
.boardset-flowert {
|
|
|
- width:32vw;
|
|
|
|
|
|
|
+ width:34vw;
|
|
|
height: 80vh;
|
|
height: 80vh;
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
@@ -208,6 +209,11 @@ export default {
|
|
|
.switch-button{
|
|
.switch-button{
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
|
|
+ width: 35upx;
|
|
|
|
|
+ height: 35upx;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:70upx;
|
|
|
|
|
+ left:14vw;
|
|
|
.change-unit {
|
|
.change-unit {
|
|
|
width: 35upx;
|
|
width: 35upx;
|
|
|
height: 35upx;
|
|
height: 35upx;
|