vue 3.0 + element-ui MessageBox弹出框的 让文本框显示文字 placeholder

inputPlaceholder:'请填写理由',

方法实现如下:

this.$prompt('', '是否确认?', {

confirmButtonText: '确定',

cancelButtonText: '取消',

inputPlaceholder:'请填写理由',

}).then(({ value }) => {

if(value == null || value == ""){

Message({message: '请填写淘汰原因!',type: 'error', duration: 5 * 1000});

return;

}

var postData = {aa:opkid,bb:value};

knockout(postData).then((res) => {

if(res.success){

Message({message: '操作成功',type: 'success', duration: 5});

this.pageDataInit(1);

}

else{

Message({message: '操作失败,'+res.message,type: 'error', duration: 5});

}

}).catch(() => {})

}).catch(() => {

this.$message({

type: 'info',

message: '取消操作'

});

});

},

相关推荐
Dragonir7 分钟前
React+Three.js 实现 Apple 2025 热成像 logo
前端·javascript·html·three.js·页面特效
武天17 分钟前
如果使用Vue3.0实现一个 Modal,你会怎么进行设计?
vue.js
古一|1 小时前
Vue3中ref与reactive实战指南:使用场景与代码示例
开发语言·javascript·ecmascript
peachSoda71 小时前
封装一个不同跳转方式的通用方法(跳转外部链接,跳转其他小程序,跳转半屏小程序)
前端·javascript·微信小程序·小程序
@PHARAOH1 小时前
HOW - 浏览器兼容(含 Safari)
前端·safari
undefined在掘金390411 小时前
flutter 仿商场_首页
前端
少卿1 小时前
react-native图标替换
前端·react native
熊猫钓鱼>_>2 小时前
TypeScript前端架构与开发技巧深度解析:从工程化到性能优化的完整实践
前端·javascript·typescript
敲敲敲敲暴你脑袋2 小时前
Canvas绘制自定义流动路径
vue.js·typescript·canvas
duansamve2 小时前
Vue3与Vue2中使用对比
vue