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
      },

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM