exportdefault{install(Vue){// 重点--->install
Vue.prototype.$formatMoney=function(s, n){
n = n >=0&& n <=20? n :2;
s =parseFloat((s +'').replace(/[^\d\.-]/g,'')).toFixed(n)+'';var l = s.split('.')[0].split('').reverse();var r = s.split('.')[1];
r = r ==null?'':'.'+ r;var t ='';// console.log(l)if(l[l.length -1]==='-'){// 负数不需要分隔号,for(var i =0; i < l.length; i++){if(l[i]==='-'){
t += l[i]+''continue}// 不是数组的倒数第二个元素才加"," ["0", "4", "5", "-"]
t += l[i]+((i +1)%3==0&& i +1!= l.length -1?',':'')// i + 1 != l.length会变成-,540.00,因为在5时元素位置2+1为3非数组长度// t += l[i] + ((i + 1) % 3 == 0 && i + 1 != l.length ? "," : "");}}else{for(var i =0; i < l.length; i++){
t += l[i]+((i +1)%3==0&& i +1!= l.length ?',':'');}}return(
t.split('').reverse().join('')+ r
)}}}
问题描述:
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no …
问题描述:
Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property userId of class UserDto with value 123 Cause: java.lang.IllegalArgumentException: argument type mismatch
问题分析:
1、Mapper文件中的userI…