|
@@ -198,8 +198,9 @@
|
|
|
};
|
|
|
const handleClear = (id) => {
|
|
|
const data = getDataSource();
|
|
|
- if (id) {
|
|
|
- setTableData(data.filter((item: any) => item.id !== id));
|
|
|
+ if (id !== null) {
|
|
|
+ data.splice(id, 1);
|
|
|
+ setTableData(data); //.filter((item: any) => item.id !== id)
|
|
|
} else {
|
|
|
setTableData(data.filter((item: any) => !selectRow.value.includes(item.id)));
|
|
|
}
|
|
@@ -322,8 +323,8 @@
|
|
|
@change="handleChangePrice(record)"
|
|
|
/>
|
|
|
</template>
|
|
|
- <template #action="{ record }">
|
|
|
- <a-button type="link" @click="handleClear(record.id)">移出</a-button>
|
|
|
+ <template #action="{ record, index }">
|
|
|
+ <a-button type="link" @click="handleClear(index)">移出</a-button>
|
|
|
<a-button type="link" @click="handleViewHistory(record.textbookId)">
|
|
|
历史征订
|
|
|
</a-button>
|