然而,el-input-number是一个封装了数字输入功能的组件,它提供了disabled属性来禁用整个组件,而不是提供readonly属性。 2. 检查代码中el-input-number组件的readonly属性设置 由于el-input-number没有readonly属性,因此在你的代码中设置readonly属性是无效的。你应该检查并移除这个属性,如果目的是禁用组件,应该使用...
this.readonly = false; }, 100); } else { if (e) { e.stopPropagation(); } this.readonly = true; } }, clickEvt() { if (this.$refs.password) { this.$refs.password.$refs.input.onmousedown = (evt) => { if (evt) { evt.preventDefault(); evt.stopPropagation(); } console.log...
先设置el-input为readonly, 当click时再改变readonly=false 代码如下: <template><el-inputv-model="datum.password"placeholder="请输入登录密码 长度8-16位"type="password"autocomplete="off":readonly="datum.readonly"@click="datum.readonly = false"/></template><script>import { ref } from 'vue' ...
:disabled="disabled" // 是否禁用 :readonly="readonly" // 是否只读 :maxlength="maxlength" // 输入的最大长度 :minlength="minlength" // 输入的最小长度(暂时不支持) :autocomplete="autoComplete" // 自动补全 :autofocus="autofocus" // 自动聚焦 :min="min" // 允许输入的最小值(数字或者日期) :...
autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size IDL属性 list, value, selectionEnd, selectionDirection 方法 select(), setRangeText(), setSelectionRange() 值 该<input>元素的value属性的值中包含DOMString这是自动确认为符合URL语法。更具体地说,有三种可能的值格式将通过...
autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size IDL属性 list, value, selectionEnd, selectionDirection 方法 select(), setRangeText(), setSelectionRange() 值 该<input>元素的value属性的值中包含DOMString这是自动确认为符合URL语法。更具体地说,有三种可能的值格式将通过...