소스 검색

:zap: 逻辑优化

smallchill 6 년 전
부모
커밋
ecbadb5cce
4개의 변경된 파일13개의 추가작업 그리고 14개의 파일을 삭제
  1. 3 3
      src/components/iframe/main.vue
  2. 1 1
      src/const/user/info.js
  3. 8 9
      src/page/index/index.vue
  4. 1 1
      src/views/flow/follow.vue

+ 3 - 3
src/components/iframe/main.vue

@@ -61,12 +61,12 @@
       load() {
         this.show();
         var flag = true; //URL是否包含问号
-        if (this.$route.query.src.indexOf("?") == -1) {
+        if (this.$route.query.src !== undefined && this.$route.query.src.indexOf("?") === -1) {
           flag = false;
         }
         var list = [];
         for (var key in this.$route.query) {
-          if (key != "src" && key != "name" && key != "i18n") {
+          if (key !== "src" && key !== "name" && key !== "i18n") {
             list.push(`${key}= this.$route.query[key]`);
           }
         }
@@ -84,7 +84,7 @@
         let time = 3;
         const timeFunc = setInterval(() => {
           time--;
-          if (time == 0) {
+          if (time === 0) {
             this.hide();
             clearInterval(timeFunc);
           }

+ 1 - 1
src/const/user/info.js

@@ -13,7 +13,7 @@ export default {
           url: 'link',
         },
         canvasOption: {
-          text: 'bladex',
+          text: '',
           ratio: 0.1
         },
         action: '/api/blade-resource/oss/endpoint/put-file',

+ 8 - 9
src/page/index/index.vue

@@ -2,7 +2,7 @@
   <div class="avue-contail" :class="{'avue--collapse':isCollapse}">
     <div class="avue-header">
       <!-- 顶部导航栏 -->
-      <top ref="top" />
+      <top ref="top"/>
     </div>
     <div class="avue-layout">
       <div class="avue-left">
@@ -11,7 +11,7 @@
       </div>
       <div class="avue-main">
         <!-- 顶部标签卡 -->
-        <tags />
+        <tags/>
         <transition name="fade-scale">
           <search class="avue-view" v-show="isSearch"></search>
         </transition>
@@ -47,7 +47,7 @@
       sidebar
     },
     name: "index",
-    provide () {
+    provide() {
       return {
         index: this
       };
@@ -87,16 +87,15 @@
         });
       },
       //打开菜单
-      openMenu (item = {}) {
+      openMenu(item = {}) {
         this.$store.dispatch("GetMenu", item.id).then(data => {
           if (data.length !== 0) {
             this.$router.$avueRouter.formatRoutes(data, true);
           }
-          //当点击顶部菜单做的事件
-          if (!this.validatenull(item)) {
+          //当点击顶部菜单后默认打开第一个菜单
+          /*if (!this.validatenull(item)) {
             let itemActive = {},
               childItemActive = 0;
-            //vue-router路由
             if (item.path) {
               itemActive = item;
             } else {
@@ -109,11 +108,11 @@
             this.$store.commit('SET_MENU_ID', item);
             this.$router.push({
               path: this.$router.$avueRouter.getPath({
-                name: itemActive.label,
+                name: (itemActive.label || itemActive.name),
                 src: itemActive.path
               }, itemActive.meta)
             });
-          }
+          }*/
 
         });
       },

+ 1 - 1
src/views/flow/follow.vue

@@ -88,7 +88,7 @@
               search: true,
             },
             {
-              label: "流程实例id",
+              label: "实例id",
               prop: "processInstanceId",
               search: true,
               width: 320,