Explorar el Código

修改没有publish-time问题

lrf402788946 hace 5 años
padre
commit
3b0651e50d
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      src/layout/index/notice.vue

+ 5 - 2
src/layout/index/notice.vue

@@ -52,8 +52,11 @@ export default {
   methods: {},
   filters: {
     getDate(date) {
-      let arr = date.split('-');
-      return `${arr[1]}-${arr[2]}`;
+      if (date) {
+        let arr = date.split('-');
+        return `${arr[1]}-${arr[2]}`;
+      }
+      return '';
     },
   },
 };