forms/input/CInput.vue
@@ -17,7 +17,7 @@ :error="itemRes.error" :cursorSpacing="0" :value="value" :onChange="evt => hanldeChange(evt)" :onChange="evt => handleChange(evt)" > <slot v-if="!unit" /> <text @@ -61,7 +61,7 @@ }, }, methods: { hanldeChange(evt) { handleChange(evt) { // 去除首尾空格,小程序中还可以粘贴换行符进来 const changeValue = ((evt || '') + '') .replace(/^\s+|\s+$/g, '')