bug1、页面数据会缓存,点击不同列的数据 传值, 组件只会在第一次的时候进行 处理 :
解决 ,在组件上 加 :key=“new Date()” 时间戳
参考:
https://blog.csdn.net/weixin_43815091/article/details/123505634
<el-dialog :title="dialogTitle" :visible.sync="dialogTableVisible">
<Details:rows = "rows" :key="pasInt(new Date())"></Details>
</el-dialog>
关于使用 :element UI 的上传组件
<el-upload
class="uploadNone"
accept=".mp4" // 上传类型
:headers="headerObj" // 设置请求头
action="http://192.11811.1.181:8091/stationControl/graphResources/upload"
:show-file-list="false"
:on-success="SuccessVideoList"
:data="VideoData" // 上传携带参数
:before-upload="Videobefore"
>
请求头设置:
getHeaderObj() { // 获取上传接口的请求头
var mm = Math.random();
var six = "";
if (mm > 0.1) {
six = Math.round(mm * 1000000);
} else {
mm += 0.1;
six = Math.round(mm * 1000000);
}
var lsnm = six.toString();
var timestamp = new Date().valueOf().toString();
timestamp = lsnm + timestamp;
this.headerObj = {
'Authorization': localStorage.getItem('tokenHead')+" "+localStorage.getItem('token'),
'X-Requested-ID': timestamp,
}
},
参考:
https://blog.csdn.net/longtengg1/article/details/115585570