|
@@ -601,17 +601,21 @@ export default {
|
|
|
}
|
|
|
this.searchTarget();
|
|
|
},
|
|
|
- onUnmounted() {
|
|
|
-
|
|
|
- clearInterval(this.timeFlag)
|
|
|
+
|
|
|
+ destroyed() {
|
|
|
+ clearInterval(this.timeFlag);
|
|
|
},
|
|
|
methods: {
|
|
|
fileNameFormatter(val) {
|
|
|
- let nameTmp = val.filePath;
|
|
|
- //开始截取字符串
|
|
|
- let lastIndex = nameTmp.lastIndexOf("/");
|
|
|
- // console.log(nameTmp.slice(lastIndex+1, 0));
|
|
|
- return nameTmp.slice(lastIndex + 1, nameTmp.length);
|
|
|
+ if (val.filePath == null) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ let nameTmp = val.filePath;
|
|
|
+ //开始截取字符串
|
|
|
+ let lastIndex = nameTmp.lastIndexOf("/");
|
|
|
+ // console.log(nameTmp.slice(lastIndex+1, 0));
|
|
|
+ return nameTmp.slice(lastIndex + 1, nameTmp.length);
|
|
|
+ }
|
|
|
},
|
|
|
closeResetFun() {
|
|
|
//关闭
|