Parcourir la source

实现新接口文档不显示footer,默认不显示。
model参数是枚举的能正常显示详细描述。
model修改默认展开所有为展开第一级。
优化model名过长的问题。
优化json编辑器显示最大高度为500。

zhontai il y a 2 ans
Parent
commit
d4e12704fd
47 fichiers modifiés avec 186 ajouts et 59 suppressions
  1. 1 1
      src/platform/ZhonTai.ApiUI/src/dist/index.html
  2. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/app.723af817.css
  3. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/app.723af817.css.gz
  4. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/app.86bfabc7.css.gz
  5. 1 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/chunk-05a85274.7eb4e04b.css
  6. 0 1
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/chunk-d0b94ae8.27b3c0a9.css
  7. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.6527477b.js
  8. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.6527477b.js.gz
  9. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.a8106010.js
  10. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.a8106010.js.gz
  11. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-05a85274.38639815.js
  12. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-05a85274.38639815.js.gz
  13. 1 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0af44e.253e38c5.js
  14. 0 1
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0af44e.faa1efb9.js
  15. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0bd799.5f382a56.js
  16. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0d0b98.aa691f1e.js
  17. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0da532.691f8fe5.js
  18. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d22269d.efda169e.js
  19. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-589faee0.e4761e71.js
  20. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-589faee0.e4761e71.js.gz
  21. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.2f71526f.js
  22. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.2f71526f.js.gz
  23. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.6b7f30f0.js
  24. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.6b7f30f0.js.gz
  25. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-adb9e944.5a9e3009.js
  26. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-adb9e944.5a9e3009.js.gz
  27. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-cc2402ee.7bab1230.js
  28. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-cc2402ee.7bab1230.js.gz
  29. 0 0
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-d0b94ae8.56770258.js
  30. BIN
      src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-d0b94ae8.56770258.js.gz
  31. 0 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/package-lock.json
  32. 2 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/package.json
  33. 25 21
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/components/GlobalFooter/index.vue
  34. 13 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/components/GlobalHeaderTab/index.vue
  35. 5 0
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/style/knife4j.less
  36. 4 2
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/Document.vue
  37. 24 17
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/EditorDebugShow.vue
  38. 8 2
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/EditorShow.vue
  39. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/index.vue
  40. 12 3
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/index/Main.vue
  41. 13 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/othermarkdown/index.vue
  42. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/Authorize.vue
  43. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/GlobalParameters.vue
  44. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/OfficelineDocument.vue
  45. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/Settings.vue
  46. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/SwaggerModels.vue
  47. 11 1
      src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/gen-api.vue

