欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

el-popover放在el-table中點擊無反應(yīng)問題解決方案

 更新時間:2024年04月25日 09:42:41   作者:Z_Xshan  
我們想在table中給btn加彈框但是?el-popover點擊按鈕沒有任何反應(yīng),解決思路是通過給每個el-popover都加上單獨的id,本文結(jié)合實例代碼給大家介紹的非常詳細,需要的朋友參考下吧

我們想在table中給btn加彈框但是 el-popover點擊按鈕沒有任何反應(yīng)
思考:通過插槽去添加這個組件el-popover的id是否綁定了一個值
解決思路:給每個el-popover都加上單獨的id

效果 :

 代碼  給每個組件都綁定ref

<template slot-scope="scope">
                                <div>
                                    <el-popover
                                        placement="left"
                                        v-else-if="scope.row.cmiBusiApproveInfo" 
                                        width="400"
                                        :ref="`popover-${scope.$index}`">
                                        <p>審批意見</p>
                                        <el-input
                                            type="textarea"
                                            placeholder="請輸入內(nèi)容"
                                            :rows="6"
                                            v-model="scope.row.approve"
                                            show-word-limit
                                            >
                                        </el-input>
                                        <div style="text-align: center; margin: 10px">
                                                <el-button size="small"  @click="deltaskList(scope.$index)">取消
                                                </el-button>
                                                <el-button size="small"  type="danger"  @click="confirm(scope.row,'reject',scope.$index)">駁回
                                                </el-button>
                                                <el-button size="small" type="primary" @click="confirm(scope.row,'agree',scope.$index)">確定
                                                </el-button>
                                        </div>
                                        <el-button slot="reference"  @click="auditClick(scope.row,scope.$index)" size="mini" >審核</el-button>
                                    </el-popover>
                                </div>
                            </template>

 通過他的id去控制關(guān)閉

 deltaskList(index){
            this.$refs[`popover-${index}`].doClose()
        },

到此這篇關(guān)于el-popover放在el-table中點擊無反應(yīng)問題的文章就介紹到這了,更多相關(guān)el-popover el-table內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論