vue element el-input 输入框当内容长度超出时现示el-tooltip提示
html<el-form-item label="派驻寿险机构" prop="lifeComName"><el-tooltip :disabled="disabledTooltip" effect="dark" :content="ruleForm.lifeComNameStr" placement="top"><el-input ref="lifeComNameSt
·
html
<el-form-item label="派驻寿险机构" prop="lifeComName">
<el-tooltip :disabled="disabledTooltip" effect="dark" :content="ruleForm.lifeComNameStr" placement="top">
<el-input ref="lifeComNameStr" v-model="ruleForm.lifeComNameStr" type="text" disabled class="control"/>
</el-tooltip>
</el-form-item>
js
data() {
disabledTooltip: true,
},
methods: {
showTooltip() {
const lifeW = this.$refs.lifeComNameStr
this.disabledTooltip = lifeW.value.length < 20
},
}
更多推荐
已为社区贡献2条内容
所有评论(0)