问题遇到的现象和发生背景
element 使用this.$msgbox生产一个textarea的时候,如何去添加字数回显的属性
问题相关代码,请勿粘贴截图
handleReject() {
const h = this.$createElement;
var that = this;
this.$msgbox({
title: "xxx",
message: h(
"div",
{
attrs: {
class: "el-textarea",
},
},
[
h("textarea", {
attrs: {
class: "el-textarea__inner",
autocomplete: "off",
rows: 4,
id:"rejectReson",
maxlength:50,
},
value: that.rejectReson,
on: { input: that.onRejectResonInputChange },
}),
]
),
showCancelButton: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
}).then(() => {
});
},
onRejectResonInputChange() {
this.rejectReson = document.querySelector("#rejectReson").value;
},
运行结果及报错内容
我的解答思路和尝试过的方法
不知道如何把show-word-limit添加上去
我想要达到的结果
显示show-word-limit的效果