使用operator button

This commit is contained in:
Captain.B 2020-05-09 15:44:33 +08:00
parent c1035e00ae
commit 7ad65837fb
2 changed files with 6 additions and 6 deletions

View File

@ -74,8 +74,7 @@
width="150" width="150"
:label="$t('commons.operating')"> :label="$t('commons.operating')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-button @click="handleEdit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/> <ms-table-operator @editClick="handleEdit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
<el-button @click="handleDelete(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -89,9 +88,10 @@
<script> <script>
import MsTablePagination from "../../common/pagination/TablePagination"; import MsTablePagination from "../../common/pagination/TablePagination";
import MsTableHeader from "../../common/components/MsTableHeader"; import MsTableHeader from "../../common/components/MsTableHeader";
import MsTableOperator from "../../common/components/MsTableOperator";
export default { export default {
components: {MsTableHeader, MsTablePagination}, components: {MsTableHeader, MsTablePagination, MsTableOperator},
data() { data() {
return { return {
result: {}, result: {},

View File

@ -78,8 +78,7 @@
width="150" width="150"
:label="$t('commons.operating')"> :label="$t('commons.operating')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-button @click="handleEdit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/> <ms-table-operator @editClick="handleEdit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
<el-button @click="handleDelete(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -92,9 +91,10 @@
<script> <script>
import MsTablePagination from "../../common/pagination/TablePagination"; import MsTablePagination from "../../common/pagination/TablePagination";
import MsTableOperator from "../../common/components/MsTableOperator";
export default { export default {
components: {MsTablePagination}, components: {MsTablePagination, MsTableOperator},
data() { data() {
return { return {
result: {}, result: {},