Element-UI表格點擊Popover 彈出框確定取消


 

 

 

 

 

 <el-table-column width="600">
          <template slot-scope="scope">
<el-popover trigger="click" placement="top" width="450" @show="handleStatus(scope)" :ref="`popover-${scope.$index}`">
              <div>
                  <el-input type="textarea" :rows="5" maxlength="300" placeholder="請輸入內容" v-model="scope.row.spaceAllocatePrice"></el-input>
              </div>
              <div style="text-align: left; margin-top: 20px">
                <el-button size="small" plain @click="cancelClick(scope)">取消</el-button>
                <el-button type="primary" size="small" @click="sureClick(scope)">確定</el-button>
              </div>
              <el-button slot="reference" type="text">說明</el-button>
            </el-popover>
          </template>
        </el-table-column>

 

 

cancelClick(scope){ 
      this.$message('點擊了取消操作'); scope._self.$refs[`popover-${scope.$index}`].doClose() }, sureClick(scope){ // 可以在這里執行刪除數據的回調操作.......刪除操作...... this.$message({ message:"點擊了確定操作了",type: 'success' }); scope._self.$refs[`popover-${scope.$index}`].doClose() },

 


免責聲明!

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



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