Vue+Element UI 向Table组建中的每一行添加一个switch组件,实现每一行单独控制

 

最近在做公司的设备管理系统,权限管理中有一个需求需要展示如下:

Vue+Element UI 向Table组建中的每一行添加一个switch组件,实现每一行单独控制_第1张图片

每一行表格中的switch单独控制一行;

实现效果的代码如下:


              
              
              
              
              
              
              
                
              
            

备注:在第一次使用时,我将slot-scope="scope"写成 scope="scope"运行起来之后没有报错,但是会有warning警告;提示信息如下:

(Emitted value instead of an instance of Error) the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The n

ot-scope" attribute can also be used on plain elements in addition to