fix:输入限制空格 数值范围

This commit is contained in:
zhaohy
2024-08-23 11:33:32 +08:00
parent 49df50b260
commit 129ef8845a
6 changed files with 71 additions and 11 deletions

View File

@@ -32,6 +32,7 @@
placeholder="请输入备注"
:disabled="showEdit"
style="width: 85%"
@keydown="handleKeyDown"
:autoSize="{ minRows: 4, maxRows: 4 }" />
</a-form-item>
</a-form>
@@ -125,6 +126,12 @@
showEdit.value = !showEdit.value;
}
};
const handleKeyDown = (event) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
const toggle = async (data) => {
equipmentAlarm.value = { ...data };
visible.value = true;
@@ -173,6 +180,7 @@
changeShowEdit,
showEdit,
equipmentAlarm,
handleKeyDown,
stateOptions,
btnClick,
visible,