You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<a-textarea @keydown="handleKeyDown" />
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
name: 'NsTextarea',
|
|
|
|
setup() {
|
|
|
|
const handleKeyDown = (event: KeyboardEvent) => {
|
|
|
|
// Check if the pressed key is a space
|
|
|
|
if (event.code === 'Space') {
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
return {
|
|
|
|
handleKeyDown,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped></style>
|