@ajaxjs/ui 1.3.11 → 1.4.0
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.
- package/README.md +1 -30
- package/dist/ajaxjs-ui.cjs.js +1 -0
- package/dist/ajaxjs-ui.es.js +33 -0
- package/dist/ajaxjs-ui.umd.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/utils.d.ts +18 -0
- package/package.json +54 -49
- package/.browserslistrc +0 -3
- package/.eslintrc.js +0 -26
- package/babel.config.js +0 -5
- package/deprecated/api-helper.zip +0 -0
- package/deprecated/api-helper2.zip +0 -0
- package/deprecated/api-selector.zip +0 -0
- package/deprecated/common-ui.zip +0 -0
- package/deprecated/data-source.zip +0 -0
- package/deprecated/table-selector.zip +0 -0
- package/deprecated/utils.js +0 -220
- package/dist/@ajaxjs/ui.common.js +0 -4321
- package/dist/@ajaxjs/ui.common.js.map +0 -1
- package/dist/@ajaxjs/ui.css +0 -1
- package/dist/@ajaxjs/ui.umd.js +0 -4332
- package/dist/@ajaxjs/ui.umd.js.map +0 -1
- package/dist/@ajaxjs/ui.umd.min.js +0 -2
- package/dist/@ajaxjs/ui.umd.min.js.map +0 -1
- package/dist/demo.html +0 -1
- package/examples/App.vue +0 -137
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/data-source/data-source.less +0 -46
- package/src/data-source/data-source.ts +0 -97
- package/src/data-source/data-source.vue +0 -59
- package/src/iam/iam.ts +0 -65
- package/src/iam/user.vue +0 -53
- package/src/index.js +0 -52
- package/src/iview-ext/fast-iview-table.ts +0 -133
- package/src/iview-ext/fast-iview-table.vue +0 -67
- package/src/iview-ext/list.ts +0 -108
- package/src/iview-ext/table-selector.vue +0 -185
- package/src/iview-ext/tips.vue +0 -17
- package/src/libs/api-helper.d.ts +0 -194
- package/src/libs/api-list.d.ts +0 -15
- package/src/libs/common.d.ts +0 -201
- package/src/libs/entity.ts +0 -31
- package/src/libs/iview-widgets.ts +0 -73
- package/src/main.ts +0 -7
- package/src/shims-tsx.d.ts +0 -11
- package/src/shims-vue.d.ts +0 -4
- package/src/style/common-functions.less +0 -286
- package/src/style/reset.less +0 -19
- package/src/style/reset2.less +0 -49
- package/tsconfig.json +0 -40
- package/vue.config.js +0 -14
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- 搜索表单 -->
|
|
4
|
-
<Card :bordered="false" dis-hover class="common-search-panel" style="text-align:left">
|
|
5
|
-
<span style="float:right;">
|
|
6
|
-
<Button type="primary" icon="ios-search" @click="$parent.getData()">查询</Button>
|
|
7
|
-
<Button style="margin-left:10px" @click="reset">重置</Button>
|
|
8
|
-
</span>
|
|
9
|
-
<Input suffix="ios-search" v-model="list.search.name" @on-enter="getData" clearable :placeholder="'请输入' + widgetName_ + '名称'" />
|
|
10
|
-
</Card>
|
|
11
|
-
|
|
12
|
-
<div>
|
|
13
|
-
<Card :bordered="false" dis-hover>
|
|
14
|
-
<div class="toolbar">
|
|
15
|
-
<Tooltip class="ivu-ml" content="刷新" placement="top">
|
|
16
|
-
<Icon size="20" type="ios-refresh" @click="getData" style="cursor: pointer;" />
|
|
17
|
-
</Tooltip>
|
|
18
|
-
|
|
19
|
-
<slot name="toolbar"></slot>
|
|
20
|
-
<Button v-if="!!createRoute || !! $parent.onCreate" type="primary" icon="md-add" @click="onCreate">新建{{widgetName_}}</Button>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<Table :columns="list.columns" :data="list.data" :loading="list.loading" height="500">
|
|
24
|
-
<template slot-scope="{ row, index }" slot="action">
|
|
25
|
-
<slot name="list_action" :item="row"></slot>
|
|
26
|
-
<a v-if="pickup" style="color:green;" @click="doPickup(row)">选择</a>
|
|
27
|
-
|
|
28
|
-
<span v-if="!pickup">
|
|
29
|
-
<a style="color:green;" @click="onEdit(row.id)">编辑</a>
|
|
30
|
-
<Divider type="vertical" />
|
|
31
|
-
<Poptip confirm transfer title="是否要删除此行?" @on-ok="deleteInfo(row.id, index)">
|
|
32
|
-
<a style="color:red;">删除</a>
|
|
33
|
-
</Poptip>
|
|
34
|
-
</span>
|
|
35
|
-
</template>
|
|
36
|
-
</Table>
|
|
37
|
-
|
|
38
|
-
<Page class="ivu-mt ivu-text-right" :total="list.total" :current.sync="list.pageNo" show-total show-sizer :page-size="list.limit" @on-page-size-change="handleChangePageSize" />
|
|
39
|
-
</Card>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<style scoped>
|
|
45
|
-
.toolbar {
|
|
46
|
-
margin-bottom: 20px;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.toolbar .ivu-ml {
|
|
51
|
-
float: right;
|
|
52
|
-
padding-top: 10px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* 分页控件有点问题,修改下 */
|
|
56
|
-
.ivu-mt.ivu-text-right {
|
|
57
|
-
text-align: right;
|
|
58
|
-
margin-top: 20px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.common-search-panel .ivu-input-type-text {
|
|
62
|
-
width: 280px;
|
|
63
|
-
margin: 0 10px 16px 0;
|
|
64
|
-
}
|
|
65
|
-
</style>
|
|
66
|
-
|
|
67
|
-
<script lang="ts" src="./fast-iview-table.ts"></script>
|
package/src/iview-ext/list.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Xhr, Utils } from "@ajaxjs/util";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 处理响应的回调函数
|
|
5
|
-
*/
|
|
6
|
-
type XhrCallback = (json: object, text: string) => void;
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
afterDelete(cb?: (a: RepsonseResult) => void): (j: RepsonseResult) => void {
|
|
10
|
-
return function (j: RepsonseResult): void {
|
|
11
|
-
if (j.status) {
|
|
12
|
-
cb && cb(j);
|
|
13
|
-
this.$Message.success('删除成功');
|
|
14
|
-
}
|
|
15
|
-
else
|
|
16
|
-
this.$Message.info('删除失败。' + j.message);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
delInfo(index: number) {
|
|
21
|
-
Xhr.xhr_del(`${this.API}/${this.list.data[index].id}`, (j: RepsonseResult) => {
|
|
22
|
-
if (j.status) {
|
|
23
|
-
this.list.data.splice(index, 1);
|
|
24
|
-
this.list.total--;
|
|
25
|
-
this.$Message.success('删除成功');
|
|
26
|
-
} else
|
|
27
|
-
this.$Message.info('删除失败。' + j.message);
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* id 列
|
|
33
|
-
*/
|
|
34
|
-
id: { title: '#', width: 60, key: 'id', align: 'center' },
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 创建日期
|
|
38
|
-
*/
|
|
39
|
-
createDate: {
|
|
40
|
-
title: '创建日期',/* key: 'createDate', */ width: 160, align: 'center', render(h: (a: string, b: string) => object, params: any) {
|
|
41
|
-
return h('div', Utils.dateFormat.call(new Date(params.row.createDate), 'yyyy-MM-dd hh:mm'));
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 分类标签
|
|
47
|
-
*/
|
|
48
|
-
tags: { title: '分类标签', minWidth: 100, key: 'tagsNames', align: 'center', ellipsis: true },
|
|
49
|
-
|
|
50
|
-
status: {
|
|
51
|
-
title: '状态', width: 80,
|
|
52
|
-
render(h: (a: string, b: object, c: string) => void, params: any) {
|
|
53
|
-
let str = '', color = '';
|
|
54
|
-
|
|
55
|
-
switch (params.row.stat) {
|
|
56
|
-
case -1:
|
|
57
|
-
str = '草稿';
|
|
58
|
-
color = 'gray';
|
|
59
|
-
break;
|
|
60
|
-
case 2:
|
|
61
|
-
color = 'red';
|
|
62
|
-
str = '禁用';
|
|
63
|
-
break;
|
|
64
|
-
case 1:
|
|
65
|
-
color = 'red';
|
|
66
|
-
str = '已删除';
|
|
67
|
-
break
|
|
68
|
-
case null:
|
|
69
|
-
case 0:
|
|
70
|
-
default:
|
|
71
|
-
color = 'green';
|
|
72
|
-
str = "启用";
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return h('div', {
|
|
76
|
-
style: {
|
|
77
|
-
color: color
|
|
78
|
-
}
|
|
79
|
-
}, str);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
getPageList(self: any, listArray: any, callback?: () => void): XhrCallback {
|
|
83
|
-
return (j: JsonResponse) => {
|
|
84
|
-
if (j.status) {
|
|
85
|
-
listArray.total = j.data.total;
|
|
86
|
-
listArray.data = j.data.rows;
|
|
87
|
-
|
|
88
|
-
callback && callback();
|
|
89
|
-
} else
|
|
90
|
-
self.$Message.warning(j.message || '获取数据失败');
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
copyBeanClean(bean: object): object {
|
|
95
|
-
const deepCopy: any = JSON.parse(JSON.stringify(bean));
|
|
96
|
-
|
|
97
|
-
delete deepCopy.createDate;
|
|
98
|
-
delete deepCopy.updateDate;
|
|
99
|
-
delete deepCopy.updateDate;
|
|
100
|
-
delete deepCopy.creatorId;
|
|
101
|
-
delete deepCopy.updaterId;
|
|
102
|
-
delete deepCopy.creator;
|
|
103
|
-
delete deepCopy.updater;
|
|
104
|
-
delete deepCopy.extend;
|
|
105
|
-
|
|
106
|
-
return deepCopy;
|
|
107
|
-
}
|
|
108
|
-
};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="table-selector">
|
|
3
|
-
<Row style="margin:20px 0;" type="flex" justify="center" align="middle">
|
|
4
|
-
<i-Col v-if="isCrossDb" span="6" style="padding-right:10px;">
|
|
5
|
-
<i-Select placeholder="请选择数据库名" v-model="databaseName">
|
|
6
|
-
<i-Option v-for="d in databaseList" :key="d" :value="d">{{d}}</i-Option>
|
|
7
|
-
</i-Select>
|
|
8
|
-
</i-Col>
|
|
9
|
-
<i-Col :span="isCrossDb ? 6 : 12">
|
|
10
|
-
<i-Input search enter-button placeholder="按表名模糊搜索" @on-keyup="search" ref="inputEl"></i-Input>
|
|
11
|
-
</i-Col>
|
|
12
|
-
<i-Col span="12">
|
|
13
|
-
<a @click="resetData">重置</a>
|
|
14
|
-
</i-Col>
|
|
15
|
-
</Row>
|
|
16
|
-
|
|
17
|
-
<i-Table :columns="list_column" :data="data" width="100%" @on-selection-change="onSelect" max-height="300" :loading="loading" class="table-selector-table">
|
|
18
|
-
<template slot-scope="{row}" slot="select">
|
|
19
|
-
<a @click="$emit('on-select', row, databaseName)">选择</a>
|
|
20
|
-
</template>
|
|
21
|
-
</i-Table>
|
|
22
|
-
<br />
|
|
23
|
-
|
|
24
|
-
<div class="ivu-mt ivu-text-right" v-if="!isFilter">
|
|
25
|
-
<Page :total="total" :current.sync="current" show-total :page-size="pageSize" />
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
import Vue from "vue";
|
|
32
|
-
import { Xhr, Utils } from "@ajaxjs/util";
|
|
33
|
-
|
|
34
|
-
// 选择表
|
|
35
|
-
export default Vue.extend({
|
|
36
|
-
name: "TableSelector",
|
|
37
|
-
data() {
|
|
38
|
-
return {
|
|
39
|
-
// isCrossDb: false,
|
|
40
|
-
list_column: [
|
|
41
|
-
{
|
|
42
|
-
title: "#",
|
|
43
|
-
// key: 'id',
|
|
44
|
-
width: 60,
|
|
45
|
-
type: "index",
|
|
46
|
-
// type: 'selection'
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: "表名",
|
|
50
|
-
key: "tableName",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: "说明",
|
|
54
|
-
key: "comment",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
title: "操作",
|
|
58
|
-
slot: "select",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
listData: [], // 显示数据
|
|
62
|
-
data: [], // 全部数据
|
|
63
|
-
total: 0,
|
|
64
|
-
current: 1,
|
|
65
|
-
pageSize: 5,
|
|
66
|
-
isFilter: false,
|
|
67
|
-
start: 0,
|
|
68
|
-
searchKeyword: "",
|
|
69
|
-
loading: false,
|
|
70
|
-
databaseList: [],
|
|
71
|
-
databaseName: "",
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
props: {
|
|
75
|
-
isCrossDb: { type: Boolean, required: true },
|
|
76
|
-
dataSourceId: { type: Number, required: true },
|
|
77
|
-
},
|
|
78
|
-
mounted() {
|
|
79
|
-
// this.isCrossDb = true;
|
|
80
|
-
this.getData();
|
|
81
|
-
},
|
|
82
|
-
methods: {
|
|
83
|
-
getData() {
|
|
84
|
-
this.loading = true;
|
|
85
|
-
let url = `${window.config.dsApiRoot}/datasource/${this.dataSourceId}/get_all_tables?start=${this.start}&limit=${this.pageSize}`;
|
|
86
|
-
// let url = `${DS_CONFIG.API_ROOT}/admin0/${this.dataSourceId}/getAllTables?start=${this.start}&limit=${this.pageSize}`;
|
|
87
|
-
|
|
88
|
-
if (this.searchKeyword) url += `&tableName=${this.searchKeyword}`;
|
|
89
|
-
if (this.databaseName) url += `&dbName=${this.databaseName}`;
|
|
90
|
-
|
|
91
|
-
Xhr.xhr_get(url, (j) => {
|
|
92
|
-
if (j.status) {
|
|
93
|
-
this.data = j.data.rows;
|
|
94
|
-
this.total = j.data.total;
|
|
95
|
-
} else this.$Message.error(j.message);
|
|
96
|
-
|
|
97
|
-
this.loading = false;
|
|
98
|
-
});
|
|
99
|
-
},
|
|
100
|
-
handleChangePageSize() {
|
|
101
|
-
let start = (this.current - 1) * this.pageSize,
|
|
102
|
-
end = start + this.pageSize;
|
|
103
|
-
|
|
104
|
-
this.listData = this.data.slice(start, end);
|
|
105
|
-
},
|
|
106
|
-
onSelect(arr) {
|
|
107
|
-
// arr.forEach((item) => {
|
|
108
|
-
// this.data.forEach((_item) => {});
|
|
109
|
-
// });
|
|
110
|
-
},
|
|
111
|
-
resetData() {
|
|
112
|
-
this.searchKeyword = "";
|
|
113
|
-
|
|
114
|
-
this.start = 0;
|
|
115
|
-
this.getData();
|
|
116
|
-
this.$refs.inputEl.$el.querySelector("input").value = "";
|
|
117
|
-
},
|
|
118
|
-
search(ev) {
|
|
119
|
-
let input = ev.target,
|
|
120
|
-
v = input.value;
|
|
121
|
-
|
|
122
|
-
if (v) {
|
|
123
|
-
this.searchKeyword = v;
|
|
124
|
-
this.start = 0;
|
|
125
|
-
this.current = 1;
|
|
126
|
-
this.getData();
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
onkeypress(ev) {
|
|
130
|
-
let input = ev.target,
|
|
131
|
-
v = input.value;
|
|
132
|
-
|
|
133
|
-
if (v) {
|
|
134
|
-
this.isFilter = true;
|
|
135
|
-
let arr = this.data.filter((item) => item.tableName.indexOf(v) != -1);
|
|
136
|
-
this.listData = arr;
|
|
137
|
-
} else {
|
|
138
|
-
this.resetData();
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
watch: {
|
|
143
|
-
/**
|
|
144
|
-
* 分页
|
|
145
|
-
*
|
|
146
|
-
* @param v
|
|
147
|
-
*/
|
|
148
|
-
current(v) {
|
|
149
|
-
this.start = (v - 1) * this.pageSize;
|
|
150
|
-
this.getData();
|
|
151
|
-
},
|
|
152
|
-
dataSourceId(id) {
|
|
153
|
-
if (id) {
|
|
154
|
-
if (this.isCrossDb)
|
|
155
|
-
Xhr.xhr_get(`/admin/${this.dataSourceId}/get_databases`, (j) => {
|
|
156
|
-
if (j.status) {
|
|
157
|
-
// 过滤 mysql 自带的库
|
|
158
|
-
let not = [
|
|
159
|
-
"information_schema",
|
|
160
|
-
"performance_schema",
|
|
161
|
-
"sys",
|
|
162
|
-
"mysql",
|
|
163
|
-
];
|
|
164
|
-
let arr = j.data.filter((db) => !not.includes(db));
|
|
165
|
-
this.databaseList = arr;
|
|
166
|
-
|
|
167
|
-
// 默认选中第一个
|
|
168
|
-
this.start = 0;
|
|
169
|
-
this.current = 1;
|
|
170
|
-
this.databaseName = arr[0];
|
|
171
|
-
} else this.$Message.error(j.message);
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
else {
|
|
175
|
-
this.databaseName = null;
|
|
176
|
-
this.getData();
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
databaseName(v) {
|
|
181
|
-
this.getData(); // 会重复请求
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
});
|
|
185
|
-
</script>
|
package/src/iview-ext/tips.vue
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<i style="cursor: pointer;" class="ivu-icon ivu-icon-ios-help-circle-outline" :title="text"></i>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import Vue from "vue";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 帮助图标
|
|
10
|
-
*/
|
|
11
|
-
export default Vue.extend({
|
|
12
|
-
name: 'Tips',
|
|
13
|
-
props: {
|
|
14
|
-
text: { type: String, required: true },
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
</script>
|
package/src/libs/api-helper.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
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
|
-
};
|