提示框/alert
使用方式
<script>
methods: {
funStr() {
this.$alert('你好')
},
funObj() {
this.$alert({
content: '你好',
duration: 3000,
})
}
}
</script>
$alert 字符串
如果自传递一个字符串,该字符串作为提示框的内容
$alert 配置说明
参数 | 类型 | 默认值 | 作用 |
---|---|---|---|
content | String | Null | 提示框的内容 |
duration | Number | 3000 | 显示多少毫秒 |