You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tdesign-vue.js?v=d4497699:24029:35, .vxe-table--render-default .vxe-table--body-wrapper, .vxe-table--render-default .vxe-table--footer-wrapper{ background-color: var(--td-bg-color-container); } handleInput: function handleInput(e) { var _this5 = this; this.preValue = this.inputValue + e.data; var val = e.currentTarget.value; var preCursorPos; if (this.composingRef) { this.composingRefValue = val; } else { if (this.type !== "number") { val = this.getValueByLimitNumber(val); } emitEvent(this, "change", val, { e, trigger: "input" }); if (!this.isIE) { var inputRef = this.$refs.inputRef; preCursorPos = inputRef.selectionStart; setTimeout(function() { **inputRef.selectionEnd = preCursorPos;** }); } this.$nextTick(function() { _this5.setInputValue(_this5.value); }); }
當input[type="number"]時候,是沒有selectionEnd 方法的,
控制台報錯:
DOMException: Failed to set the 'selectionEnd' property on 'HTMLInputElement': The input element's type ('number') does not support selection.
at http://localhost:3001/node_modules/.vite/deps/tdesign-vue.js?v=d4497699:24029:35
(匿名) @ input.tsx:373
setTimeout(异步)
handleInput @ input.tsx:372
invokeWithErrorHandling @ vue.runtime.esm.js:1863
invoker @ vue.runtime.esm.js:2188
original._wrapper @ vue.runtime.esm.js:6961
期望结果
不報錯
实际结果
報錯
框架版本
Vue2.6
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
No response
The text was updated successfully, but these errors were encountered:
tdesign-vue 版本
1.2.7
重现链接
No response
重现步骤
tdesign-vue.js?v=d4497699:24029:35,
.vxe-table--render-default .vxe-table--body-wrapper, .vxe-table--render-default .vxe-table--footer-wrapper{ background-color: var(--td-bg-color-container); } handleInput: function handleInput(e) { var _this5 = this; this.preValue = this.inputValue + e.data; var val = e.currentTarget.value; var preCursorPos; if (this.composingRef) { this.composingRefValue = val; } else { if (this.type !== "number") { val = this.getValueByLimitNumber(val); } emitEvent(this, "change", val, { e, trigger: "input" }); if (!this.isIE) { var inputRef = this.$refs.inputRef; preCursorPos = inputRef.selectionStart; setTimeout(function() { **inputRef.selectionEnd = preCursorPos;** }); } this.$nextTick(function() { _this5.setInputValue(_this5.value); }); }
當input[type="number"]時候,是沒有selectionEnd 方法的,
控制台報錯:
DOMException: Failed to set the 'selectionEnd' property on 'HTMLInputElement': The input element's type ('number') does not support selection.
at http://localhost:3001/node_modules/.vite/deps/tdesign-vue.js?v=d4497699:24029:35
(匿名) @ input.tsx:373
setTimeout(异步)
handleInput @ input.tsx:372
invokeWithErrorHandling @ vue.runtime.esm.js:1863
invoker @ vue.runtime.esm.js:2188
original._wrapper @ vue.runtime.esm.js:6961
期望结果
不報錯
实际结果
報錯
框架版本
Vue2.6
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
No response
The text was updated successfully, but these errors were encountered: