Commit a2afbd5c755ca8cd6b20a7766ad6857fe3f57771
1 parent
442a4b10
Exists in
master
and in
3 other branches
fix: 优化Scheme插槽
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
packages/scheme/index.vue
| @@ -66,11 +66,12 @@ | @@ -66,11 +66,12 @@ | ||
| 66 | <slot slot="column-end" name="column-end" v-bind="_slotScope"></slot> | 66 | <slot slot="column-end" name="column-end" v-bind="_slotScope"></slot> |
| 67 | <el-table-column v-if="operation" prop="$operation" label="操作" v-bind="{ width: 100, fixed: 'right', ...operationProps }"> | 67 | <el-table-column v-if="operation" prop="$operation" label="操作" v-bind="{ width: 100, fixed: 'right', ...operationProps }"> |
| 68 | <div class="zee-scheme__table-operation" slot-scope="slotScope"> | 68 | <div class="zee-scheme__table-operation" slot-scope="slotScope"> |
| 69 | + <slot name="operation-button" v-bind="{ ..._slotScope, slotScope }"></slot> | ||
| 69 | <el-button type="text" icon="el-icon-edit" title="编辑" @click="openEdit(slotScope.row)"></el-button> | 70 | <el-button type="text" icon="el-icon-edit" title="编辑" @click="openEdit(slotScope.row)"></el-button> |
| 70 | <el-popconfirm confirmButtonText="确定" cancelButtonText="取消" title="确定删除吗?" placement="top" @onConfirm="handleDelete([slotScope.row])"> | 71 | <el-popconfirm confirmButtonText="确定" cancelButtonText="取消" title="确定删除吗?" placement="top" @onConfirm="handleDelete([slotScope.row])"> |
| 71 | <el-button slot="reference" type="text" icon="el-icon-delete" title="删除"></el-button> | 72 | <el-button slot="reference" type="text" icon="el-icon-delete" title="删除"></el-button> |
| 72 | </el-popconfirm> | 73 | </el-popconfirm> |
| 73 | - <slot name="operation-button" v-bind="{ ..._slotScope, slotScope }"></slot> | 74 | + <slot name="operation-button-append" v-bind="{ ..._slotScope, slotScope }"></slot> |
| 74 | </div> | 75 | </div> |
| 75 | </el-table-column> | 76 | </el-table-column> |
| 76 | </template> | 77 | </template> |
| @@ -342,9 +343,12 @@ export default { | @@ -342,9 +343,12 @@ export default { | ||
| 342 | closeDialog: this.closeDialog, | 343 | closeDialog: this.closeDialog, |
| 343 | openView: this.openView, | 344 | openView: this.openView, |
| 344 | openEdit: this.openEdit, | 345 | openEdit: this.openEdit, |
| 346 | + openNew: this.openNew, | ||
| 345 | handleDelete: this.handleDelete, | 347 | handleDelete: this.handleDelete, |
| 348 | + handleDeleteMul: this.handleDeleteMul, | ||
| 346 | size: this.size, | 349 | size: this.size, |
| 347 | dialogType: this.dialogType, | 350 | dialogType: this.dialogType, |
| 351 | + selection: this.selection, | ||
| 348 | }; | 352 | }; |
| 349 | }, | 353 | }, |
| 350 | _alias() { | 354 | _alias() { |