+ 1 - 1
src/platform/ZhonTai.ApiUI/src/dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title></title><link href="knife4jui/css/chunk-d0b94ae8.27b3c0a9.css" rel="prefetch"><link href="knife4jui/js/chunk-0fd67716.dedd1f18.js" rel="prefetch"><link href="knife4jui/js/chunk-214218f0.1477d149.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0af44e.faa1efb9.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0bd799.b4076b36.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0d0b98.ad1a7b71.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0da532.45fce129.js" rel="prefetch"><link href="knife4jui/js/chunk-2d22269d.b1298cee.js" rel="prefetch"><link href="knife4jui/js/chunk-3b888a65.74410f20.js" rel="prefetch"><link href="knife4jui/js/chunk-589faee0.11cc8dee.js" rel="prefetch"><link href="knife4jui/js/chunk-735c675c.6b7f30f0.js" rel="prefetch"><link href="knife4jui/js/chunk-adb9e944.7e3b5ee2.js" rel="prefetch"><link href="knife4jui/js/chunk-cc2402ee.250d2f44.js" rel="prefetch"><link href="knife4jui/js/chunk-d0b94ae8.56770258.js" rel="prefetch"><link href="knife4jui/css/app.86bfabc7.css" rel="preload" as="style"><link href="knife4jui/css/chunk-vendors.f24a310a.css" rel="preload" as="style"><link href="knife4jui/js/app.6527477b.js" rel="preload" as="script"><link href="knife4jui/js/chunk-vendors.692a1ca5.js" rel="preload" as="script"><link href="knife4jui/css/chunk-vendors.f24a310a.css" rel="stylesheet"><link href="knife4jui/css/app.86bfabc7.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but knife4j-vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="knife4jui/js/chunk-vendors.692a1ca5.js"></script><script src="knife4jui/js/app.6527477b.js"></script></body></html>
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title></title><link href="knife4jui/css/chunk-05a85274.7eb4e04b.css" rel="prefetch"><link href="knife4jui/js/chunk-05a85274.38639815.js" rel="prefetch"><link href="knife4jui/js/chunk-0fd67716.dedd1f18.js" rel="prefetch"><link href="knife4jui/js/chunk-214218f0.1477d149.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0af44e.253e38c5.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0bd799.5f382a56.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0d0b98.aa691f1e.js" rel="prefetch"><link href="knife4jui/js/chunk-2d0da532.691f8fe5.js" rel="prefetch"><link href="knife4jui/js/chunk-2d22269d.efda169e.js" rel="prefetch"><link href="knife4jui/js/chunk-3b888a65.74410f20.js" rel="prefetch"><link href="knife4jui/js/chunk-589faee0.e4761e71.js" rel="prefetch"><link href="knife4jui/js/chunk-735c675c.2f71526f.js" rel="prefetch"><link href="knife4jui/js/chunk-adb9e944.5a9e3009.js" rel="prefetch"><link href="knife4jui/js/chunk-cc2402ee.7bab1230.js" rel="prefetch"><link href="knife4jui/css/app.723af817.css" rel="preload" as="style"><link href="knife4jui/css/chunk-vendors.f24a310a.css" rel="preload" as="style"><link href="knife4jui/js/app.a8106010.js" rel="preload" as="script"><link href="knife4jui/js/chunk-vendors.692a1ca5.js" rel="preload" as="script"><link href="knife4jui/css/chunk-vendors.f24a310a.css" rel="stylesheet"><link href="knife4jui/css/app.723af817.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but knife4j-vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="knife4jui/js/chunk-vendors.692a1ca5.js"></script><script src="knife4jui/js/app.a8106010.js"></script></body></html>

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/app.723af817.css


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/app.723af817.css.gz


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/app.86bfabc7.css.gz


+ 1 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/chunk-05a85274.7eb4e04b.css

