feat(fjcl):添加文件预览
Showing
1 changed file
with
21 additions
and
5 deletions
... | @@ -30,12 +30,21 @@ | ... | @@ -30,12 +30,21 @@ |
30 | </tr> | 30 | </tr> |
31 | <tr v-for="(item,i) in mjftData.list" :key="i"> | 31 | <tr v-for="(item,i) in mjftData.list" :key="i"> |
32 | <td @click="delRow(i)" class="cz">-</td> | 32 | <td @click="delRow(i)" class="cz">-</td> |
33 | <td class="dzwdm"><input type="text" class="formInput" v-model="item.dzwdm"/></td> | 33 | <td class="dzwdm"> |
34 | <td class="syqmj"><input type="number" class="formInput" v-model="item.tdsyqsyqmj" @keydown="oninput"/> | 34 | <el-input v-model="item.dzwdm" > |
35 | </el-input> | ||
35 | </td> | 36 | </td> |
36 | <td class="dytdmj"><input type="number" class="formInput" v-model="item.dydytdmj" @keydown="oninput"/> | 37 | <td class="syqmj"> |
38 | <el-input | ||
39 | oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+4)}" | ||
40 | v-model="item.tdsyqsyqmj" | ||
41 | ></el-input> | ||
37 | </td> | 42 | </td> |
38 | <td class="fttjmj"><input type="number" class="formInput" v-model="item.fttdmj" @keydown="oninput"/> | 43 | <td class="dytdmj"> |
44 | <el-input v-model="item.dydytdmj" oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+4)}"></el-input> | ||
45 | </td> | ||
46 | <td class="fttjmj"> | ||
47 | <el-input v-model="item.fttdmj" oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+4)}"></el-input> | ||
39 | </td> | 48 | </td> |
40 | </tr> | 49 | </tr> |
41 | <tr> | 50 | <tr> |
... | @@ -111,7 +120,14 @@ | ... | @@ -111,7 +120,14 @@ |
111 | }) | 120 | }) |
112 | }, | 121 | }, |
113 | oninput(e) { | 122 | oninput(e) { |
114 | e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null | 123 | /* e.target.value = (e.target.value.match(/^(1|2|3|4|5|6|7|8|9|0)*(\.?\d{0,2})/g)[0]) || null*/ |
124 | let value = e.target.value | ||
125 | if (isNaN(value)) { | ||
126 | value = null | ||
127 | } | ||
128 | if (value.indexOf('.') > 0) { | ||
129 | value = value.slice(0, value.indexOf('.') + 4) | ||
130 | } | ||
115 | }, | 131 | }, |
116 | addRow() { | 132 | addRow() { |
117 | this.mjftData.list.push({ | 133 | this.mjftData.list.push({ | ... | ... |
-
Please register or sign in to post a comment