Vue局部刷新下的表格数据
index.vue大概内容如下,请问如下在 handleHttpRequest 方法的问号地方写啥
<script setup>
import md5 from "../lib/md5";
import { taskInfo, initTask, preSignUrl, merge, pageUrl,copyBaseUrl,updateIsSucFlag,httpExtra} from '../lib/api';
import {ElNotification} from "element-plus"
import Queue from 'promise-queue-plus'
import axios from 'axios'
import { ref } from 'vue'
const handleHttpRequest = async (options) => {
const file = options.file
const task = await getTaskInfo(file)
if (task) {
const { finished, path, taskRecord } = task
const { fileIdentifier: identifier } = taskRecord
if (finished) {
return path
} else {
const { code, data, msg } = await merge(identifier)
if (code === 200000) {
// 在这里 ,刷新</template>下的<el-table>表格数据
//?????这里应该怎么写???局部<el-table>表格数据刷新,不要location.reload()
}
}
} else {
ElNotification.error({
title: '文件上传错误',
message: '获取上传任务失败'
})
}
}
</script>
<template>
<el-table
:data="tableData"
highlight-current-row
border
style="width: 100%">
</el-table>
</template>
<script>
export default {
data() {
return {
tableData: [],
error: ''
}
},
methods: {
...
},
beforeCreate() {
this.axios = axios;
},
created() {
..
},
}
</script>