@@ -0,0 +1 @@
+.api-tab[data-v-518643e4]{margin-top:15px}.api-tab .ant-tag[data-v-518643e4]{height:32px;line-height:32px}.api-basic[data-v-518643e4]{padding:11px}.api-basic-title[data-v-518643e4]{font-size:14px;font-weight:700}.api-basic-body[data-v-518643e4]{font-size:14px;font-family:-webkit-body}.api-description[data-v-518643e4]{border-left:4px solid #ddd;line-height:30px}.api-body-desc[data-v-518643e4]{padding:10px;min-height:35px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #e8e8e8}.ant-card-body[data-v-518643e4]{padding:5px}.api-title[data-v-518643e4]{margin-top:10px;margin-bottom:5px;font-size:16px;font-weight:600;height:30px;line-height:30px;border-left:4px solid #00ab6d;text-indent:8px}.content-line[data-v-518643e4]{height:25px;line-height:25px}.content-line-count[data-v-518643e4]{height:35px;line-height:35px}.divider[data-v-518643e4]{margin:4px 0}

+ 0 - 1
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/css/chunk-d0b94ae8.27b3c0a9.css

@@ -1 +0,0 @@
-.api-tab[data-v-ada3ccd6]{margin-top:15px}.api-tab .ant-tag[data-v-ada3ccd6]{height:32px;line-height:32px}.api-basic[data-v-ada3ccd6]{padding:11px}.api-basic-title[data-v-ada3ccd6]{font-size:14px;font-weight:700}.api-basic-body[data-v-ada3ccd6]{font-size:14px;font-family:-webkit-body}.api-description[data-v-ada3ccd6]{border-left:4px solid #ddd;line-height:30px}.api-body-desc[data-v-ada3ccd6]{padding:10px;min-height:35px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #e8e8e8}.ant-card-body[data-v-ada3ccd6]{padding:5px}.api-title[data-v-ada3ccd6]{margin-top:10px;margin-bottom:5px;font-size:16px;font-weight:600;height:30px;line-height:30px;border-left:4px solid #00ab6d;text-indent:8px}.content-line[data-v-ada3ccd6]{height:25px;line-height:25px}.content-line-count[data-v-ada3ccd6]{height:35px;line-height:35px}.divider[data-v-ada3ccd6]{margin:4px 0}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.6527477b.js


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.6527477b.js.gz


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.a8106010.js


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/app.a8106010.js.gz


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-05a85274.38639815.js


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-05a85274.38639815.js.gz


+ 1 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0af44e.253e38c5.js

@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0af44e"],{"0e36":function(e,t,i){"use strict";i.r(t);var n={name:"EditorShow",components:{editor:i("7c9e")},props:{value:{type:String,required:!0,default:""},xmlMode:{type:Boolean,default:!1,required:!1}},data:function(){return{lang:"json",editor:null,editorHeight:200}},methods:{change:function(e){this.$emit("change",e)},resetEditorHeight:function(){var e=this;setTimeout((function(){var t=e.editor.session.getLength();1==t&&(t=10);var i=16*t;e.editorHeight=i>500?500:i}),300)},editorInit:function(e){var t=this;this.editor=e,i("2099"),i("818b"),i("0696"),this.xmlMode&&(this.lang="xml"),i("1d29"),this.resetEditorHeight(),this.editor.renderer.on("afterRender",(function(){t.$emit("showDescription","123")}))}}},o=i("2877"),r=Object(o.a)(n,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("editor",{ref:"editor",attrs:{value:e.value,lang:e.lang,theme:"eclipse",width:"100%",height:e.editorHeight,options:{"expand-depth":1}},on:{init:e.editorInit,input:e.change}})],1)}),[],!1,null,null,null);t.default=r.exports}}]);

+ 0 - 1
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0af44e.faa1efb9.js

@@ -1 +0,0 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0af44e"],{"0e36":function(e,t,i){"use strict";i.r(t);var n={name:"EditorShow",components:{editor:i("7c9e")},props:{value:{type:String,required:!0,default:""},xmlMode:{type:Boolean,default:!1,required:!1}},data:function(){return{lang:"json",editor:null,editorHeight:200}},methods:{change:function(e){this.$emit("change",e)},resetEditorHeight:function(){var e=this;setTimeout((function(){var t=e.editor.session.getLength();1==t&&(t=10);var i=16*t;e.editorHeight=i}),300)},editorInit:function(e){var t=this;this.editor=e,i("2099"),i("818b"),i("0696"),this.xmlMode&&(this.lang="xml"),i("1d29"),this.resetEditorHeight(),this.editor.renderer.on("afterRender",(function(){t.$emit("showDescription","123")}))}}},o=i("2877"),r=Object(o.a)(n,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("editor",{attrs:{value:e.value,lang:e.lang,theme:"eclipse",width:"100%",height:e.editorHeight},on:{init:e.editorInit,input:e.change}})],1)}),[],!1,null,null,null);t.default=r.exports}}]);

+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0bd799.b4076b36.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0bd799.5f382a56.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0d0b98.ad1a7b71.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0d0b98.aa691f1e.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0da532.45fce129.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d0da532.691f8fe5.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d22269d.b1298cee.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-2d22269d.efda169e.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-589faee0.11cc8dee.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-589faee0.e4761e71.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-589faee0.11cc8dee.js.gz → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-589faee0.e4761e71.js.gz


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.2f71526f.js


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.2f71526f.js.gz


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.6b7f30f0.js


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-735c675c.6b7f30f0.js.gz


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-adb9e944.7e3b5ee2.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-adb9e944.5a9e3009.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-adb9e944.7e3b5ee2.js.gz → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-adb9e944.5a9e3009.js.gz


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-cc2402ee.250d2f44.js → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-cc2402ee.7bab1230.js


+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-cc2402ee.250d2f44.js.gz → src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-cc2402ee.7bab1230.js.gz


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-d0b94ae8.56770258.js


BIN
src/platform/ZhonTai.ApiUI/src/dist/knife4jui/js/chunk-d0b94ae8.56770258.js.gz


+ 0 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/package-lock.json

@@ -5,7 +5,6 @@
   "requires": true,
   "packages": {
     "": {
-      "name": "knife4j-vue",
       "version": "0.1.0",
       "dependencies": {
         "ant-design-vue": "^1.6.5",

+ 2 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/package.json

@@ -5,7 +5,8 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
-    "lint": "vue-cli-service lint"
+    "lint": "vue-cli-service lint",
+    "install:pkg": "npm install --registry https://registry.npm.taobao.org"
   },
   "dependencies": {
     "ant-design-vue": "^1.6.5",

+ 25 - 21
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/components/GlobalFooter/index.vue

@@ -1,47 +1,51 @@
 <template>
-  <div class="globalFooter">
+  <div v-if="copyright" class="globalFooter">
     <a-row v-if="settings.enableFooter">
       <div class="copyright" v-html="copyright"></div>
     </a-row>
     <a-row v-else>
-      <Markdown v-if="settings.enableFooterCustom" :source="settings.footerCustomContent" />
+      <Markdown
+        v-if="settings.enableFooterCustom"
+        :source="settings.footerCustomContent"
+      />
     </a-row>
   </div>
 </template>
 <script>
 export default {
-  name: "GlobalFooter",
+  name: 'GlobalFooter',
   props: {
     links: {
       type: Array,
       default: () => {
-        [];
-      }
-    }
+        ;[]
+      },
+    },
   },
   components: {
-    "Markdown":()=>import('@/components/Markdown')
+    Markdown: () => import('@/components/Markdown'),
   },
-  computed:{
-    settings(){
-      return this.$store.state.globals.settings;
+  computed: {
+    settings() {
+      return this.$store.state.globals.settings
     },
-    copyright(){
-      const servers = this.$store.state.globals.swaggerCurrentInstance?.swaggerData?.servers
-      if(servers && servers.length > 0){
-        return this.$store.state.globals.swaggerCurrentInstance.swaggerData.servers[0].extensions?.copyright
-      }else{
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
         return ''
       }
-    }
+    },
   },
   data() {
-    return {};
-  }
-};
+    return {}
+  },
+}
 </script>
 
 <style lang="less" scoped>
-@import "./index.less";
+@import './index.less';
 </style>
-

+ 13 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/components/GlobalHeaderTab/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-tabs :value="activeKey" type="editable-card" class="knife4j-tab">
       <a-tab-pane v-for="pane in panes" :tab="pane.title" :key="pane.key" :closable="pane.closable">
         <component :is="pane.content"></component>
@@ -19,6 +19,18 @@ export default {
       type: String
     }
   },
+  computed:{
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
+    },
+  },
   data() {
     return {};
   },

