this.$prompt  带有输入框的弹框
        this.$prompt('请输入拒绝原因', '提示', {confirmButtonText: '确定',cancelButtonText: '取消'}).then(({ value }) => {
          if (!value || value.length > 100) {
            return this.$message.error('请输入不超过一百字的拒绝原因')
          }
          postData.responseRemake = value
          this.gridLoading = true
          updateOrderResponseStatusByOrderId(postData).then(res => {
            if (res.data){
              this.$message({type: 'success', message: '已经拒绝 ' });
            }
            this.gridLoading = false
            this.getList()
          }).catch(() => {
            this.gridLoading = false
            this.getList()
          })
        }).catch(() => {
          this.$message({type: 'info', message: '取消操作'});
        })
vue this.$prompt 控制输入长度
this.$prompt('请输入内容', '提示', {
  inputAttrs: {
    maxlength: 10 // 设置最大长度为10
  }
}).then(({value}) => {
  // 处理输入值
}).catch(() => {
  // 取消操作
});

$confirm 不带输入框弹框

Logo

Vue社区为您提供最前沿的新闻资讯和知识内容

更多推荐