ElementUI + vue 与 js 使用不同 + 外部引用 +loading区域加载()2022.9.17

Vue 2.x

Element - 网站快速成型工具

Vue 3.x

一个 Vue 3 UI 框架 | Element Plus (gitee.io)

alert 和 this.$alert

// alert('这是 js 自带的提示框')
    alert('这是js自带的提示框')
    //this.$alert 这是ElementUI提供的提示框 可以带回调函数
    this.$alert('这是ElementUI提供的提示框',{
      confirmButtonText:'确定',
      callback:action => {
        this.$message('点击了确定')
      }
    })

alert

this.$alert

点击完后有回调函数

 

 confirm 和 this.$confirm

//这是 js 自带的确认框,不需要Vue+ElementUI 环境也能使用
    confirm('是否删除')
    this.$confirm需要Vue+ElementUI 环境才能使用
    this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: 'warning'
    }).then(() => {
      this.$message({
        type: 'success',
        message: '删除成功!'
      });
    }).catch(() => {
      this.$message({
        type: 'info',
        message: '已取消删除'
      }
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值