<div id="box">
{{123.966|number}}
</div>
<script src="js/vue.js"></script>
<script>
Vue.filter("number",function(data){
return data.toFixed(2)
})
new Vue({
el:'#box',
</script>
<div id="box">
{{123.966|number}}
</div>
<script src="js/vue.js"></script>
<script>
Vue.filter("number",function(data){
return data.toFixed(2)
})
new Vue({
el:'#box',
</script>
本文标题:2018-09-19Vue保留两位小数
本文链接:https://www.haomeiwen.com/subject/zhwbnftx.html
网友评论