We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.10.4
https://codesandbox.io/p/sandbox/tdesign-vue-next-tag-input-max-demo-forked-d7ljpx
<template> <t-tag-input v-model="tags" placeholder="最多只能输入 3 个标签" :max="3" :inputProps="{ onChange: handleOnChange }" @enter="onEnter" /> </template> <script setup> import { ref } from 'vue'; import { MessagePlugin } from 'tdesign-vue-next'; const tags = ref([]); const onEnter = (value, { inputValue }) => { if (value.length >= 3 && inputValue) { MessagePlugin.warning('最多只能输入 3 个标签!'); } }; function handleOnChange(value){ console.log(value) } </script>
获取到输入框的输入内容
No response
20.11.1
似乎是因为onChange属性不支持数组导致的。我需要监听用户输入的内容
The text was updated successfully, but these errors were encountered:
👋 @entireyu,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
如果有同样遇到此问题的同学,可以先通过设置v-model:inputValue + watch的形式替代
v-model:inputValue
如果有同样遇到此问题的同学,可以先通过设置v-model:inputValue + watch的形式替代 也可以使用input-change
No branches or pull requests
tdesign-vue-next 版本
1.10.4
重现链接
https://codesandbox.io/p/sandbox/tdesign-vue-next-tag-input-max-demo-forked-d7ljpx
重现步骤
期望结果
获取到输入框的输入内容
实际结果
框架版本
No response
浏览器版本
No response
系统版本
No response
Node版本
20.11.1
补充说明
似乎是因为onChange属性不支持数组导致的。我需要监听用户输入的内容
The text was updated successfully, but these errors were encountered: