@ajaxjs/ui 1.3.0 → 1.3.2
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/.browserslistrc +3 -0
- package/.eslintrc.js +26 -0
- package/babel.config.js +5 -0
- 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 +220 -0
- package/dist/@ajaxjs/widgets.common.js +4084 -0
- package/dist/@ajaxjs/widgets.common.js.map +1 -0
- package/dist/@ajaxjs/widgets.css +1 -0
- package/dist/@ajaxjs/widgets.umd.js +4095 -0
- package/dist/@ajaxjs/widgets.umd.js.map +1 -0
- package/dist/@ajaxjs/widgets.umd.min.js +2 -0
- package/dist/@ajaxjs/widgets.umd.min.js.map +1 -0
- package/dist/demo.html +1 -0
- package/examples/App.vue +137 -0
- package/package.json +50 -41
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/{dist → src}/data-source/data-source.ts +16 -14
- package/{dist → src}/iam/iam.ts +2 -4
- package/{dist → src}/iam/user.vue +19 -16
- package/src/index.js +48 -0
- package/src/iview-ext/fast-iview-table.ts +131 -0
- package/src/iview-ext/fast-iview-table.vue +67 -0
- package/{dist/iView-ext/fast-iview-table → src/iview-ext}/list.ts +11 -12
- package/{dist/table-selector → src/iview-ext}/table-selector.vue +17 -12
- package/{dist/iView-ext → src/iview-ext}/tips.vue +5 -2
- package/src/main.ts +7 -0
- package/src/shims-tsx.d.ts +11 -0
- package/{dist → src}/shims-vue.d.ts +4 -4
- package/src/style/common-functions.less +286 -0
- package/src/style/reset.less +19 -0
- package/src/style/reset2.less +49 -0
- package/tsconfig.json +40 -0
- package/vue.config.js +14 -0
- package/LICENSE +0 -201
- package/dist/api-helper/common/arg.vue +0 -46
- package/dist/api-helper/common/http-method.vue +0 -53
- package/dist/api-helper/common/input-table.vue +0 -128
- package/dist/api-helper/document/document-render.d.ts +0 -10
- package/dist/api-helper/document/document-render.js +0 -38
- package/dist/api-helper/document/document-render.js.map +0 -1
- package/dist/api-helper/document/document-render.ts +0 -35
- package/dist/api-helper/document/document-render.vue +0 -155
- package/dist/api-helper/document/document.d.ts +0 -31
- package/dist/api-helper/document/document.js +0 -55
- package/dist/api-helper/document/document.js.map +0 -1
- package/dist/api-helper/document/document.ts +0 -55
- package/dist/api-helper/document/document.vue +0 -78
- package/dist/api-helper/document/perview.vue +0 -0
- package/dist/api-helper/index.js +0 -142
- package/dist/api-helper/index.vue +0 -108
- package/dist/api-helper/request-body.vue +0 -66
- package/dist/api-helper/table.d.ts +0 -7
- package/dist/api-helper/table.js +0 -13
- package/dist/api-helper/table.js.map +0 -1
- package/dist/api-helper/table.ts +0 -10
- package/dist/api-helper/table.vue +0 -103
- package/dist/api-helper/xhr.js +0 -100
- package/dist/api-helper2/api-helper.d.ts +0 -194
- package/dist/api-helper2/api-helper.vue +0 -144
- package/dist/api-helper2/bookmark.vue +0 -168
- package/dist/api-helper2/common/arg.vue +0 -46
- package/dist/api-helper2/common/http-method.vue +0 -53
- package/dist/api-helper2/document/document-render.vue +0 -189
- package/dist/api-helper2/document/document.vue +0 -130
- package/dist/api-helper2/document/perview.vue +0 -0
- package/dist/api-helper2/env.vue +0 -140
- package/dist/api-helper2/history.vue +0 -116
- package/dist/api-helper2/main.vue +0 -70
- package/dist/api-helper2/request-body.vue +0 -68
- package/dist/api-helper2/table.vue +0 -116
- package/dist/api-selector/api-list-dataservice.d.ts +0 -18
- package/dist/api-selector/api-list-dataservice.js +0 -209
- package/dist/api-selector/api-list-dataservice.js.map +0 -1
- package/dist/api-selector/api-list-dataservice.ts +0 -232
- package/dist/api-selector/api-list-swagger.d.ts +0 -28
- package/dist/api-selector/api-list-swagger.js +0 -179
- package/dist/api-selector/api-list-swagger.js.map +0 -1
- package/dist/api-selector/api-list-swagger.ts +0 -206
- package/dist/api-selector/api-list.d.ts +0 -80
- package/dist/api-selector/api-list.js +0 -129
- package/dist/api-selector/api-list.js.map +0 -1
- package/dist/api-selector/api-list.ts +0 -135
- package/dist/api-selector/index.vue +0 -125
- package/dist/api-selector/test-dataservice.d.ts +0 -23
- package/dist/api-selector/test-dataservice.js +0 -74
- package/dist/api-selector/test-dataservice.js.map +0 -1
- package/dist/api-selector/test-swagger.d.ts +0 -901
- package/dist/api-selector/test-swagger.js +0 -656
- package/dist/api-selector/test-swagger.js.map +0 -1
- package/dist/data-source/data-source.css +0 -44
- package/dist/data-source/data-source.d.ts +0 -14
- package/dist/data-source/data-source.html +0 -59
- package/dist/data-source/data-source.js +0 -97
- package/dist/data-source/data-source.js.map +0 -1
- package/dist/iView-ext/fast-iview-table/fast-iview-table.d.ts +0 -37
- package/dist/iView-ext/fast-iview-table/fast-iview-table.js +0 -72
- package/dist/iView-ext/fast-iview-table/fast-iview-table.js.map +0 -1
- package/dist/iView-ext/fast-iview-table/fast-iview-table.ts +0 -75
- package/dist/iView-ext/fast-iview-table/fast-iview-table.vue +0 -52
- package/dist/iView-ext/fast-iview-table/list.d.ts +0 -44
- package/dist/iView-ext/fast-iview-table/list.js +0 -97
- package/dist/iView-ext/fast-iview-table/list.js.map +0 -1
- package/dist/iam/iam.d.ts +0 -16
- package/dist/iam/iam.js +0 -54
- package/dist/iam/iam.js.map +0 -1
- package/dist/index.d.ts +0 -57
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/index.ts +0 -18
- package/dist/libs/entity.d.ts +0 -26
- package/dist/libs/entity.js +0 -1
- package/dist/libs/entity.js.map +0 -1
- package/dist/libs/iview-widgets.d.ts +0 -59
- package/dist/libs/iview-widgets.js +0 -2
- package/dist/libs/iview-widgets.js.map +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -24
- package/dist/main.js.map +0 -1
- package/dist/main.ts +0 -22
- package/dist/table-selector/table-selector.htm +0 -28
- package/dist/table-selector/table-selector.js +0 -149
- /package/{dist → src}/data-source/data-source.less +0 -0
- /package/{dist → src}/data-source/data-source.vue +0 -0
- /package/{dist → src}/libs/api-helper.d.ts +0 -0
- /package/{dist → src}/libs/api-list.d.ts +0 -0
- /package/{dist → src}/libs/common.d.ts +0 -0
- /package/{dist → src}/libs/entity.ts +0 -0
- /package/{dist → src}/libs/iview-widgets.ts +0 -0
|
@@ -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
|
-
};
|
|
@@ -1,144 +0,0 @@
|
|
|
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>
|
|
@@ -1,168 +0,0 @@
|
|
|
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>
|
|
@@ -1,46 +0,0 @@
|
|
|
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>
|
|
@@ -1,53 +0,0 @@
|
|
|
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>
|