@ajaxjs/ui 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +8 -11
  2. package/dist/api-helper/common/arg.vue +46 -0
  3. package/dist/api-helper/common/http-method.vue +53 -0
  4. package/dist/api-helper/common/input-table.vue +128 -0
  5. package/dist/api-helper/document/document-render.d.ts +10 -0
  6. package/dist/api-helper/document/document-render.js +38 -0
  7. package/dist/api-helper/document/document-render.js.map +1 -0
  8. package/dist/api-helper/document/document-render.ts +35 -0
  9. package/dist/api-helper/document/document-render.vue +155 -0
  10. package/dist/api-helper/document/document.d.ts +31 -0
  11. package/dist/api-helper/document/document.js +55 -0
  12. package/dist/api-helper/document/document.js.map +1 -0
  13. package/dist/api-helper/document/document.ts +55 -0
  14. package/dist/api-helper/document/document.vue +78 -0
  15. package/dist/api-helper/document/perview.vue +0 -0
  16. package/dist/api-helper/index.js +142 -0
  17. package/dist/api-helper/index.vue +108 -0
  18. package/dist/api-helper/request-body.vue +66 -0
  19. package/dist/api-helper/table.d.ts +7 -0
  20. package/dist/api-helper/table.js +13 -0
  21. package/dist/api-helper/table.js.map +1 -0
  22. package/dist/api-helper/table.ts +10 -0
  23. package/dist/api-helper/table.vue +103 -0
  24. package/dist/api-helper/xhr.js +100 -0
  25. package/dist/api-helper2/api-helper.d.ts +194 -0
  26. package/dist/api-helper2/api-helper.vue +144 -0
  27. package/dist/api-helper2/bookmark.vue +168 -0
  28. package/dist/api-helper2/common/arg.vue +46 -0
  29. package/dist/api-helper2/common/http-method.vue +53 -0
  30. package/dist/api-helper2/document/document-render.vue +189 -0
  31. package/dist/api-helper2/document/document.vue +130 -0
  32. package/dist/api-helper2/document/perview.vue +0 -0
  33. package/dist/api-helper2/env.vue +140 -0
  34. package/dist/api-helper2/history.vue +116 -0
  35. package/dist/api-helper2/main.vue +70 -0
  36. package/dist/api-helper2/request-body.vue +68 -0
  37. package/dist/api-helper2/table.vue +116 -0
  38. package/dist/api-selector/api-list-dataservice.d.ts +18 -0
  39. package/dist/api-selector/api-list-dataservice.js +209 -0
  40. package/dist/api-selector/api-list-dataservice.js.map +1 -0
  41. package/dist/api-selector/api-list-dataservice.ts +232 -0
  42. package/dist/api-selector/api-list-swagger.d.ts +28 -0
  43. package/dist/api-selector/api-list-swagger.js +179 -0
  44. package/dist/api-selector/api-list-swagger.js.map +1 -0
  45. package/dist/api-selector/api-list-swagger.ts +206 -0
  46. package/dist/api-selector/api-list.d.ts +80 -0
  47. package/dist/api-selector/api-list.js +129 -0
  48. package/dist/api-selector/api-list.js.map +1 -0
  49. package/dist/api-selector/api-list.ts +135 -0
  50. package/dist/api-selector/index.vue +125 -0
  51. package/dist/api-selector/test-dataservice.d.ts +23 -0
  52. package/dist/api-selector/test-dataservice.js +74 -0
  53. package/dist/api-selector/test-dataservice.js.map +1 -0
  54. package/dist/api-selector/test-swagger.d.ts +901 -0
  55. package/dist/api-selector/test-swagger.js +656 -0
  56. package/dist/api-selector/test-swagger.js.map +1 -0
  57. package/dist/data-source/data-source.css +44 -0
  58. package/dist/data-source/data-source.d.ts +14 -0
  59. package/dist/data-source/data-source.html +59 -0
  60. package/dist/data-source/data-source.js +97 -0
  61. package/dist/data-source/data-source.js.map +1 -0
  62. package/dist/data-source/data-source.less +46 -0
  63. package/dist/data-source/data-source.ts +95 -0
  64. package/dist/data-source/data-source.vue +59 -0
  65. package/dist/iView-ext/fast-iview-table/fast-iview-table.d.ts +37 -0
  66. package/dist/iView-ext/fast-iview-table/fast-iview-table.js +72 -0
  67. package/dist/iView-ext/fast-iview-table/fast-iview-table.js.map +1 -0
  68. package/dist/iView-ext/fast-iview-table/fast-iview-table.ts +75 -0
  69. package/dist/iView-ext/fast-iview-table/fast-iview-table.vue +52 -0
  70. package/dist/iView-ext/fast-iview-table/list.d.ts +44 -0
  71. package/dist/iView-ext/fast-iview-table/list.js +97 -0
  72. package/dist/iView-ext/fast-iview-table/list.js.map +1 -0
  73. package/dist/iView-ext/fast-iview-table/list.ts +109 -0
  74. package/dist/iView-ext/tips.vue +14 -0
  75. package/dist/index.d.ts +33 -31
  76. package/dist/index.js +8 -60
  77. package/dist/index.js.map +1 -1
  78. package/dist/index.ts +15 -0
  79. package/dist/libs/api-helper.d.ts +194 -0
  80. package/dist/libs/api-list.d.ts +15 -0
  81. package/dist/libs/common.d.ts +201 -0
  82. package/dist/libs/entity.d.ts +26 -0
  83. package/dist/libs/entity.js +1 -0
  84. package/dist/libs/entity.js.map +1 -0
  85. package/dist/libs/entity.ts +31 -0
  86. package/dist/libs/iview-widgets.d.ts +59 -0
  87. package/dist/libs/iview-widgets.js +2 -0
  88. package/dist/libs/iview-widgets.js.map +1 -0
  89. package/dist/libs/iview-widgets.ts +73 -0
  90. package/dist/main.d.ts +1 -1
  91. package/dist/main.js +16 -8
  92. package/dist/main.js.map +1 -1
  93. package/dist/main.ts +22 -0
  94. package/dist/table-selector/table-selector.htm +28 -0
  95. package/dist/table-selector/table-selector.js +149 -0
  96. package/package.json +16 -17
  97. package/dist/router/index.d.ts +0 -3
  98. package/dist/router/index.js +0 -44
  99. package/dist/router/index.js.map +0 -1
  100. package/dist/util/cookies.d.ts +0 -18
  101. package/dist/util/cookies.js +0 -46
  102. package/dist/util/cookies.js.map +0 -1
  103. package/dist/util/dom.d.ts +0 -17
  104. package/dist/util/dom.js +0 -44
  105. package/dist/util/dom.js.map +0 -1
  106. package/dist/util/utils.d.ts +0 -51
  107. package/dist/util/utils.js +0 -174
  108. package/dist/util/utils.js.map +0 -1
  109. package/dist/util/xhr-config.d.ts +0 -22
  110. package/dist/util/xhr-config.js +0 -3
  111. package/dist/util/xhr-config.js.map +0 -1
  112. package/dist/util/xhr.d.ts +0 -71
  113. package/dist/util/xhr.js +0 -262
  114. package/dist/util/xhr.js.map +0 -1
  115. package/dist/widget/AccordionMenu.vue +0 -140
  116. package/dist/widget/AdjustFontSize.vue +0 -65
  117. package/dist/widget/Article.vue +0 -59
  118. package/dist/widget/EmptyContent.d.ts +0 -5
  119. package/dist/widget/EmptyContent.js +0 -7
  120. package/dist/widget/EmptyContent.js.map +0 -1
  121. package/dist/widget/Expander.vue +0 -65
  122. package/dist/widget/FileUploader/FileUploader.d.ts +0 -70
  123. package/dist/widget/FileUploader/FileUploader.js +0 -139
  124. package/dist/widget/FileUploader/FileUploader.js.map +0 -1
  125. package/dist/widget/FileUploader/FileUploader.less +0 -68
  126. package/dist/widget/FileUploader/FileUploader.ts +0 -156
  127. package/dist/widget/FileUploader/FileUploader.vue +0 -43
  128. package/dist/widget/HtmlEditor/HtmlEditor.d.ts +0 -70
  129. package/dist/widget/HtmlEditor/HtmlEditor.js +0 -287
  130. package/dist/widget/HtmlEditor/HtmlEditor.js.map +0 -1
  131. package/dist/widget/HtmlEditor/HtmlEditor.less +0 -345
  132. package/dist/widget/HtmlEditor/HtmlEditor.ts +0 -339
  133. package/dist/widget/HtmlEditor/HtmlEditor.vue +0 -70
  134. package/dist/widget/HtmlEditor/html-editor-HtmlSanitizer.js +0 -103
  135. package/dist/widget/ImageEnlarger.vue +0 -105
  136. package/dist/widget/OpacityBanner.vue +0 -125
  137. package/dist/widget/ProcessLine.vue +0 -133
  138. package/dist/widget/Resize.d.ts +0 -51
  139. package/dist/widget/Resize.js +0 -133
  140. package/dist/widget/Resize.js.map +0 -1
  141. package/dist/widget/Resize.ts +0 -152
  142. package/dist/widget/Resize.vue +0 -104
  143. package/dist/widget/TreeSelector.vue +0 -4
  144. package/dist/widget/calendar/BetweenDate.vue +0 -63
  145. package/dist/widget/calendar/Calendar.d.ts +0 -55
  146. package/dist/widget/calendar/Calendar.js +0 -145
  147. package/dist/widget/calendar/Calendar.js.map +0 -1
  148. package/dist/widget/calendar/Calendar.less +0 -210
  149. package/dist/widget/calendar/Calendar.ts +0 -167
  150. package/dist/widget/calendar/Calendar.vue +0 -52
  151. package/dist/widget/calendar/CalendarInput.vue +0 -71
  152. package/dist/widget/form/validator.d.ts +0 -70
  153. package/dist/widget/form/validator.js +0 -220
  154. package/dist/widget/form/validator.js.map +0 -1
  155. package/dist/widget/form/validator.ts +0 -289
  156. package/dist/widget/play-ground/sku.vue +0 -93
