0👍
Instead preventing that two things separately, you can just replace all "e" characters with an empty string:
<template>
<div>
<input type="text" v-model="text" />
<div>Value is: {{ text }}</div>
</div>
</template>
<script>
import { ref, watchEffect } from "vue";
export default {
setup() {
const text = ref("");
watchEffect(() => {
text.value = text.value.replace(/e/, "");
});
return { text };
},
};
</script>
Demo:
- [Vuejs]-Vue-konva how save layer with image and line like jpg, png
- [Vuejs]-Break template in more than one file in vue, with out make any new components
Source:stackexchange.com