Browse Source

Merge remote-tracking branch 'origin/fix/master' into feature/1.8.0-uniapp

# Conflicts:
#	yudao-ui-admin/src/components/ImageUpload/index.vue
JeromeSoar 3 years ago
parent
commit
f7958dcf40

+ 1 - 1
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm

@@ -390,7 +390,7 @@ export default {
           this.exportLoading = true;
           return export${simpleClassName}Excel(params);
         }).then(response => {
-          this.$download.excel(response, '${table.classComment}.xls');
+          this.$download.excel(response, "${table.classComment}.xls");
           this.exportLoading = false;
         }).catch(() => {});
     }

+ 4 - 4
yudao-ui-admin/src/components/ImageUpload/index.vue

@@ -43,7 +43,7 @@
 </template>
 
 <script>
-import { getToken } from "@/utils/auth";
+import {getToken} from "@/utils/auth";
 
 export default {
   props: {
@@ -95,9 +95,9 @@ export default {
             if (typeof item === "string") {
               // 不带有 http 的路径, 才拼接 baseUrl.
               if (item.indexOf("http") === -1) {
-                item = { name: this.baseUrl + item, url: this.baseUrl + item };
+                item = {name: this.baseUrl + item, url: this.baseUrl + item};
               } else {
-                item = { name: item, url: item };
+                item = {name: item, url: item};
               }
             }
             return item;
@@ -128,7 +128,7 @@ export default {
     },
     // 上传成功回调
     handleUploadSuccess(res) {
-      this.uploadList.push({ name: res.data.fileName, url: res.data.fileUrl });
+      this.uploadList.push({name: res.data.fileName, url: res.data.fileUrl});
       if (this.uploadList.length === this.number) {
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];

+ 4 - 1
yudao-ui-admin/src/views/infra/swagger/index.vue

@@ -1,5 +1,8 @@
 <template>
-  <i-frame :src="url" />
+  <div>
+    <doc-alert title="接口文档" url="https://doc.iocoder.cn/api-doc/" />
+    <i-frame :src="url" />
+  </div>
 </template>
 <script>
 import iFrame from "@/components/iFrame/index";

+ 4 - 1
yudao-ui-admin/src/views/system/menu/index.vue

@@ -1,6 +1,8 @@
 <template>
   <div class="app-container">
     <doc-alert title="功能权限" url="https://doc.iocoder.cn/resource-permission" />
+    <doc-alert title="菜单路由" url="https://doc.iocoder.cn/vue2/route/" />
+    <!-- 搜索工作栏 -->
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
       <el-form-item label="菜单名称" prop="name">
         <el-input v-model="queryParams.name" placeholder="请输入菜单名称" clearable @keyup.enter.native="handleQuery"/>
@@ -187,6 +189,7 @@ import IconSelect from "@/components/IconSelect";
 
 import { SystemMenuTypeEnum, CommonStatusEnum } from '@/utils/constants'
 import { getDictDatas, DICT_TYPE } from '@/utils/dict'
+import {isExternal} from "@/utils/validate";
 
 export default {
   name: "Menu",
@@ -344,7 +347,7 @@ export default {
             || this.form.type === SystemMenuTypeEnum.MENU) {
             // 如果是外链,则不进行校验
             const path = this.form.path
-            if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
+            if (!isExternal(path)) {
               // 父权限为根节点,path 必须以 / 开头
               if (this.form.parentId === 0 && path.charAt(0) !== '/') {
                 this.$modal.msgSuccess('前端必须以 / 开头')