Commit 848fa8a62d8b685eb23abe2ff865e904a37ed39c

Authored by Aaron
1 parent 61514044
Exists in master and in 1 other branch legacy

修复表格按钮插槽传值

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
packages/scheme/index.vue
... ... @@ -104,15 +104,15 @@
104 104 <el-table-column v-else slot="$end" prop="$operation" :label="i18n('eagle.scheme.operation') || '操作'" min-width="140" fixed="right">
105 105 <div class="eagle-scheme__table-operation" slot-scope="slotScope">
106 106 <!-- 表格操作栏插槽 - 前置插槽 -->
107   - <slot v-if="$scopedSlots['table-operation-btn'] || $slots['table-operation-btn']" name="table-operation-btn"></slot>
  107 + <slot v-if="$scopedSlots['table-operation-btn'] || $slots['table-operation-btn']" name="table-operation-btn" :slotScope="slotScope" :handleNew="handleNew" :handleEdit="handleEdit" :handleDelete="handleDelete" :handleView="handleView"></slot>
108 108 <el-button v-if="option.showViewBtn !== false" class="eagle-scheme__table-btn" type="text" icon="el-icon-view" :title="i18n('eagle.scheme.detail') || '详情'" @click="handleView(slotScope)"></el-button>
109   - <slot v-if="$scopedSlots['table-operation-btn-edit'] || $slots['table-operation-btn-edit']" name="table-operation-btn-edit" :handleEdit="handleEdit"></slot>
  109 + <slot v-if="$scopedSlots['table-operation-btn-edit'] || $slots['table-operation-btn-edit']" name="table-operation-btn-edit" :slotScope="slotScope" :handleNew="handleNew" :handleEdit="handleEdit" :handleDelete="handleDelete" :handleView="handleView"></slot>
110 110 <el-button v-else-if="option.showEditBtn !== false" class="eagle-scheme__table-btn" type="text" icon="el-icon-edit" :title="i18n('eagle.scheme.edit') || '编辑'" @click="handleEdit(slotScope)"></el-button>
111 111 <eagle-confirm v-if="option.showDeleteBtn !== false" class="eagle-scheme__table-btn" :title="i18n('eagle.scheme.deleteConfirm') || '是否删除?'" @confirm="handleDelete('one', slotScope)">
112 112 <el-button type="text" icon="el-icon-delete" :title="i18n('eagle.scheme.delete') || '删除'"></el-button>
113 113 </eagle-confirm>
114 114 <!-- 表格操作栏插槽 - 后置插槽 -->
115   - <slot v-if="$scopedSlots['table-operation-btn-append'] || $slots['table-operation-btn-append']" name="table-operation-btn-append"></slot>
  115 + <slot v-if="$scopedSlots['table-operation-btn-append'] || $slots['table-operation-btn-append']" name="table-operation-btn-append" :slotScope="slotScope" :handleNew="handleNew" :handleEdit="handleEdit" :handleDelete="handleDelete" :handleView="handleView"></slot>
116 116 </div>
117 117 </el-table-column>
118 118 </eagle-table>
... ...