ap-dev 1.1.0 → 1.1.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.
- package/dev/ApiPanel/menus.js +8 -11
- package/dev/ApiPanel/modules/ApiAAA.vue +29 -0
- package/dev/ApiPanel/modules/ApiCss.vue +32 -0
- package/dev/ApiPanel/modules/ApiDcOrgController.vue +94 -4
- package/dev/ApiPanel/modules/ApiForm.vue +29 -0
- package/dev/ApiPanel/modules/ApiGrid.vue +13 -9
- package/dev/ApiPanel/modules/ApiLayout.vue +19 -228
- package/dev/ApiPanel/modules/ApiRequest.vue +5 -1
- package/dev/ApiPanel/tabs/ApiApAsideTree.vue +303 -0
- package/dev/ApiPanel/{modules → tabs}/ApiApSearchPick.vue +0 -0
- package/dev/ApiPanel/tabs/ApiBaseLayout.vue +238 -0
- package/dev/ApiPanel/tabs/ApiCssFlex.vue +255 -0
- package/dev/ApiPanel/tabs/ApiCssForm.vue +32 -0
- package/dev/ApiPanel/tabs/ApiCssOther.vue +32 -0
- package/dev/ApiPanel/{modules → tabs}/ApiFormSearchTree.vue +0 -0
- package/dev/TemplatePanel/index.vue +3 -2
- package/package.json +1 -1
- package/dev/ApiPanel/modules/ApiStyle.vue +0 -60
package/dev/ApiPanel/menus.js
CHANGED
|
@@ -22,22 +22,19 @@ const menus = [
|
|
|
22
22
|
children: [
|
|
23
23
|
{
|
|
24
24
|
id: 'ApiLayout',
|
|
25
|
-
label: '2.1
|
|
25
|
+
label: '2.1 布局相关组件'
|
|
26
26
|
}, {
|
|
27
27
|
id: 'ApiGrid',
|
|
28
28
|
label: '2.2 表格组件'
|
|
29
|
+
},{
|
|
30
|
+
id: 'ApiRequest',
|
|
31
|
+
label: '2.3 request'
|
|
29
32
|
}, {
|
|
30
33
|
id: 'ApiApButton',
|
|
31
|
-
label: '2.
|
|
32
|
-
}, {
|
|
33
|
-
id: 'ApiFormSearchTree',
|
|
34
|
-
label: '2.4 表单-树查询'
|
|
34
|
+
label: '2.4 按钮组件'
|
|
35
35
|
}, {
|
|
36
|
-
id: '
|
|
37
|
-
label: '2.5
|
|
38
|
-
},{
|
|
39
|
-
id: 'ApiRequest',
|
|
40
|
-
label: '2.6 request'
|
|
36
|
+
id: 'ApiForm',
|
|
37
|
+
label: '2.5 表单相关组件'
|
|
41
38
|
}]
|
|
42
39
|
}, {
|
|
43
40
|
id: 'ApiDefault',
|
|
@@ -61,7 +58,7 @@ const menus = [
|
|
|
61
58
|
label: '四、前端规范',
|
|
62
59
|
children: [
|
|
63
60
|
{
|
|
64
|
-
id: '
|
|
61
|
+
id: 'ApiCss',
|
|
65
62
|
label: '4.1 通用CSS'
|
|
66
63
|
},{
|
|
67
64
|
id: 'ApiColor',
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<api-tabs :options.sync="opts"></api-tabs>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ApiTabs from './../components/ApiTabs'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "ApiAAA",
|
|
10
|
+
components: {ApiTabs},
|
|
11
|
+
data() {
|
|
12
|
+
let opts = [
|
|
13
|
+
{
|
|
14
|
+
label: "1.测试",
|
|
15
|
+
component: "ApiTest"
|
|
16
|
+
},{
|
|
17
|
+
label: "2.测试",
|
|
18
|
+
component: "ApiTest"
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
return {
|
|
22
|
+
opts: opts
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped>
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<api-tabs :options.sync="opts"></api-tabs>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ApiTabs from './../components/ApiTabs'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "ApiCss",
|
|
10
|
+
components: {ApiTabs},
|
|
11
|
+
data() {
|
|
12
|
+
let opts = [
|
|
13
|
+
{
|
|
14
|
+
label: "1.弹性盒子",
|
|
15
|
+
component: "ApiCssFlex"
|
|
16
|
+
},{
|
|
17
|
+
label: "2.表单",
|
|
18
|
+
component: "ApiCssForm"
|
|
19
|
+
},{
|
|
20
|
+
label: "3.其他",
|
|
21
|
+
component: "ApiCssOther"
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
return {
|
|
25
|
+
opts: opts
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style scoped>
|
|
32
|
+
</style>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<b>Method</b>: POST<br>
|
|
16
16
|
<b>说明</b>:只获取<span class="api-code">启用</span>组织部门数据<br>
|
|
17
17
|
</api-content>
|
|
18
|
-
<api-tittle-2>3
|
|
18
|
+
<api-tittle-2>3、获取启用组织部门简化信息</api-tittle-2>
|
|
19
19
|
<api-content>
|
|
20
20
|
<b>Url</b>: /dc/open/org/getEnableSimplifyOrgList<br>
|
|
21
21
|
<b>Method</b>: POST<br>
|
|
@@ -27,6 +27,18 @@
|
|
|
27
27
|
<b>Method</b>: POST<br>
|
|
28
28
|
<b>说明</b>:使用表格分页形式获取全部组织部门数据<br>
|
|
29
29
|
</api-content>
|
|
30
|
+
<api-tittle-2>5、获取启用厂别信息</api-tittle-2>
|
|
31
|
+
<api-content>
|
|
32
|
+
<b>Url</b>: /dc/open/org/getEnableFactList<br>
|
|
33
|
+
<b>Method</b>: POST<br>
|
|
34
|
+
<b>说明</b>:只获取<span class="api-code">启用</span>厂别<span class="api-code">(attr为4(厂别),flagA为1(生产单位))</span>数据<br>
|
|
35
|
+
</api-content>
|
|
36
|
+
<api-tittle-2>6、获取启用厂别简化信息</api-tittle-2>
|
|
37
|
+
<api-content>
|
|
38
|
+
<b>Url</b>: /dc/open/org/getEnableSimplifyFactList<br>
|
|
39
|
+
<b>Method</b>: POST<br>
|
|
40
|
+
<b>说明</b>:只获取<span class="api-code">启用</span>厂别<span class="api-code">(attr为4(厂别),flagA为1(生产单位))</span>,且服务器<span class="api-code">只返回必要字段(fdId,fdCompanyId,fdParentId,fdName)</span><br>
|
|
41
|
+
</api-content>
|
|
30
42
|
<api-tittle-1>共用参数:</api-tittle-1>
|
|
31
43
|
<api-table :data="orgDataData" :columns="dataCols" />
|
|
32
44
|
</div>
|
|
@@ -57,6 +69,12 @@
|
|
|
57
69
|
<b>Method</b>: POST<br>
|
|
58
70
|
<b>说明</b>:使用表格分页形式获取<span class="api-code">启用</span>组织人员数据<br>
|
|
59
71
|
</api-content>
|
|
72
|
+
<api-tittle-2>5、获取启用组织人员简化信息</api-tittle-2>
|
|
73
|
+
<api-content>
|
|
74
|
+
<b>Url</b>: /dc/open/person/getEnableSimplifyPersonList<br>
|
|
75
|
+
<b>Method</b>: POST<br>
|
|
76
|
+
<b>说明</b>:只获取<span class="api-code">启用</span>组织人员数据,且服务器<span class="api-code">只返回必要字段(fdId,fdCompanyId,fdNo,fdName,fdFullName,fdDeptId,fdDeptCode,fdDeptName)</span><br>
|
|
77
|
+
</api-content>
|
|
60
78
|
<api-tittle-1>共用参数:</api-tittle-1>
|
|
61
79
|
<api-table :data="personDataData" :columns="dataCols" />
|
|
62
80
|
</div>
|
|
@@ -97,6 +115,26 @@ export default {
|
|
|
97
115
|
default: '',
|
|
98
116
|
memo: '多个父节点Id拼接(使用“,”拼接)'
|
|
99
117
|
}, {
|
|
118
|
+
name: 'factNo',
|
|
119
|
+
type: '字符串',
|
|
120
|
+
default: '',
|
|
121
|
+
memo: '厂别Id'
|
|
122
|
+
}, {
|
|
123
|
+
name: 'factNos',
|
|
124
|
+
type: '字符串',
|
|
125
|
+
default: '',
|
|
126
|
+
memo: '多个厂别Id拼接(使用“,”拼接)'
|
|
127
|
+
}, {
|
|
128
|
+
name: 'classNo',
|
|
129
|
+
type: '字符串',
|
|
130
|
+
default: '',
|
|
131
|
+
memo: '课别Id'
|
|
132
|
+
}, {
|
|
133
|
+
name: 'classNos',
|
|
134
|
+
type: '字符串',
|
|
135
|
+
default: '',
|
|
136
|
+
memo: '多个课别Id拼接(使用“,”拼接)'
|
|
137
|
+
}, {
|
|
100
138
|
name: 'deptId',
|
|
101
139
|
type: '字符串',
|
|
102
140
|
default: '',
|
|
@@ -107,11 +145,52 @@ export default {
|
|
|
107
145
|
default: '',
|
|
108
146
|
memo: '多个部门Id拼接(使用“,”拼接)'
|
|
109
147
|
}, {
|
|
148
|
+
name: 'attr',
|
|
149
|
+
type: '字符串',
|
|
150
|
+
default: '',
|
|
151
|
+
memo: '部门属性'
|
|
152
|
+
}, {
|
|
153
|
+
name: 'attrs',
|
|
154
|
+
type: '字符串',
|
|
155
|
+
default: '',
|
|
156
|
+
memo: '多个部门属性拼接(使用“,”拼接)'
|
|
157
|
+
}, {
|
|
158
|
+
name: 'type',
|
|
159
|
+
type: '字符串',
|
|
160
|
+
default: '',
|
|
161
|
+
memo: '部门类型'
|
|
162
|
+
}, {
|
|
163
|
+
name: 'types',
|
|
164
|
+
type: '字符串',
|
|
165
|
+
default: '',
|
|
166
|
+
memo: '多个部门类型拼接(使用“,”拼接)'
|
|
167
|
+
}, {
|
|
168
|
+
name: 'flagA',
|
|
169
|
+
type: '字符串',
|
|
170
|
+
default: '',
|
|
171
|
+
memo: '部门标识A'
|
|
172
|
+
}, {
|
|
173
|
+
name: 'flagAs',
|
|
174
|
+
type: '字符串',
|
|
175
|
+
default: '',
|
|
176
|
+
memo: '多个部门标识A拼接(使用“,”拼接)'
|
|
177
|
+
}, {
|
|
110
178
|
name: 'disabled',
|
|
111
179
|
type: '数值',
|
|
112
180
|
default: '',
|
|
113
181
|
memo: '是否禁用<span class="api-code">(0:启用,1:禁用)</span>'
|
|
114
|
-
}
|
|
182
|
+
}, {
|
|
183
|
+
name: 'listType',
|
|
184
|
+
type: '字符串',
|
|
185
|
+
default: 'model',
|
|
186
|
+
memo: '返回数类型,默认返回Model对象列表<span class="api-code">(keyVale:返回键值对列表)</span>'
|
|
187
|
+
}, {
|
|
188
|
+
name: 'keyValueType',
|
|
189
|
+
type: '字符串',
|
|
190
|
+
default: 'fdId',
|
|
191
|
+
memo: '键值对类型,默认以fdId作为值<span class="api-code">(fdCode:以fdCode作为值)</span>,fdName作为键<br/>' +
|
|
192
|
+
'<span class="api-memo">listType为KeyValue时生效</span>'
|
|
193
|
+
}]
|
|
115
194
|
|
|
116
195
|
const personDataData = [
|
|
117
196
|
{
|
|
@@ -144,7 +223,18 @@ export default {
|
|
|
144
223
|
type: '数值',
|
|
145
224
|
default: '',
|
|
146
225
|
memo: '是否禁用<span class="api-code">(0:启用,1:禁用)</span>'
|
|
147
|
-
}
|
|
226
|
+
}, {
|
|
227
|
+
name: 'listType',
|
|
228
|
+
type: '字符串',
|
|
229
|
+
default: 'model',
|
|
230
|
+
memo: '返回数类型,默认返回Model对象列表<span class="api-code">(keyVale:返回键值对列表)</span>'
|
|
231
|
+
}, {
|
|
232
|
+
name: 'keyValueType',
|
|
233
|
+
type: '字符串',
|
|
234
|
+
default: 'fdId',
|
|
235
|
+
memo: '键值对类型,默认以fdId作为值<span class="api-code">(fdNo:以fdNo作为值)</span>,fdName作为键<br/>' +
|
|
236
|
+
'<span class="api-memo">listType为KeyValue时生效</span>'
|
|
237
|
+
}]
|
|
148
238
|
|
|
149
239
|
return {
|
|
150
240
|
activeName: 'orgController',
|
|
@@ -158,4 +248,4 @@ export default {
|
|
|
158
248
|
|
|
159
249
|
<style scoped>
|
|
160
250
|
|
|
161
|
-
</style>
|
|
251
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<api-tabs :options.sync="opts"></api-tabs>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ApiTabs from './../components/ApiTabs'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "ApiForm",
|
|
10
|
+
components: {ApiTabs},
|
|
11
|
+
data() {
|
|
12
|
+
let opts = [
|
|
13
|
+
{
|
|
14
|
+
label: "1.树查询",
|
|
15
|
+
component: "ApiFormSearchTree"
|
|
16
|
+
}, {
|
|
17
|
+
label: "2.树-表选择",
|
|
18
|
+
component: "ApiApSearchPick"
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
return {
|
|
22
|
+
opts: opts
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped>
|
|
29
|
+
</style>
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
</el-radio-group>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="flex-1 api-grid-tab-ctn-table">
|
|
19
|
-
<api-table
|
|
20
|
-
:data="gridAttrData"
|
|
19
|
+
<api-table
|
|
20
|
+
:data="gridAttrData"
|
|
21
21
|
:columns="gridAttrCols"
|
|
22
|
-
:span-method="gridSpanMethod"
|
|
22
|
+
:span-method="gridSpanMethod"
|
|
23
23
|
/>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
@@ -1224,9 +1224,9 @@ searchPickerParamsMain: (row, col, selectedNode) => {
|
|
|
1224
1224
|
searchPickerUrlMain: "/xxx",
|
|
1225
1225
|
searchPickerRenderKey: {idKey:"fdTypeId"},
|
|
1226
1226
|
searchPickerSelectMultipleMain: true,
|
|
1227
|
-
searchPickerConfirm: (row,
|
|
1228
|
-
row.fdTypeId =
|
|
1229
|
-
row.fdTypeName =
|
|
1227
|
+
searchPickerConfirm: (row, selectedRows) => {
|
|
1228
|
+
row.fdTypeId = selectedRows[0].fdId;
|
|
1229
|
+
row.fdTypeName = selectedRows[0].fdName;
|
|
1230
1230
|
return true;
|
|
1231
1231
|
},
|
|
1232
1232
|
searchPickerClear: (row) => {
|
|
@@ -1359,7 +1359,11 @@ searchPickerParamsMain: (row, col, selectedNode) => {
|
|
|
1359
1359
|
name: 'clearSelected',
|
|
1360
1360
|
memo: '清空选中数据。',
|
|
1361
1361
|
code: '<span class="api-code">this.$refs.tableRef.clearSelected();</span>'
|
|
1362
|
-
}
|
|
1362
|
+
}, {
|
|
1363
|
+
name: 'clearHighlight',
|
|
1364
|
+
memo: '清空高亮背景。',
|
|
1365
|
+
code: '<span class="api-code">this.$refs.tableRef.clearHighlight();</span>'
|
|
1366
|
+
}]
|
|
1363
1367
|
const methodData_toggle = [
|
|
1364
1368
|
{
|
|
1365
1369
|
group: '触发事件',
|
|
@@ -1496,7 +1500,7 @@ searchPickerParamsMain: (row, col, selectedNode) => {
|
|
|
1496
1500
|
|
|
1497
1501
|
// 方法
|
|
1498
1502
|
const getDataRowSpan = 9
|
|
1499
|
-
const operateRowSpan =
|
|
1503
|
+
const operateRowSpan = 6
|
|
1500
1504
|
const toggleRowSpan = 5
|
|
1501
1505
|
const otherRowSpan = 1
|
|
1502
1506
|
|
|
@@ -1636,4 +1640,4 @@ searchPickerParamsMain: (row, col, selectedNode) => {
|
|
|
1636
1640
|
.api-grid /deep/ .el-tabs__content {
|
|
1637
1641
|
flex: 1;
|
|
1638
1642
|
}
|
|
1639
|
-
</style>
|
|
1643
|
+
</style>
|
|
@@ -1,238 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
<api-tittle-1>页面布局:</api-tittle-1>
|
|
4
|
-
<api-content>
|
|
5
|
-
该布局组件为element自带布局组件的增强版本。所有页面的基础布局需要使用该布局方式。
|
|
6
|
-
</api-content>
|
|
7
|
-
<api-tittle-2>一、通用布局容器</api-tittle-2>
|
|
8
|
-
<api-tittle-2>1.1 外层容器 <ap-container></api-tittle-2>
|
|
9
|
-
<api-content>
|
|
10
|
-
当子元素中包含 <ap-header> 或 <ap-footer> 时,全部子元素会垂直上下排列,否则会水平左右排列。
|
|
11
|
-
</api-content>
|
|
12
|
-
<api-tittle-2>1.2 顶栏容器 <ap-header></api-tittle-2>
|
|
13
|
-
<api-content>
|
|
14
|
-
高度默认auto,可自定义高度:
|
|
15
|
-
<api-code><ap-header height="400px"/></api-code>
|
|
16
|
-
<api-code><ap-header height="50%"/></api-code>
|
|
17
|
-
1.2.1 顶栏表单式样:覆盖表单默认式样
|
|
18
|
-
<api-code><ap-header><br>
|
|
19
|
-
<el-form class="layout-header-form"><br>
|
|
20
|
-
<el-form-item class="layout-header-form-item"><el-form-item><br>
|
|
21
|
-
<el-form><br>
|
|
22
|
-
<ap-header>
|
|
23
|
-
</api-code>
|
|
24
|
-
</api-content>
|
|
25
|
-
<api-tittle-2>1.3 侧边容器 <ap-aside></api-tittle-2>
|
|
26
|
-
<api-content>
|
|
27
|
-
宽度默认300px,可自定义高度:
|
|
28
|
-
<api-code><ap-aside width="500px"/> <br><ap-aside width="50%"/></api-code>
|
|
29
|
-
注:<ap-aside>子元素默认使用flex布局、垂直排列。<br>
|
|
30
|
-
1.3.1 侧边容器常用布局方式<br>
|
|
31
|
-
<api-code>
|
|
32
|
-
<ap-aside><br>
|
|
33
|
-
<div class="layout-aside-header"><br>
|
|
34
|
-
<div class="layout-aside-header-title"> 标题 </div><br>
|
|
35
|
-
<div class="layout-aside-header-icon"> icon图表</div><br>
|
|
36
|
-
</div><br>
|
|
37
|
-
<div class="layout-aside-content">主要内容</div><br>
|
|
38
|
-
</ap-aside></api-code>
|
|
39
|
-
</api-content>
|
|
40
|
-
<api-tittle-2>1.4 主要区域容器 <ap-main></api-tittle-2>
|
|
41
|
-
<api-content>
|
|
42
|
-
主要区域容器
|
|
43
|
-
</api-content>
|
|
44
|
-
<api-tittle-2>1.5 底栏容器 <ap-footer></api-tittle-2>
|
|
45
|
-
<api-content>
|
|
46
|
-
高度默认60px,可自定义高度:
|
|
47
|
-
<api-code><ap-footer height="400px"/></api-code>
|
|
48
|
-
<api-code><ap-footer height="50%"/></api-code>
|
|
49
|
-
</api-content>
|
|
50
|
-
<api-content>
|
|
51
|
-
<br>
|
|
52
|
-
<b>注意:</b>
|
|
53
|
-
<br>1. 以上组件采用了 flex 布局,使用前请确定目标浏览器是否兼容。
|
|
54
|
-
<br>2. <ap-container> 的子元素只能是后四者,后四者的父元素也只能是 <ap-container>
|
|
55
|
-
<br>3. 除了<ap-container> ,其他四个均支持margin参数。参数固定四位,每一位表示是否有margin。
|
|
56
|
-
<br>如:<span class="api-code">margin="0111"</span>从左到右,分别表示:margin-top:0px、margin-right:10px、margin-bottom:10px、margin-left:10px
|
|
57
|
-
</api-content>
|
|
58
|
-
|
|
59
|
-
<api-tittle-2>二、常用布局</api-tittle-2>
|
|
60
|
-
<api-tittle-2>2.1 单个布局</api-tittle-2>
|
|
61
|
-
<div class="layout-ctn">
|
|
62
|
-
<div class="layout-box" style="width: 100%;height: 100%;">
|
|
63
|
-
页面内容
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
<api-content>
|
|
67
|
-
<api-code>{{ js1 }}</api-code>
|
|
68
|
-
</api-content>
|
|
69
|
-
<api-tittle-2>2.2 上下布局</api-tittle-2>
|
|
70
|
-
<div class="layout-ctn">
|
|
71
|
-
<div class="layout-box" style="width: 100%;height: 30px;">
|
|
72
|
-
header内容
|
|
73
|
-
</div>
|
|
74
|
-
<div class="layout-box" style="width: 100%;height: 65px;margin-top: 5px">
|
|
75
|
-
main内容
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
<api-content>
|
|
79
|
-
<api-code>{{ js2 }}</api-code>
|
|
80
|
-
</api-content>
|
|
81
|
-
<api-tittle-2>2.3 左右布局:</api-tittle-2>
|
|
82
|
-
<div class="layout-ctn">
|
|
83
|
-
<div class="layout-box" style="width: 50px;height: 100%;float: left">
|
|
84
|
-
左侧内容
|
|
85
|
-
</div>
|
|
86
|
-
<div class="layout-box" style="width: 145px;height: 100%;margin-left: 5px">
|
|
87
|
-
main内容
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
<api-content>
|
|
91
|
-
<api-code>{{ js3 }}</api-code>
|
|
92
|
-
</api-content>
|
|
93
|
-
<api-tittle-2>2.4 左右布局</api-tittle-2>
|
|
94
|
-
<div class="layout-ctn">
|
|
95
|
-
<div class="layout-box" style="width: 50px;height: 100%;float: left">
|
|
96
|
-
左侧内容
|
|
97
|
-
</div>
|
|
98
|
-
<div class="layout-box" style="width: 145px;height: 25px;margin-left: 5px">
|
|
99
|
-
header内容
|
|
100
|
-
</div>
|
|
101
|
-
<div class="layout-box" style="width: 145px;height: 70px;margin-left: 5px; margin-top: 5px">
|
|
102
|
-
main内容
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
<api-content>
|
|
106
|
-
<api-code>{{ js4 }}</api-code>
|
|
107
|
-
</api-content>
|
|
108
|
-
|
|
109
|
-
<api-tittle-2>2.5 上下主从布局</api-tittle-2>
|
|
110
|
-
<div class="layout-ctn">
|
|
111
|
-
<div class="layout-box" style="width: 100%;height: 20px;">
|
|
112
|
-
header内容
|
|
113
|
-
</div>
|
|
114
|
-
<div class="layout-box" style="width: 100%;height: 35px;margin-top: 5px">
|
|
115
|
-
main:主内容
|
|
116
|
-
</div>
|
|
117
|
-
<div class="layout-box" style="width: 100%;height: 35px;margin-top: 5px">
|
|
118
|
-
main:明细内容
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<api-content>
|
|
122
|
-
<api-code>{{ js5 }}</api-code>
|
|
123
|
-
</api-content>
|
|
124
|
-
<api-tittle-2>2.6 左右主从布局</api-tittle-2>
|
|
125
|
-
<div class="layout-ctn">
|
|
126
|
-
<div class="layout-box" style="width: 100%;height: 25px;">
|
|
127
|
-
header内容
|
|
128
|
-
</div>
|
|
129
|
-
<div class="layout-box" style="width: 95px;height: 70px;float: left;margin-top: 5px;">
|
|
130
|
-
main:主内容
|
|
131
|
-
</div>
|
|
132
|
-
<div class="layout-box" style="width: 100px;height: 70px;margin-left: 5px;margin-top: 5px;">
|
|
133
|
-
main:明细内容
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
<api-content>
|
|
137
|
-
<api-code>{{ js6 }}</api-code>
|
|
138
|
-
</api-content>
|
|
139
|
-
</div>
|
|
2
|
+
<api-tabs :options.sync="opts"></api-tabs>
|
|
140
3
|
</template>
|
|
141
4
|
|
|
142
5
|
<script>
|
|
143
|
-
import
|
|
6
|
+
import ApiTabs from './../components/ApiTabs'
|
|
144
7
|
|
|
145
8
|
export default {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
</ap-container>
|
|
163
|
-
</template>`
|
|
164
|
-
const js3 = `<template>
|
|
165
|
-
<ap-container>
|
|
166
|
-
<ap-aside margin="1111">左侧内容...</ap-aside>
|
|
167
|
-
<ap-main margin="1110">main内容...</ap-main>
|
|
168
|
-
</ap-container>
|
|
169
|
-
</template>`
|
|
170
|
-
const js4 = `<template>
|
|
171
|
-
<ap-container>
|
|
172
|
-
<ap-aside margin="1111">左侧内容...</ap-aside>
|
|
173
|
-
<ap-container>
|
|
174
|
-
<ap-header margin="1110">header内容...</ap-header>
|
|
175
|
-
<ap-main margin="0110">main内容...</ap-main>
|
|
176
|
-
</ap-container>
|
|
177
|
-
</ap-container>
|
|
178
|
-
</template>`
|
|
179
|
-
const js5 = `<template>
|
|
180
|
-
<ap-container>
|
|
181
|
-
<ap-header margin="1111">header内容...</ap-header>
|
|
182
|
-
<ap-container>
|
|
183
|
-
<ap-header height="50%" margin="0111">主内容...</ap-header>
|
|
184
|
-
<ap-main margin="0111">明细内容...</ap-main>
|
|
185
|
-
</ap-container>
|
|
186
|
-
</ap-container>
|
|
187
|
-
</template>
|
|
188
|
-
或:主内容和明细内容等分时
|
|
189
|
-
<template>
|
|
190
|
-
<ap-container>
|
|
191
|
-
<ap-header margin="1111">header内容...</ap-header>
|
|
192
|
-
<ap-container>
|
|
193
|
-
<ap-main margin="0111">主内容...</ap-main>
|
|
194
|
-
<ap-main margin="0111">明细内容...</ap-main>
|
|
195
|
-
</ap-container>
|
|
196
|
-
</ap-container>
|
|
197
|
-
</template>`
|
|
198
|
-
const js6 = `<template>
|
|
199
|
-
<ap-container>
|
|
200
|
-
<ap-header margin="1111">header内容...</ap-header>
|
|
201
|
-
<ap-container>
|
|
202
|
-
<ap-aside width="40%" margin="0111">主内容...</ap-aside>
|
|
203
|
-
<ap-main margin="0110">明细内容...</ap-main>
|
|
204
|
-
</ap-container>
|
|
205
|
-
</ap-container>
|
|
206
|
-
</template>
|
|
207
|
-
或:主内容和明细内容等分时
|
|
208
|
-
<template>
|
|
209
|
-
<ap-container>
|
|
210
|
-
<ap-header margin="1111">header内容...</ap-header>
|
|
211
|
-
<ap-container>
|
|
212
|
-
<ap-main margin="0111">主内容...</ap-main>
|
|
213
|
-
<ap-main margin="0110">明细内容...</ap-main>
|
|
214
|
-
</ap-container>
|
|
215
|
-
</ap-container>
|
|
216
|
-
</template>`
|
|
217
|
-
|
|
218
|
-
return { js1, js2, js3, js4, js5, js6 }
|
|
219
|
-
}
|
|
9
|
+
name: "ApiLayout.vue",
|
|
10
|
+
components: {ApiTabs},
|
|
11
|
+
data() {
|
|
12
|
+
let opts = [
|
|
13
|
+
{
|
|
14
|
+
label: "1.基础布局",
|
|
15
|
+
component: "ApiBaseLayout"
|
|
16
|
+
}, {
|
|
17
|
+
label: "2.左侧树布局",
|
|
18
|
+
component: "ApiApAsideTree"
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
return {
|
|
22
|
+
opts: opts
|
|
23
|
+
}
|
|
24
|
+
}
|
|
220
25
|
}
|
|
221
26
|
</script>
|
|
222
27
|
|
|
223
28
|
<style scoped>
|
|
224
|
-
|
|
225
|
-
width: 212px;
|
|
226
|
-
height: 112px;
|
|
227
|
-
border: 1px dashed #9E9E9E;
|
|
228
|
-
padding: 5px;
|
|
229
|
-
background-color: #e2e7ef;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.layout-box {
|
|
233
|
-
float: left;
|
|
234
|
-
font-size: 12px;
|
|
235
|
-
padding: 5px;
|
|
236
|
-
background-color: white;
|
|
237
|
-
}
|
|
238
|
-
</style>
|
|
29
|
+
</style>
|
|
@@ -37,7 +37,11 @@ export default {
|
|
|
37
37
|
method: 'post',
|
|
38
38
|
data:{}
|
|
39
39
|
}).then(response => {
|
|
40
|
+
console.log("成功返回")
|
|
41
|
+
}).catch((error) => {
|
|
42
|
+
console.log("异常处理")
|
|
40
43
|
}).finally(() => {
|
|
44
|
+
console.log("最终回调")
|
|
41
45
|
})`
|
|
42
46
|
const js2 = `import Vue from 'vue'
|
|
43
47
|
|
|
@@ -56,4 +60,4 @@ export function xxxFn() {
|
|
|
56
60
|
|
|
57
61
|
<style scoped>
|
|
58
62
|
|
|
59
|
-
</style>
|
|
63
|
+
</style>
|