【发布时间】:2020-12-03 06:02:08
【问题描述】:
我使用 html 创建了可视化计算 它看起来像这样..
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| | . | |
我在点击每个 html 元素时创建了名为 number() 的函数
就是这样
number(number)
{
this.total_quantity_discount_price = this.total_quantity_discount_price+''+number;
this.total_quantity_discount_price = parseFloat(this.total_quantity_discount_price);
},
数字 0123456789 一切正常,但我对 . 的问题我如何将 . 添加到 this.total_quantity_discount_price
我的意思是如何添加数字 10.555 或 55.648 等..
谢谢..
【问题讨论】:
标签: javascript html vue.js vuejs2 vue-component