slot-scope="scope"重復使用出錯


 

 

如上圖,如下代碼

<el-table-column label="狀態">
    <template slot-scope="scope">
         <el-switch v-model="scope.row.mg_state" @change="userStateChanged(scope.row)">
         </el-switch>
    </template>
</el-table-column>
<el-table-column label="操作" width="180">
    <template slot-scope="scope">
        <el-button type="primary" icon="el-icon-edit" size="mini" @click="showEditDialog()"></el-button>
        <el-button type="danger" icon="el-icon-delete" size="mini"></el-button>
        <el-tooltip effect="dark" content="分配角色" placement="top" :enterable="false">
              <el-button type="warning" icon="el-icon-setting" size="mini" ></el-button>
        </el-tooltip>
   </template>
</el-table-column>

 兩鎰使用slot-scope="scope",第一次的使用正常,數據也正常調用,

第二次再使用 slot-scope="scope"總是報錯,slot-scope=""才不報錯,錯誤信息如下:

 

 

 求大神指導


免責聲明!

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



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