Element: 如何把 操作栏封装起来 我想把 操作栏封装成组件 可是有个scope太坑爹了 无法封装

Created on 8 Apr 2018  ·  6Comments  ·  Source: ElemeFE/element

如何把 操作栏封装起来 我想把 操作栏封装成组件 可是有个scope太坑爹了 无法封装

All 6 comments

Hello, this issue has been closed because it does not conform to our issue requirements. Please submit issues with issue-generator. More info can be found in #3693.



<el-table-column label="操作" width="300"> <template slot-scope="scope"> <el-button size="mini" @click="other.row_index=scope.$index;other.showDialog=true;sessionStorage.setItem('name',JSON.stringify(scope.row)); ">修改</el-button> <el-button size="mini" type="danger" @click="post(urls.del,{'uid':scope.row.uid},delCallBack);other.row_index=scope.$index">删除</el-button> <a :href="'auth/role_permission_index?roleId='+scope.row.permission" v-if="scope.row.permission>0">修改权限</a> </template> </el-table-column>

把上面这一大戳代码封装到组件里 除JS代码

没人回我

你妈鸡巴

Was this page helpful?
0 / 5 - 0 ratings