소스 검색

新增接口管理查询和新增支持排序
更新接口

zhontai 2 년 전
부모
커밋
0ac60f96d9
4개의 변경된 파일27개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      package-lock.json
  2. 20 0
      src/api/admin/data-contracts.ts
  3. 5 0
      src/views/admin/api/components/api-form.vue
  4. 1 0
      src/views/admin/api/index.vue

+ 1 - 0
package-lock.json

@@ -5,6 +5,7 @@
   "requires": true,
   "packages": {
     "": {
+      "name": "admin.ui.plus",
       "version": "1.2.0",
       "license": "MIT",
       "dependencies": {

+ 20 - 0
src/api/admin/data-contracts.ts

@@ -24,6 +24,11 @@ export interface ApiAddInput {
   httpMethods?: string | null
   /** 说明 */
   description?: string | null
+  /**
+   * 排序
+   * @format int32
+   */
+  sort?: number
   /** 启用 */
   enabled?: boolean
 }
@@ -107,6 +112,11 @@ export interface ApiGetOutput {
   httpMethods?: string | null
   /** 说明 */
   description?: string | null
+  /**
+   * 排序
+   * @format int32
+   */
+  sort?: number
   /** 启用 */
   enabled?: boolean
   /**
@@ -142,6 +152,11 @@ export interface ApiListOutput {
   httpMethods?: string | null
   /** 说明 */
   description?: string | null
+  /**
+   * 排序
+   * @format int32
+   */
+  sort?: number
   /** 启用 */
   enabled?: boolean
 }
@@ -178,6 +193,11 @@ export interface ApiUpdateInput {
   httpMethods?: string | null
   /** 说明 */
   description?: string | null
+  /**
+   * 排序
+   * @format int32
+   */
+  sort?: number
   /** 启用 */
   enabled?: boolean
   /**

+ 5 - 0
src/views/admin/api/components/api-form.vue

@@ -44,6 +44,11 @@
               <el-input v-model="form.description" clearable />
             </el-form-item>
           </el-col>
+          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+            <el-form-item label="排序">
+              <el-input-number v-model="form.sort" />
+            </el-form-item>
+          </el-col>
           <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
             <el-form-item label="启用">
               <el-switch v-model="form.enabled" />

+ 1 - 0
src/views/admin/api/index.vue

@@ -31,6 +31,7 @@
             <el-table-column prop="label" label="接口名称" min-width="120" show-overflow-tooltip />
             <el-table-column prop="path" label="接口地址" min-width="120" show-overflow-tooltip />
             <el-table-column prop="description" label="接口描述" min-width="120" show-overflow-tooltip />
+            <el-table-column prop="sort" label="排序" width="80" align="center" show-overflow-tooltip />
             <el-table-column label="状态" width="80" align="center" show-overflow-tooltip>
               <template #default="{ row }">
                 <el-tag type="success" v-if="row.enabled">启用</el-tag>