其他分享
首页 > 其他分享> > Vue ElementUI表格table中使用select下拉框组件时获取改变之前的值

Vue ElementUI表格table中使用select下拉框组件时获取改变之前的值

作者:互联网

<el-select
            :ref="scope.row.id"
            v-model="scope.row.supplierId"
            @change="dialogTipFn(scope.row)"
          >
            <el-option
              v-for="item in supplierList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            ></el-option>
</el-select>

 

      dialogTipFn(row) {
        if (this.dialogTip) {
          const preValue = this.$refs[row.id].value
          this.$confirm('变更供应商会按新供应商进价进行退货,请慎重!', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            showClose: false,
          })
            .then(() => {})
            .catch(() => {
              row.supplierId = preValue
            })
        }
        // this.dialogTip = false
      },

 

标签:Vue,false,ElementUI,供应商,dialogTip,preValue,下拉框,row
来源: https://www.cnblogs.com/lys597/p/15959749.html