Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/input/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default defineComponent({
const { composing } = e.target as any;
let triggerValue = (e.target as any).value;
compositing.value = !!((e as any).isComposing && composing);
if ((compositing.value && props.lazy) || stateValue.value === triggerValue) return;
if (stateValue.value === triggerValue) return;

if (hasMaxLength.value) {
// 1. 复制粘贴超过maxlength的情况 2.未超过maxlength的情况
Expand Down
4 changes: 2 additions & 2 deletions components/vc-input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export default defineComponent({
});
};
const handleChange = (e: ChangeEvent) => {
const { value, composing } = e.target as any;
const { value } = e.target as any;
// https://github.com/vueComponent/ant-design-vue/issues/2203
if (((e as any).isComposing && composing && props.lazy) || stateValue.value === value) return;
if (stateValue.value === value) return;
const newVal = e.target.value;
resolveOnChange(inputRef.value, e, triggerChange);
setValue(newVal);
Expand Down
3 changes: 1 addition & 2 deletions components/vc-mentions/src/Mentions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ export default defineComponent({
emit('change', val);
};

const onChange: EventHandler = ({ target: { value, composing }, isComposing }) => {
if (isComposing || composing) return;
const onChange: EventHandler = ({ target: { value } }) => {
triggerChange(value);
};

Expand Down