亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

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

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

效果 :

 代碼  給每個(gè)組件都綁定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="請(qǐng)輸入內(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中點(diǎn)擊無反應(yīng)問題的文章就介紹到這了,更多相關(guān)el-popover el-table內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論