<template>
<div>
<input
type="text"
v-model="text"
@input="(e) => text = e.target.value.replace(/\s/g,'')"
>
</div>
</template>
<script setup>
import {
ref } from 'vue'
let text = ref(undefined)
</script>
Vue 禁止输入框输入空格
猜你喜欢
转载自blog.csdn.net/zz00008888/article/details/132689037
今日推荐
周排行