@@ -0,0 +1,194 @@
1
+ /**
2
+ * 表格定义
3
+ */
4
+ declare type API_HELPER_TABLE = {
5
+ mode: 'SIMPLE' | 'SCHEME';
6
+ };
7
+
8
+ /**
9
+ * 环境
10
+ */
11
+ declare type API_HELPER_ENV = {
12
+ id: number;
13
+ name: string;
14
+
15
+ /**
16
+ * URL 前缀
17
+ */
18
+ urlPrefix: string;
19
+
20
+ /**
21
+ *
22
+ */
23
+ actived: boolean;
24
+ };
25
+
26
+ /**
27
+ * HTTP 方法
28
+ */
29
+ declare type API_HELPER_HTTP_METHOD = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTION';
30
+
31
+ /**
32
+ * 历史记录
33
+ */
34
+ declare type API_HELPER_HISTORY = {
35
+ id: number;
36
+
37
+ /**
38
+ * 任务名称,可选
39
+ */
40
+ name?: string;
41
+
42
+ /**
43
+ * 任务 id,可选
44
+ */
45
+ nameId: number;
46
+
47
+ httpMethod: API_HELPER_HTTP_METHOD;
48
+
49
+ url: string;
50
+
51
+ /**
52
+ * 请求日期
53
+ */
54
+ date: string;
55
+
56
+ /**
57
+ * 耗时
58
+ */
59
+ time: number;
60
+
61
+ stateCode: number;
62
+ };
63
+
64
+ /**
65
+ * 参数的枚举值
66
+ */
67
+ declare type API_HELPER_ARGUMENT_ENU = {
68
+ /**
69
+ * 是否默认
70
+ */
71
+ isDefault?: boolean;
72
+
73
+ /**
74
+ * 值
75
+ */
76
+ value: any;
77
+
78
+ /**
79
+ * 值是什么含义
80
+ */
81
+ comment: string;
82
+ };
83
+
84
+ /**
85
+ * 参数
86
+ */
87
+ declare type API_HELPER_ARGUMENT = {
88
+ /**
89
+ * 是否使用
90
+ */
91
+ isEnable: boolean;
92
+
93
+ /**
94
+ * 变量
95
+ */
96
+ name: string;
97
+
98
+ /**
99
+ * 参数说明
100
+ */
101
+ desc: string;
102
+
103
+ /**
104
+ * 参数位置
105
+ */
106
+ type: 'HEADER' | 'PATH' | 'QUERY' | 'BODY' | 'FORM';
107
+
108
+ /**
109
+ * 数据类型
110
+ */
111
+ dataType: any;
112
+
113
+ /**
114
+ * 对应后端语言的类型或者枚举
115
+ */
116
+ mappingType?: any;
117
+
118
+ /**
119
+ * 值,枚举值
120
+ */
121
+ values?: API_HELPER_ARGUMENT_ENU[];
122
+
123
+ /**
124
+ * 是否必填
125
+ */
126
+ isRequired: boolean;
127
+
128
+ /**
129
+ * 说明,描述
130
+ */
131
+ comment: string;
132
+ };
133
+
134
+ /**
135
+ * JSON 类型参数
136
+ */
137
+ declare type API_HELPER_JSON_ARGUMENT = API_HELPER_ARGUMENT & {
138
+ /**
139
+ * 类型
140
+ */
141
+ dataType: number | string | boolean | null | array | object;
142
+ };
143
+
144
+ /**
145
+ * 文档
146
+ */
147
+ declare type API_HELPER_DOCUMENT = {
148
+ /**
149
+ * ID
150
+ */
151
+ id: any;
152
+
153
+ /**
154
+ * 名称
155
+ */
156
+ name: string;
157
+
158
+ /**
159
+ * 分组
160
+ */
161
+ catalogId: any;
162
+
163
+ /**
164
+ * 说明
165
+ */
166
+ description: string;
167
+
168
+ /**
169
+ * HTTP 请求方法
170
+ */
171
+ httpMethod: API_HELPER_HTTP_METHOD;
172
+
173
+ url: string;
174
+
175
+ /**
176
+ * 对应 UI,图片地址
177
+ */
178
+ ui: string;
179
+
180
+ /**
181
+ * 请求示例
182
+ */
183
+ demoUrl: string;
184
+
185
+ /**
186
+ * 接口编码状态
187
+ */
188
+ codeState: 'INITED' | 'DEFINED' | 'DONE';
189
+
190
+ /**
191
+ * 是否在文档汇总中展示
192
+ */
193
+ isShow: boolean;
194
+ };
@@ -0,0 +1,144 @@
1
+ <template>
2
+ <div class="container">
3
+ <div class="left">
4
+ <Tabs value="history" :animated="false">
5
+ <TabPane label="收藏" name="bookmark">
6
+ <Bookmark />
7
+ </TabPane>
8
+ <TabPane label="历史" name="history">
9
+ <History />
10
+ </TabPane>
11
+ </Tabs>
12
+ </div>
13
+
14
+ <div class="right">
15
+ <nav>
16
+ MyAPI
17
+ <Icon type="md-help-circle" style="margin: 10px 10px 0 10px; float: right; cursor: pointer" size="19" @click="isShowAbout = true" />
18
+ <Dropdown style="margin-left: 10px; float: right" @on-click="onSelectEnvClk" on-click="onSelectEnvClk">
19
+ <Button size="small" style="width: 150px">
20
+ 选择环境...
21
+ <Icon type="ios-arrow-down"></Icon>
22
+ </Button>
23
+ <DropdownMenu slot="list" style="width: 150px">
24
+ <DropdownItem>驴打滚</DropdownItem>
25
+ <DropdownItem>炸酱面</DropdownItem>
26
+ <DropdownItem disabled>豆汁儿</DropdownItem>
27
+ <DropdownItem>冰糖葫芦</DropdownItem>
28
+ <DropdownItem name="config" divided style="color: #2d8cf0">配置环境...</DropdownItem>
29
+ </DropdownMenu>
30
+ </Dropdown>
31
+ </nav>
32
+ <Tabs class="mainTab" name="mainTab" :value="activeTab" :animated="false" type="card" @on-click="ifAdd">
33
+ <TabPane v-for="tab in mainTabs" :key="tab.label" :label="tab.label" :name="tab.name" :index="tab.index" :closable="tab.closable" tab="mainTab" style="padding: 0 10px">
34
+ <Main />
35
+ </TabPane>
36
+ </Tabs>
37
+ </div>
38
+ <Modal title="配置环境" v-model="isShowEnv" ok-text="保存" cancel-text="" width="900">
39
+ <Env />
40
+ </Modal>
41
+
42
+ <Modal v-model="isShowAbout" title="关于" cancel-text="">
43
+ ajaxjs.com 倾情奉献
44
+ </Modal>
45
+ <Modal v-model="isShowArgs" title="参数详情" cancel-text="">
46
+ <Argument />
47
+ </Modal>
48
+ </div>
49
+ </template>
50
+
51
+ <script lang="ts">
52
+ import RequestBody from "./request-body.vue";
53
+ import Main from "./main.vue";
54
+ import Env from "./env.vue";
55
+ import History from "./history.vue";
56
+ import Argument from "./common/arg.vue";
57
+ import Bookmark from "./bookmark.vue";
58
+
59
+ const addTabBtn: any = { label: "+", name: "addTab", closable: false };
60
+
61
+ export default {
62
+ components: { RequestBody, Main, Env, History, Argument, Bookmark },
63
+ data() {
64
+ return {
65
+ activeTab: "tab1",
66
+ mainTabs: [
67
+ {
68
+ label: "获取新闻详情",
69
+ name: "tab1",
70
+ closable: true,
71
+ },
72
+ addTabBtn,
73
+ ],
74
+ isShowEnv: false,
75
+ isShowAbout: false,
76
+ isShowArgs: false,
77
+ };
78
+ },
79
+ methods: {
80
+ ifAdd(name: string): void {
81
+ if (name === "addTab") {
82
+ this.mainTabs.pop(); // 先删除,再增加
83
+
84
+ let tabName: string = "tab" + (this.mainTabs.length + 1);
85
+ this.mainTabs.push({
86
+ label: "新 API",
87
+ name: tabName,
88
+ closable: true,
89
+ });
90
+
91
+ setTimeout(() => {
92
+ this.mainTabs.push(addTabBtn);
93
+ this.activeTab = tabName;
94
+ }, 100);
95
+ }
96
+ },
97
+
98
+ onSelectEnvClk(name: string): void {
99
+ if (name === "config") {
100
+ this.isShowEnv = true;
101
+ }
102
+ },
103
+ },
104
+ };
105
+ </script>
106
+
107
+ <style>
108
+ .mainTab
109
+ > .ivu-tabs-bar
110
+ > .ivu-tabs-nav-container
111
+ > .ivu-tabs-nav-wrap
112
+ > .ivu-tabs-nav-scroll {
113
+ padding-left: 20px;
114
+ margin-top: 3px;
115
+ }
116
+ </style>
117
+
118
+ <style lang="less" scoped>
119
+ nav {
120
+ height: 36px;
121
+ line-height: 36px;
122
+ padding: 0 10px;
123
+ background-color: #f5f5f5;
124
+ border-bottom: 1px solid lightgray;
125
+ }
126
+
127
+ // left-right-layout
128
+ .container {
129
+ display: flex;
130
+ height: 100%;
131
+
132
+ .left {
133
+ height: 100%;
134
+ flex: 0 0 300px;
135
+ border-right: 1px solid lightgray;
136
+ }
137
+
138
+ .right {
139
+ height: 100%;
140
+ flex: 1;
141
+ /*div占据所有剩余宽度 */
142
+ }
143
+ }
144
+ </style>
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <Tree :data="data5" :render="renderContent" class="demo-tree-render"></Tree>
3
+ </template>
4
+ <script>
5
+ export default {
6
+ data() {
7
+ return {
8
+ data5: [
9
+ {
10
+ title: "parent 1",
11
+ expand: true,
12
+ render: (h, { root, node, data }) => {
13
+ return h(
14
+ "span",
15
+ {
16
+ style: {
17
+ display: "inline-block",
18
+ width: "100%",
19
+ },
20
+ },
21
+ [
22
+ h("span", [
23
+ h("Icon", {
24
+ props: {
25
+ type: "ios-folder-outline",
26
+ },
27
+ style: {
28
+ marginRight: "8px",
29
+ },
30
+ }),
31
+ h("span", data.title),
32
+ ]),
33
+ h(
34
+ "span",
35
+ {
36
+ style: {
37
+ display: "inline-block",
38
+ float: "right",
39
+ marginRight: "32px",
40
+ },
41
+ },
42
+ [
43
+ h("Button", {
44
+ props: Object.assign({}, this.buttonProps, {
45
+ icon: "ios-add",
46
+ type: "primary",
47
+ }),
48
+ style: {
49
+ width: "64px",
50
+ },
51
+ on: {
52
+ click: () => {
53
+ this.append(data);
54
+ },
55
+ },
56
+ }),
57
+ ]
58
+ ),
59
+ ]
60
+ );
61
+ },
62
+ children: [
63
+ {
64
+ title: "child 1-1",
65
+ expand: true,
66
+ children: [
67
+ {
68
+ title: "leaf 1-1-1",
69
+ expand: true,
70
+ },
71
+ {
72
+ title: "leaf 1-1-2",
73
+ expand: true,
74
+ },
75
+ ],
76
+ },
77
+ {
78
+ title: "child 1-2",
79
+ expand: true,
80
+ children: [
81
+ {
82
+ title: "leaf 1-2-1",
83
+ expand: true,
84
+ },
85
+ {
86
+ title: "leaf 1-2-1",
87
+ expand: true,
88
+ },
89
+ ],
90
+ },
91
+ ],
92
+ },
93
+ ],
94
+ buttonProps: {
95
+ type: "default",
96
+ size: "small",
97
+ },
98
+ };
99
+ },
100
+ methods: {
101
+ renderContent(h, { root, node, data }) {
102
+ return h(
103
+ "span",
104
+ {
105
+ style: { display: "inline-block", width: "100%" },
106
+ },
107
+ [
108
+ h("span", [
109
+ h("Icon", {
110
+ props: { type: "ios-paper-outline" },
111
+ style: { marginRight: "8px" },
112
+ }),
113
+ h("span", data.title),
114
+ ]),
115
+ h(
116
+ "span",
117
+ {
118
+ style: {
119
+ display: "inline-block",
120
+ float: "right",
121
+ marginRight: "32px",
122
+ },
123
+ },
124
+ [
125
+ h("Button", {
126
+ props: Object.assign({}, this.buttonProps, { icon: "ios-add" }),
127
+ style: { marginRight: "8px" },
128
+ on: {
129
+ click: () => {
130
+ this.append(data);
131
+ },
132
+ },
133
+ }),
134
+ h("Button", {
135
+ props: Object.assign({}, this.buttonProps, {
136
+ icon: "ios-remove",
137
+ }),
138
+ on: {
139
+ click: () => {
140
+ this.remove(root, node, data);
141
+ },
142
+ },
143
+ }),
144
+ ]
145
+ ),
146
+ ]
147
+ );
148
+ },
149
+ append(data) {
150
+ const children = data.children || [];
151
+ children.push({ title: "appended node", expand: true });
152
+ this.$set(data, "children", children);
153
+ },
154
+ remove(root, node, data) {
155
+ const parentKey = root.find((el) => el === node).parent;
156
+ const parent = root.find((el) => el.nodeKey === parentKey).node;
157
+ const index = parent.children.indexOf(data);
158
+ parent.children.splice(index, 1);
159
+ },
160
+ },
161
+ };
162
+ </script>
163
+
164
+ <style>
165
+ .demo-tree-render .ivu-tree-title {
166
+ width: 100%;
167
+ }
168
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <!-- 参数控制 -->
3
+ <Form :label-width="80">
4
+ <FormItem label="参数名称">
5
+ <Input v-model="args.name" placeholder="请输入参数的变量名,必填" />
6
+ </FormItem>
7
+
8
+ <FormItem label="参数类型">
9
+ <Select>
10
+ <Option></Option>
11
+ </Select>
12
+ </FormItem>
13
+
14
+ <FormItem label="是否必填">
15
+ <Checkbox v-model="single">必填</Checkbox>
16
+ </FormItem>
17
+
18
+ <FormItem label="参数值">
19
+ <Select>
20
+ <Option></Option>
21
+ </Select>
22
+ </FormItem>
23
+
24
+ <FormItem label="校验正则">
25
+ <Input v-model="args.name" placeholder="请输入参数的变量名,必填" />
26
+ </FormItem>
27
+
28
+ <FormItem label="参数说明">
29
+ <Input v-model="args.name" type="textarea" :rows="4" placeholder="请输入参数的变量名,必填" />
30
+ </FormItem>
31
+
32
+ </Form>
33
+ </template>
34
+
35
+ <script lang="ts">
36
+ export default {
37
+ data(): {} {
38
+ return {
39
+ args: {} as API_HELPER_ARGUMENT,
40
+ };
41
+ },
42
+ };
43
+ </script>
44
+
45
+ <style lang="less" scoped>
46
+ </style>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <span><span class="httpMethod" :class="type">{{type}}</span></span>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ props: {
8
+ type: {
9
+ type: String,
10
+ required: true,
11
+ },
12
+ },
13
+ };
14
+ </script>
15
+
16
+ <style scoped>
17
+ .httpMethod {
18
+ border: 1px solid;
19
+ border-radius: 3px;
20
+ padding: 0 3px;
21
+ border: 1px solid;
22
+ border-radius: 3px;
23
+ display: inline-block;
24
+ margin-right: 3px;
25
+ font-size: 5px;
26
+ line-height: 15px;
27
+ height: 14px;
28
+ }
29
+
30
+ .GET {
31
+ border-color: #19be6b;
32
+ background-color: #f5fffa;
33
+ color: #19be6b;
34
+ }
35
+
36
+ .POST {
37
+ border-color: #2db7f5;
38
+ background-color: #e8f2fc;
39
+ color: #2db7f5;
40
+ }
41
+
42
+ .PUT {
43
+ border-color: #f90;
44
+ background-color: #fcf3e8;
45
+ color: #f90;
46
+ }
47
+
48
+ .DELETE {
49
+ border-color: #ff4f4f;
50
+ background-color: #ffeeee;
51
+ color: #ff4f4f;
52
+ }
53
+ </style>