From 7cc2041cfa2cc8c29ff634d0803b74c62feb8e7d Mon Sep 17 00:00:00 2001 From: muyao <3202302816@qq.com> Date: Tue, 31 Dec 2024 20:10:09 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=85=95=E7=91=B6]=20=E5=A4=A7=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E5=89=8D=E7=AB=AF=E6=80=A7=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=88=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=92=8C=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/styles/index.scss | 13 +- front/src/utils/global.js | 2 +- front/src/views/doc/EditDocStandard/index.vue | 328 +++++++++--------- front/src/views/doc/EditTable/index.vue | 213 ++++++++---- front/src/views/doc/EditTable/input.vue | 52 +++ front/src/views/doc/EditTable/select.vue | 66 ++++ front/src/views/doc/EditTable/switch.vue | 51 +++ front/src/views/doc/RootArrayTable/index.vue | 185 +++++++--- 8 files changed, 634 insertions(+), 276 deletions(-) create mode 100644 front/src/views/doc/EditTable/input.vue create mode 100644 front/src/views/doc/EditTable/select.vue create mode 100644 front/src/views/doc/EditTable/switch.vue diff --git a/front/src/styles/index.scss b/front/src/styles/index.scss index b5041328..3aebfe2b 100644 --- a/front/src/styles/index.scss +++ b/front/src/styles/index.scss @@ -194,7 +194,18 @@ fieldset {border: 1px solid #DCDFE6;padding: 20px;} margin-bottom: 2px; } } - +.param-table1 { + .el-form { + width: 100%; + display: inline-block; + .el-form-item { + margin-bottom: 0; + } + } + .el-switch { + margin-bottom: 2px; + } +} .navbar .right-menu { float: right; height: 100%; diff --git a/front/src/utils/global.js b/front/src/utils/global.js index 467ac95e..2fc7a2ba 100644 --- a/front/src/utils/global.js +++ b/front/src/utils/global.js @@ -637,7 +637,7 @@ Object.assign(Vue.prototype, { } const id = row.id refPrefixArr.forEach(refPrefix => { - promiseArr.push(this.$refs[refPrefix + id].validate()) + this.$refs[refPrefix + id] && promiseArr.push(this.$refs[refPrefix + id].validate()) }) const children = arr[i].children if (children && children.length > 0) { diff --git a/front/src/views/doc/EditDocStandard/index.vue b/front/src/views/doc/EditDocStandard/index.vue index 04a18530..1c62af4b 100644 --- a/front/src/views/doc/EditDocStandard/index.vue +++ b/front/src/views/doc/EditDocStandard/index.vue @@ -5,187 +5,197 @@ - - - - - - - - - - - - {{ method }} +
+ + + + + + + + + + + + {{ method }} + + + + + + + + + {{ contentType }} - - - - - - - {{ contentType }} - - - - - - {{ $t('empty') }} - - {{ item.name }} - - - - - - - - - - - - {{ $t('lockDocDesc') }} - - - - - - - {{ $t(item.label) }} - - - + + + + {{ $t('empty') }} + + {{ item.name }} + + + + + + + + + + + + {{ $t('lockDocDesc') }} + + + + + + + {{ $t(item.label) }} + + + +
- {{ $t('newHeader') }} - {{ $t('importHeader') }} - | - - +
+ {{ $t('newHeader') }} + {{ $t('importHeader') }} + | + + +
- - -
- {{ $t('newQueryParam') }} - {{ $t('importQueryParam') }} -
- -
- - - - Body Parameter - - -
- -
- | - {{ $t('newBodyParam') }} - {{ $t('importBodyParam') }} - | +
+ + +
+ {{ $t('newQueryParam') }} + {{ $t('importQueryParam') }} +
+ +
+ + + + Body Parameter + + +
+
+ | + {{ $t('newBodyParam') }} + {{ $t('importBodyParam') }} + | + +
-
- - - - + + + + +
-
- -
- | - {{ $t('newResponseParam') }} - {{ $t('importResponseParam') }} - | +
+
+
+ | + {{ $t('newResponseParam') }} + {{ $t('importResponseParam') }} + | + +
+ +
- - - {{ $t('newErrorCode') }} - +
+ {{ $t('newErrorCode') }} + +
@@ -290,7 +300,7 @@ export default { responseParams: [], errorCodeParams: [], orderIndex: this.getEnums().INIT_ORDER_INDEX, - remark: '' + remark: '', }, paramsActive: 'tabQueryParams', remark: '', @@ -451,7 +461,7 @@ export default { }, // 修改文档内容 submitForm() { - this.$refs.docForm.validate((valid) => { + this.$refs.docForm && this.$refs.docForm.validate((valid) => { let rootArrayValid = true if (this.isEnableRequestRootArray) { rootArrayValid = this.$refs.requestArrayTable.validate() diff --git a/front/src/views/doc/EditTable/index.vue b/front/src/views/doc/EditTable/index.vue index e5c49a46..5212d21d 100644 --- a/front/src/views/doc/EditTable/index.vue +++ b/front/src/views/doc/EditTable/index.vue @@ -1,14 +1,23 @@ - - + - - + - - + - - + - - + - + - - + - - + - - +
- - + + + + \ No newline at end of file diff --git a/front/src/views/doc/EditTable/select.vue b/front/src/views/doc/EditTable/select.vue new file mode 100644 index 00000000..0b7b9e5f --- /dev/null +++ b/front/src/views/doc/EditTable/select.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/front/src/views/doc/EditTable/switch.vue b/front/src/views/doc/EditTable/switch.vue new file mode 100644 index 00000000..be311f52 --- /dev/null +++ b/front/src/views/doc/EditTable/switch.vue @@ -0,0 +1,51 @@ + + + + \ No newline at end of file diff --git a/front/src/views/doc/RootArrayTable/index.vue b/front/src/views/doc/RootArrayTable/index.vue index f0291947..5db16ccf 100644 --- a/front/src/views/doc/RootArrayTable/index.vue +++ b/front/src/views/doc/RootArrayTable/index.vue @@ -11,16 +11,25 @@ {{ $t('newParam') }} {{ $t('importParam') }}
- - - + - - + - - + - - + - - + - - + - + - - + - - +
- - + +