MessageBox 设置输入框无法获取内容
Closed this issue · 2 comments
januwA commented
MessageBox({
title: "提示",
message: "message",
showCancelButton: true,
showInput: true,
inputType: "number",
inputValue: "",
inputPlaceholder: "",
}).then(r => {
console.log(r); // confirm 或 cancel
});
如上面的代码,我该如何获取输入框中的值,谢谢 :)
Johnsonheng commented
MessageBox.prompt('').then(r => {
r.value //inputValue值
r.action //confirm and cancel
})
建议看下源码https://github.com/ElemeFE/vue-msgbox/blob/master/src/msgbox.vue
januwA commented
@Johnsonheng 那你这样如何设置input的类型呢!默认是“text”,我想使用"number",只有按照第一种写法了吧。