no message

This commit is contained in:
小陌 2023-09-11 23:02:31 +08:00
parent f636670bf6
commit 0f8ec8e0af
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,6 @@
<el-table v-bind="$attrs" :data="tableData" :row-key="rowKey" :key="toggleIndex" ref="xTable" :height="height=='auto'?null:'100%'" :size="config.size" :border="config.border" :stripe="config.stripe" :summary-method="remoteSummary?remoteSummaryMethod:summaryMethod" @sort-change="sortChange" @filter-change="filterChange">
<slot></slot>
<template v-for="(item, index) in column" :key="index">
<el-table-column :align="item.align || 'left'" :label="item.label" v-if="item.column && item.column.length>0">
<el-table-column v-for="(items, indexs) in item.column" :key="indexs" :align="items.align || 'left'" :column-key="items.prop||items.name" :label="items.label" :prop="items.prop||items.name" :width="items.width || 'auto'" :min-width="items.minWidth || 'auto'" :sortable="items.sortable" :fixed="items.fixed" :filters="items.filters" :filter-method="remoteFilter||!items.filters?null:filterHandler" :show-overflow-tooltip="items.showOverflowTooltip">
<template #default="scope">
@ -12,7 +11,6 @@
</template>
</el-table-column>
</el-table-column>
<el-table-column v-else-if="!item.hide && (item.name || item.prop)" :align="item.align || 'left'" :column-key="item.prop||item.name" :label="item.label" :prop="item.prop||item.name" :width="item.width || 'auto'" :min-width="item.minWidth || 'auto'" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="remoteFilter||!item.filters?null:filterHandler" :show-overflow-tooltip="item.showOverflowTooltip">
<template #default="scope">
<columnItem :row="scope.row" :item="item" @xtableupdate="xtableupdate"> </columnItem>

View File

@ -212,7 +212,9 @@
},
//
async operationDelete(row, index){
var res = await this.$http.post(this.operation.delete.url, {[this.key]: row[this.key], index: index})
const key = typeof this.operation.delete.key !== 'undefined' && this.operation.delete.key ?this.operation.delete.key:this.key;
var res = await this.$http.post(this.operation.delete.url, {[key]: row[key], index: index})
if (res.code == 200 ) {
this.$refs.table.tableData.splice(index, 1);
return;