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
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<api-tittle-1>左侧树组件</api-tittle-1>
|
|
4
|
+
<api-tittle-2>一、使用方法</api-tittle-2>
|
|
5
|
+
<api-code>{{ js1 }}</api-code>
|
|
6
|
+
<api-tittle-2>1、组件插槽说明:</api-tittle-2>
|
|
7
|
+
<api-code>{{ js2 }}</api-code>
|
|
8
|
+
<api-tittle-2>2、组件option参数说明:</api-tittle-2>
|
|
9
|
+
<div style="height: 1500px;width: 90%">
|
|
10
|
+
<api-table :data="methodData" :columns="methodCols" />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2 } from './../components'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'ApiApAsideTree',
|
|
20
|
+
components: {
|
|
21
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
const methodCols = [
|
|
25
|
+
{ label: '名称', prop: 'name', width: '180px' },
|
|
26
|
+
{ label: '类型', prop: 'type', width: '100px' },
|
|
27
|
+
{ label: '默认值', prop: 'default', width: '80px' },
|
|
28
|
+
{ label: '描述', prop: 'memo', minWidth: '100px' },
|
|
29
|
+
{ label: '示例代码', prop: 'code', minWidth: '100px' }]
|
|
30
|
+
const methodData = [
|
|
31
|
+
{
|
|
32
|
+
name: 'title',
|
|
33
|
+
type: '字符串',
|
|
34
|
+
default: '列表',
|
|
35
|
+
memo: `列表的标题`,
|
|
36
|
+
code: `<div class="api-code">title: "分组列表"</div>`
|
|
37
|
+
},{
|
|
38
|
+
name: 'dialogTitle',
|
|
39
|
+
type: '字符串',
|
|
40
|
+
default: '表单',
|
|
41
|
+
memo: `dialog的标题<br>
|
|
42
|
+
<span class="api-memo">注:标题会自动加"添加"或"编辑"文字前缀</span>`,
|
|
43
|
+
code: `<div class="api-code">dialogTitle: "分组",</div>`
|
|
44
|
+
},{
|
|
45
|
+
name: 'showCheckbox',
|
|
46
|
+
type: '布尔',
|
|
47
|
+
default: 'false',
|
|
48
|
+
memo: `显示checkbox选择框<br>
|
|
49
|
+
<span class="api-memo">注:支持多选时要配置</span>`,
|
|
50
|
+
code: `<div class="api-code">showCheckbox: true,</div>`
|
|
51
|
+
},{
|
|
52
|
+
name: 'toolbarBtn',
|
|
53
|
+
type: '数组',
|
|
54
|
+
default: '[]',
|
|
55
|
+
memo: `工具类的icon:包括"add", "edit", "del", "sort"。可自定义<br>
|
|
56
|
+
<span class="api-memo">注:标题会自动加"添加"或"编辑"文字前缀</span>`,
|
|
57
|
+
code: `<div class="api-code">toolbarBtn: ["add", "edit", "del", "sort",
|
|
58
|
+
{
|
|
59
|
+
icon: "el-icon-top", onClick: () => {
|
|
60
|
+
// 定义icon和onClick即可
|
|
61
|
+
console.log("自定义的icon");
|
|
62
|
+
}
|
|
63
|
+
}]</div>`
|
|
64
|
+
},{
|
|
65
|
+
name: 'onClick',
|
|
66
|
+
type: '方法',
|
|
67
|
+
default: '[]',
|
|
68
|
+
memo: `点击节点回调方法`,
|
|
69
|
+
code: `<div class="api-code">onClick: (data, node, comp) => {
|
|
70
|
+
console.log("点击节点的方法")
|
|
71
|
+
}</div>`
|
|
72
|
+
},{
|
|
73
|
+
name: 'onCheck',
|
|
74
|
+
type: '方法',
|
|
75
|
+
default: '[]',
|
|
76
|
+
memo: `点击选择框回调<br>
|
|
77
|
+
<span class="api-memo">注:标题会自动加"添加"或"编辑"文字前缀</span>`,
|
|
78
|
+
code: `<div class="api-code">onCheck: (data, node, comp, halfCheckedKeys, checkedKeys) => {
|
|
79
|
+
// 多选值
|
|
80
|
+
},</div>`
|
|
81
|
+
},{
|
|
82
|
+
name: 'loadOptions',
|
|
83
|
+
type: '对象',
|
|
84
|
+
default: '',
|
|
85
|
+
memo: `数据加载参数<br>
|
|
86
|
+
<span class="api-memo">注:对象内容见示例。</span>`,
|
|
87
|
+
code: `<div class="api-code">loadOptions: {
|
|
88
|
+
url: "/xxx",// 数据请求路径
|
|
89
|
+
data: () => {
|
|
90
|
+
// 数据请求参数
|
|
91
|
+
return {}
|
|
92
|
+
},
|
|
93
|
+
success: (response) => {
|
|
94
|
+
console.log("数据请求成功回调")
|
|
95
|
+
},
|
|
96
|
+
error() {
|
|
97
|
+
console.log("数据请求失败回调")
|
|
98
|
+
},
|
|
99
|
+
// 树值映射:默认如下
|
|
100
|
+
treeKey: {
|
|
101
|
+
idKey: "fdId", // id
|
|
102
|
+
parentKey: "fdParentId", // 父id
|
|
103
|
+
sortKey: "fdSort", // 排序
|
|
104
|
+
childrenKey: "children", // 子节点参数
|
|
105
|
+
label: "fdName" // 显示参数
|
|
106
|
+
},
|
|
107
|
+
},</div>`
|
|
108
|
+
},{
|
|
109
|
+
name: 'editOptions',
|
|
110
|
+
type: '对象',
|
|
111
|
+
default: '',
|
|
112
|
+
memo: `编辑表单参数<br>
|
|
113
|
+
<span class="api-memo">注:标题会自动加"添加"或"编辑"文字前缀</span>`,
|
|
114
|
+
code: `editOptions: {
|
|
115
|
+
url: "/xxx",// 数据请求路径
|
|
116
|
+
data: (node) => {
|
|
117
|
+
// 数据请求参数
|
|
118
|
+
return {
|
|
119
|
+
fdId: node.fdId
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
},`
|
|
123
|
+
},{
|
|
124
|
+
name: 'insertUrl',
|
|
125
|
+
type: '字符串',
|
|
126
|
+
default: '',
|
|
127
|
+
memo: `数据插入路径`,
|
|
128
|
+
code: `insertUrl: "/apm/xxx",`
|
|
129
|
+
},{
|
|
130
|
+
name: 'insertData',
|
|
131
|
+
type: '方法',
|
|
132
|
+
default: '',
|
|
133
|
+
memo: `数据插入参数`,
|
|
134
|
+
code: `insertData: () => {
|
|
135
|
+
return this.dialogForm
|
|
136
|
+
},`
|
|
137
|
+
},{
|
|
138
|
+
name: 'deleteUrl',
|
|
139
|
+
type: '字符串',
|
|
140
|
+
default: '',
|
|
141
|
+
memo: `数据删除路径`,
|
|
142
|
+
code: `deleteUrl: "/apm/xxx",`
|
|
143
|
+
},{
|
|
144
|
+
name: 'deleteData',
|
|
145
|
+
type: '方法',
|
|
146
|
+
default: '',
|
|
147
|
+
memo: `数据删除参数`,
|
|
148
|
+
code: `deleteData: () => {
|
|
149
|
+
return this.dialogForm
|
|
150
|
+
},`
|
|
151
|
+
},{
|
|
152
|
+
name: 'updateSortUrl',
|
|
153
|
+
type: '字符串',
|
|
154
|
+
default: '',
|
|
155
|
+
memo: `单个排序更新`,
|
|
156
|
+
code: `updateSortUrl: "/apm/xxx",`
|
|
157
|
+
},{
|
|
158
|
+
name: 'updateSortListUrl',
|
|
159
|
+
type: '字符串',
|
|
160
|
+
default: '',
|
|
161
|
+
memo: `一键排序更加`,
|
|
162
|
+
code: `updateSortListUrl: "/apm/xxx",`
|
|
163
|
+
},{
|
|
164
|
+
name: 'sortByTree',
|
|
165
|
+
type: '布尔',
|
|
166
|
+
default: 'true',
|
|
167
|
+
memo: `一键排序方式:true按树顺序 false按树节点顺序`,
|
|
168
|
+
code: `sortByTree: false,`
|
|
169
|
+
},{
|
|
170
|
+
name: 'resetForm',
|
|
171
|
+
type: '方法',
|
|
172
|
+
default: '',
|
|
173
|
+
memo: `重置表单<br>
|
|
174
|
+
<span class="api-memo">注:打开添加dialog需要重置表单</span>`,
|
|
175
|
+
code: `resetForm: () => {
|
|
176
|
+
this.dialogForm = {
|
|
177
|
+
fdId: '',
|
|
178
|
+
fdParentId: '',
|
|
179
|
+
fdName: '',
|
|
180
|
+
fdCode: '',
|
|
181
|
+
fdIsGroup: 0,
|
|
182
|
+
fdType: 0,
|
|
183
|
+
fdSort: 0
|
|
184
|
+
};
|
|
185
|
+
}`
|
|
186
|
+
},{
|
|
187
|
+
name: 'afterOpenAddDialog',
|
|
188
|
+
type: '方法',
|
|
189
|
+
default: '',
|
|
190
|
+
memo: `打开添加dialog后回调<br>
|
|
191
|
+
<span class="api-memo">注:可用于设定表单的初始默认值</span>`,
|
|
192
|
+
code: `afterOpenAddDialog: (node) => {
|
|
193
|
+
// 打开dialog后设定默认值
|
|
194
|
+
this.dialogForm.fdParentId = node.fdId;
|
|
195
|
+
},`
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
const js1 = `1、组件定义
|
|
199
|
+
<ap-aside-tree :options.sync="treeOptions">
|
|
200
|
+
<el-form slot="form" ref="dialogForm"
|
|
201
|
+
:inline="true"
|
|
202
|
+
:model="dialogForm" :rules="dialogFormRules" label-width="80px">
|
|
203
|
+
<el-form-item label="名称" prop="fdName">
|
|
204
|
+
<el-input v-model="dialogForm.fdName"></el-input>
|
|
205
|
+
</el-form-item>
|
|
206
|
+
<el-form-item label="排序" prop="fdSort">
|
|
207
|
+
<el-input-number v-model="dialogForm.fdSort" controls-position="right"></el-input-number>
|
|
208
|
+
</el-form-item>
|
|
209
|
+
</el-form>
|
|
210
|
+
<span slot="tree" slot-scope="scope">
|
|
211
|
+
{{ scope.data.fdName }}
|
|
212
|
+
</span>
|
|
213
|
+
</ap-aside-tree>
|
|
214
|
+
2、treeOptions参数定义
|
|
215
|
+
methods: {
|
|
216
|
+
getTreeOption() {
|
|
217
|
+
let treeOptions = {
|
|
218
|
+
title: "分组列表",
|
|
219
|
+
toolbarBtn: ["add", "edit", "del", "sort",
|
|
220
|
+
{
|
|
221
|
+
icon: "el-icon-top", onClick: () => {
|
|
222
|
+
console.log("自定义icon");
|
|
223
|
+
}
|
|
224
|
+
}],
|
|
225
|
+
dialogTitle: "分组",
|
|
226
|
+
onClick: (data, node, comp) => {},
|
|
227
|
+
loadOptions: {
|
|
228
|
+
url: "/apm/xxxx",
|
|
229
|
+
data: {},
|
|
230
|
+
success: (response) => {},
|
|
231
|
+
error() {},
|
|
232
|
+
treeKey: {
|
|
233
|
+
idKey: "fdId",
|
|
234
|
+
parentKey: "fdParentId",
|
|
235
|
+
childrenKey: "children",
|
|
236
|
+
label: "fdName"
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
editOptions: {
|
|
240
|
+
url: "/apm/xxxx",
|
|
241
|
+
data: (node) => {
|
|
242
|
+
console.log(node);
|
|
243
|
+
return {}
|
|
244
|
+
},
|
|
245
|
+
success: (response) => {},
|
|
246
|
+
error() {
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
insertUrl: "/apm/xxx",
|
|
251
|
+
insertData: () => {
|
|
252
|
+
return this.dialogForm
|
|
253
|
+
},
|
|
254
|
+
updateUrl: "/apm/xxx",
|
|
255
|
+
updateData: () => {
|
|
256
|
+
return this.dialogForm
|
|
257
|
+
},
|
|
258
|
+
deleteUrl: "/apm/xxx",
|
|
259
|
+
deleteData: (node) => {
|
|
260
|
+
return {
|
|
261
|
+
fdId: node.fdId
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
updateSortUrl: '/apm/xxx',
|
|
265
|
+
updateSortListUrl: '/apm/xxx',
|
|
266
|
+
resetForm: () => {
|
|
267
|
+
this.dialogForm = {
|
|
268
|
+
fdId: '',
|
|
269
|
+
fdParentId: '',
|
|
270
|
+
fdName: '',
|
|
271
|
+
fdSort: 0
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
afterOpenAddDialog: (node) => {
|
|
275
|
+
this.dialogForm.fdParentId = node.fdId;
|
|
276
|
+
},
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
return treeOptions;
|
|
280
|
+
}
|
|
281
|
+
}`
|
|
282
|
+
const js2 = `// ApAsideTree有两个插槽
|
|
283
|
+
1、dialog插槽:
|
|
284
|
+
格式:<el-form slot="form" ...>...</el-form>
|
|
285
|
+
注意:[slot="form"]必填
|
|
286
|
+
|
|
287
|
+
2、树节点插槽:
|
|
288
|
+
格式:<span slot="tree" slot-scope="scope">{{ scope.data.fdName }}</span>
|
|
289
|
+
注意:[slot="tree" slot-scope="scope"]必填,使用scope.data可以获取节点的数据。
|
|
290
|
+
`
|
|
291
|
+
return {
|
|
292
|
+
methodData,
|
|
293
|
+
methodCols,
|
|
294
|
+
js1,
|
|
295
|
+
js2
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
methods: {}
|
|
299
|
+
}
|
|
300
|
+
</script>
|
|
301
|
+
|
|
302
|
+
<style scoped>
|
|
303
|
+
</style>
|
|
File without changes
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
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>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<script>
|
|
143
|
+
import { ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2 } from './../components'
|
|
144
|
+
|
|
145
|
+
export default {
|
|
146
|
+
name: 'ApiLayout',
|
|
147
|
+
components: {
|
|
148
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
|
|
149
|
+
},
|
|
150
|
+
data() {
|
|
151
|
+
const js1 = `<template>
|
|
152
|
+
<ap-container>
|
|
153
|
+
<ap-main margin="1111">
|
|
154
|
+
main内容...
|
|
155
|
+
</ap-main>
|
|
156
|
+
</ap-container>
|
|
157
|
+
</template>`
|
|
158
|
+
const js2 = `<template>
|
|
159
|
+
<ap-container>
|
|
160
|
+
<ap-header margin="1111">header内容</ap-header>
|
|
161
|
+
<ap-main margin="0111">main内容</ap-main>
|
|
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
|
+
}
|
|
220
|
+
}
|
|
221
|
+
</script>
|
|
222
|
+
|
|
223
|
+
<style scoped>
|
|
224
|
+
.layout-ctn {
|
|
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>
|