+ 5 - 0
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/style/knife4j.less

@@ -301,6 +301,11 @@
   min-height: 400px;
 }
 
+.knife4j-body-content--no-fotter {
+  height: calc(100vh - 109px);
+  padding-bottom: 20px;
+}
+
 /*
 * 内容页滚动条
 */

+ 4 - 2
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/Document.vue

@@ -59,7 +59,7 @@
     <div class="api-title" v-html="$t('doc.params')">
       请求参数
     </div>
-    <a-table :defaultExpandAllRows="expanRows" :columns="columns" :dataSource="reqParameters" rowKey="id" size="small" :pagination="page">
+    <a-table :defaultExpandAllRows="expanRows" :defaultExpandedRowKeys="reqParameters && reqParameters.length > 0 ? [reqParameters[0].id]:[]" :columns="columns" :dataSource="reqParameters" rowKey="id" size="small" :pagination="page">
       <template slot="descriptionValueTemplate" slot-scope="text,record">
         <span v-html="text"></span>
         <span v-if="record.example">,示例值({{record.example}})</span>
@@ -192,7 +192,7 @@ export default {
       responseHeaderColumns: [],
       responseStatuscolumns: [],
       responseParametersColumns: [],
-      expanRows: true,
+      expanRows: false,
       //接收一个响应信息对象,遍历得到树形结构的值
       multipCode: false,
       multipCodeDatas: [],
@@ -333,6 +333,7 @@ export default {
       childrens.map(child => {
         if(child.schema){
           var paramSchema = that.swaggerInstance.swaggerData.components.schemas[child.schemaValue]
+          child.description=paramSchema.description
           if(paramSchema && paramSchema.extensions && paramSchema.extensions.description){
             child.description = child.description + paramSchema.extensions.description
           }
@@ -496,6 +497,7 @@ export default {
                         //处理枚举描述
                         if(newObj.schema){
                           var paramSchema = that.swaggerInstance.swaggerData.components.schemas[newObj.schemaValue]
+                          newObj.description=paramSchema.description
                           if(paramSchema && paramSchema.extensions && paramSchema.extensions.description){
                             newObj.description = newObj.description + paramSchema.extensions.description
                           }

+ 24 - 17
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/EditorDebugShow.vue

@@ -50,27 +50,34 @@ export default {
       var that = this;
       //重设高度
       setTimeout(() => {
+        // var length_editor = that.editor.session.getLength();
+        // if (length_editor == 1) {
+        //   length_editor = 15;
+        // }
+        // if (length_editor < 15) {
+        //   if (that.debugResponse) {
+        //     length_editor = 30;
+        //   } else {
+        //     length_editor = 15;
+        //   }
+        // }
+        // if (length_editor > 20) {
+        //   if (!that.debugResponse) {
+        //     length_editor = 20;
+        //   }
+        // }
+        // var rows_editor = length_editor * 16;
+        // if(rows_editor>2000){
+        //   rows_editor=2000;
+        // }
+        // //console.log(rows_editor)
+        // that.editorHeight = rows_editor;
+
         var length_editor = that.editor.session.getLength();
         if (length_editor == 1) {
-          length_editor = 15;
-        }
-        if (length_editor < 15) {
-          if (that.debugResponse) {
-            length_editor = 30;
-          } else {
-            length_editor = 15;
-          }
-        }
-        if (length_editor > 20) {
-          if (!that.debugResponse) {
-            length_editor = 20;
-          }
+          length_editor = 10;
         }
         var rows_editor = length_editor * 16;
-        if(rows_editor>2000){
-          rows_editor=2000;
-        }
-        //console.log(rows_editor)
         that.editorHeight = rows_editor;
       }, 10);
     },

+ 8 - 2
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/EditorShow.vue

@@ -1,13 +1,15 @@
 <template>
   <div>
     <editor
+    ref="editor"
       :value="value"
       @init="editorInit"
       :lang="lang"
       theme="eclipse"
       width="100%"
       :height="editorHeight"
-      @input="change" 
+      :options="{'expand-depth':1}"
+      @input="change"
     ></editor>
   </div>
 </template>
@@ -48,7 +50,7 @@ export default {
           length_editor = 10;
         }
         var rows_editor = length_editor * 16;
-        that.editorHeight = rows_editor;
+        that.editorHeight = rows_editor > 500 ? 500:rows_editor;
       }, 300);
     },
     editorInit(editor) {
@@ -66,6 +68,10 @@ export default {
       this.editor.renderer.on("afterRender", function() {
         that.$emit("showDescription","123")
       });
+
+      // this.editor.session.on('changeFold',function () {
+      //   that.resetEditorHeight();
+      // });
     }
   }
 };

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/api/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-row v-if="debugSupport">
       <a-tabs defaultActiveKey="doc" tabPosition="left" class="api-tab">
         <a-tab-pane key="doc">
@@ -56,6 +56,16 @@ export default {
     },
     settings(){
       return this.$store.state.globals.settings;
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   mounted() {},

+ 12 - 3
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/index/Main.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-row  class="markdown-body editormd-preview-container" v-if="this.settings.enableHomeCustom">
       <Markdown :source="settings.homeCustomLocation"/>
     </a-row>
@@ -116,8 +116,17 @@ export default {
     },
     settings(){
       return this.$store.state.globals.settings;
-    }
-
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
+    },
   },
   data() {
     return {

+ 13 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/othermarkdown/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-row class="markdown-body editormd-preview-container">
       <Markdown :source="content" />
     </a-row>
@@ -22,6 +22,18 @@ export default {
       content: ""
     };
   },
+  computed:{
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
+    }
+  },
   created() {
     //获取当前地址的id
     var that = this;

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/Authorize.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <div class="authorize">
       <a-row>
         <a-button type="primary" @click="resetAuth" v-html="$t('auth.cancel')">注销</a-button>
@@ -65,6 +65,16 @@ export default {
   computed:{
     language(){
        return this.$store.state.globals.language;
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   watch:{

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/GlobalParameters.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-row class="globalparameters">
       <a-row class="gptips" v-html="$t('global.note')">
         Knife4j
@@ -94,6 +94,16 @@ export default {
   computed:{
     language(){
        return this.$store.state.globals.language;
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   watch:{

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/OfficelineDocument.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-row class="markdown-row">
       <a-row class="globalparameters">
         <a-row class="gptips" v-html="$t('offline.des')">
@@ -106,6 +106,16 @@ export default {
     },
     swaggerCurrentInstance(){
       return this.$store.state.globals.swaggerCurrentInstance;
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   methods: {

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/Settings.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a-row class="settingConfig">
       <a-row class="gptips" v-html="$t('message.settingTip')">
         启用个性化配置后,接口Tab标签需关闭后重新打开或者刷新当前页面
@@ -100,6 +100,16 @@ export default {
       return this.$store.state.globals.swaggerCurrentInstance;
     },language(){
        return this.$store.state.globals.language;
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   data() {

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/SwaggerModels.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <div class="swaggermododel">
       <a-collapse @change="modelChange">
         <a-collapse-panel
@@ -42,6 +42,16 @@ export default {
     }, 
     swagger(){
        return this.$store.state.globals.swagger;
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   watch:{

+ 11 - 1
src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/views/settings/gen-api.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-layout-content class="knife4j-body-content">
+  <a-layout-content :class="['knife4j-body-content', copyright?'':'knife4j-body-content--no-fotter']">
     <a v-for="(api, index) in apis" :key="index" @click="downloadApi(api)">{{api.description||api.name}}</a>
   </a-layout-content>
 </template>
@@ -16,6 +16,16 @@ export default {
   computed:{
     apis(){
       return this.data.instance.tags
+    },
+    copyright() {
+      const servers = this.$store.state.globals.swaggerCurrentInstance
+        ?.swaggerData?.servers
+      if (servers && servers.length > 0) {
+        return this.$store.state.globals.swaggerCurrentInstance.swaggerData
+          .servers[0].extensions?.copyright
+      } else {
+        return ''
+      }
     }
   },
   data() {

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff