vue-msgbox
vue-msgbox copied to clipboard
replace setTimeout with Vue.nextTick & add vue dependency
MessageBox.prompt = function(message, title, options) {
if (typeof title === 'object') {
options = title;
title = '';
}
return MessageBox(merge({
title: title,
message: message,
showCancelButton: true,
showInput: true,
$type: 'prompt'
}, options));
};
好像关于prompt
的配置,已经设置了showInput: true
,感觉不用再去判断this.$els.input
了好像~
sorry,刚发现还是应该去判断下的 :)