下面的代码不写HTML就可以弹一个elementUI的MessageBox 弹框
在不写HTML的情况下我想弹一个Dialog 里面有输入框什么的该怎么办呢?
import { MessageBox } from 'element-ui'
MessageBox(message, '错误', {
confirmButtonText: '确定'
})
下面的代码不写HTML就可以弹一个elementUI的MessageBox 弹框
在不写HTML的情况下我想弹一个Dialog 里面有输入框什么的该怎么办呢?
import { MessageBox } from 'element-ui'
MessageBox(message, '错误', {
confirmButtonText: '确定'
})
<template>
<el-button type="text" @click="open">点击打开 Message Box</el-button>
</template>
<script>
export default {
methods: {
open() {
this.$alert('这是一段内容', '标题名称', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
}
}
}
</script>
dialog官方教程
https://element.eleme.io/#/zh...
希望对您有用,欢迎关注我的微信公众号:前端指南
5 回答4.9k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答4.8k 阅读✓ 已解决
4 回答4.4k 阅读✓ 已解决
4 回答1.9k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
MessageBox也可以有输入框啊
例子