Explorar o código

Update Index.vue

star7th %!s(int64=6) %!d(string=hai) anos
pai
achega
a019dad98d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      web_src/src/components/page/edit/Index.vue

+ 4 - 1
web_src/src/components/page/edit/Index.vue

@@ -266,13 +266,16 @@ export default {
       page_id:'',
       page_id:'',
       copy_page_id:'',
       copy_page_id:'',
       attachment_count:'',
       attachment_count:'',
-
+      catalogs:[]
     };
     };
   },
   },
   computed: {
   computed: {
 
 
     //新建/编辑页面时供用户选择的归属目录列表
     //新建/编辑页面时供用户选择的归属目录列表
     belong_to_catalogs:function(){
     belong_to_catalogs:function(){
+        if (!this.catalogs || this.catalogs.length <=0 ) {
+          return [];
+        };
         var Info = this.catalogs.slice(0);
         var Info = this.catalogs.slice(0);
         var cat_array = [] ;
         var cat_array = [] ;
         for (var i = 0; i < Info.length; i++) {
         for (var i = 0; i < Info.length; i++) {