bi-element-ui 1.0.3 → 1.0.5
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/lib/bi-element-ui.common.js +357 -344
- package/lib/bi-element-ui.umd.js +357 -344
- package/lib/bi-element-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/table.js +1 -4
- package/src/views/Table.vue +265 -158
package/src/views/Table.vue
CHANGED
@@ -1,173 +1,280 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
+
<template v-if="false">
|
4
|
+
<div
|
5
|
+
class="example-table-box"
|
6
|
+
style="padding-top: 20px"
|
7
|
+
>
|
8
|
+
<p>测试表格</p>
|
9
|
+
<div class="test">
|
10
|
+
<el-table
|
11
|
+
v-sticky-header="{offsetTop:0}"
|
12
|
+
v-sticky-footer
|
13
|
+
:data="data"
|
14
|
+
show-summary
|
15
|
+
>
|
16
|
+
<el-table-column
|
17
|
+
label="日期"
|
18
|
+
prop="date"
|
19
|
+
width="160"
|
20
|
+
></el-table-column>
|
21
|
+
<el-table-column
|
22
|
+
label="姓名"
|
23
|
+
prop="name"
|
24
|
+
></el-table-column>
|
25
|
+
<el-table-column
|
26
|
+
label="省份"
|
27
|
+
prop="province"
|
28
|
+
></el-table-column>
|
29
|
+
<el-table-column
|
30
|
+
label="市区"
|
31
|
+
prop="city"
|
32
|
+
></el-table-column>
|
33
|
+
<el-table-column
|
34
|
+
label="地址"
|
35
|
+
prop="address"
|
36
|
+
min-width="200"
|
37
|
+
></el-table-column>
|
38
|
+
<el-table-column
|
39
|
+
label="地址"
|
40
|
+
prop="address2"
|
41
|
+
min-width="200"
|
42
|
+
></el-table-column>
|
43
|
+
<el-table-column
|
44
|
+
label="邮编"
|
45
|
+
prop="zip"
|
46
|
+
fixed="right"
|
47
|
+
></el-table-column>
|
48
|
+
</el-table>
|
49
|
+
</div>
|
3
50
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
>
|
8
|
-
<p>测试表格</p>
|
9
|
-
<div class="test">
|
10
|
-
<el-table
|
11
|
-
v-sticky-header="{offsetTop:0}"
|
12
|
-
v-sticky-footer
|
51
|
+
<bi-table
|
52
|
+
border
|
53
|
+
stripe
|
13
54
|
:data="data"
|
55
|
+
:column="basicColumn"
|
14
56
|
show-summary
|
15
|
-
|
16
|
-
|
17
|
-
label="日期"
|
18
|
-
prop="date"
|
19
|
-
width="160"
|
20
|
-
></el-table-column>
|
21
|
-
<el-table-column
|
22
|
-
label="姓名"
|
23
|
-
prop="name"
|
24
|
-
></el-table-column>
|
25
|
-
<el-table-column
|
26
|
-
label="省份"
|
27
|
-
prop="province"
|
28
|
-
></el-table-column>
|
29
|
-
<el-table-column
|
30
|
-
label="市区"
|
31
|
-
prop="city"
|
32
|
-
></el-table-column>
|
33
|
-
<el-table-column
|
34
|
-
label="地址"
|
35
|
-
prop="address"
|
36
|
-
min-width="200"
|
37
|
-
></el-table-column>
|
38
|
-
<el-table-column
|
39
|
-
label="地址"
|
40
|
-
prop="address2"
|
41
|
-
min-width="200"
|
42
|
-
></el-table-column>
|
43
|
-
<el-table-column
|
44
|
-
label="邮编"
|
45
|
-
prop="zip"
|
46
|
-
fixed="right"
|
47
|
-
></el-table-column>
|
48
|
-
</el-table>
|
57
|
+
:summary-method="getSummaries"
|
58
|
+
></bi-table>
|
49
59
|
</div>
|
60
|
+
<el-button
|
61
|
+
type=""
|
62
|
+
@click="search"
|
63
|
+
>搜索</el-button>
|
50
64
|
|
51
|
-
<
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
65
|
+
<div
|
66
|
+
class="example-table-box"
|
67
|
+
style="padding-top: 20px"
|
68
|
+
>
|
69
|
+
<p>sticky表格</p>
|
70
|
+
<bi-table
|
71
|
+
ref="table"
|
72
|
+
border
|
73
|
+
stripe
|
74
|
+
fixed="sticky"
|
75
|
+
:sticky-top="0"
|
76
|
+
:data="data"
|
77
|
+
:column="basicColumn"
|
78
|
+
show-summary
|
79
|
+
:summary-method="getSummaries"
|
80
|
+
></bi-table>
|
81
|
+
</div>
|
64
82
|
|
65
|
-
|
66
|
-
class="example-table-box"
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
83
|
+
<div style="padding-bottom:600px"></div>
|
84
|
+
<div class="example-table-box">
|
85
|
+
<p>普通固定表头</p>
|
86
|
+
<bi-table
|
87
|
+
border
|
88
|
+
stripe
|
89
|
+
fixed="fullscreen"
|
90
|
+
:data="data"
|
91
|
+
:column="fullscreenColumn"
|
92
|
+
max-height="200px"
|
93
|
+
fixed-offset="60"
|
94
|
+
pagination
|
95
|
+
:auto-scroll="false"
|
96
|
+
:total="100"
|
97
|
+
:page.sync="listQuery.page"
|
98
|
+
:limit.sync="listQuery.limit"
|
99
|
+
show-summary
|
100
|
+
@selection-change="selectionChange"
|
101
|
+
@pagination="getList"
|
102
|
+
></bi-table>
|
103
|
+
</div>
|
82
104
|
|
83
|
-
|
105
|
+
<div class="example-table-box">
|
106
|
+
<p>sticky-tabs表格</p>
|
107
|
+
<el-tabs>
|
108
|
+
<el-tab-pane label="tabs">
|
109
|
+
<div style="height:300px;background:#eee"></div>
|
110
|
+
<bi-table
|
111
|
+
border
|
112
|
+
stripe
|
113
|
+
fixed="sticky"
|
114
|
+
:data="data"
|
115
|
+
:column="fullscreenColumn"
|
116
|
+
:summary-method="getSummaries"
|
117
|
+
show-summary
|
118
|
+
></bi-table>
|
119
|
+
</el-tab-pane>
|
120
|
+
</el-tabs>
|
121
|
+
</div>
|
122
|
+
<div class="example-table-box">
|
123
|
+
<p>tooltipIcon在表格内的组件使用</p>
|
124
|
+
<bi-table
|
125
|
+
border
|
126
|
+
stripe
|
127
|
+
fixed="sticky"
|
128
|
+
:data="minData"
|
129
|
+
:column="renderColumn2"
|
130
|
+
>
|
131
|
+
<template v-slot:address_header>
|
132
|
+
<BiTooltipIcon
|
133
|
+
label="地址"
|
134
|
+
content="这是props继承的写法,<br/>可根据不同需求配置属性"
|
135
|
+
placement="right"
|
136
|
+
icon="el-icon-warning-outline"
|
137
|
+
effect="light"
|
138
|
+
></BiTooltipIcon>
|
139
|
+
</template>
|
140
|
+
<template v-slot:province="{row}">
|
141
|
+
<BiTooltipIcon
|
142
|
+
:label="row.province"
|
143
|
+
content="这是props继承的写法,<br/>可根据不同需求配置属性"
|
144
|
+
placement="right"
|
145
|
+
icon="el-icon-warning-outline"
|
146
|
+
effect="light"
|
147
|
+
></BiTooltipIcon>
|
148
|
+
</template>
|
149
|
+
<template v-slot:province_header>
|
150
|
+
<BiTooltipIcon
|
151
|
+
label="市区"
|
152
|
+
content="这是props继承的写法,<br/>可根据不同需求配置属性"
|
153
|
+
placement="right"
|
154
|
+
icon="el-icon-warning-outline"
|
155
|
+
effect="light"
|
156
|
+
></BiTooltipIcon>
|
157
|
+
</template>
|
158
|
+
<template v-slot:city="{row}">
|
159
|
+
<BiTooltipIcon placement="right">
|
160
|
+
<template slot="tip-label"><span>{{ row.city }}</span></template>
|
161
|
+
<template slot="tip-content"><span>这是slot默认替换的写法,可用自定义的内容配合tooltip使用</span></template>
|
162
|
+
<template slot="tip-icon">
|
163
|
+
<i
|
164
|
+
class="el-icon-chat-dot-round"
|
165
|
+
style="color:#ff6700"
|
166
|
+
></i>
|
167
|
+
</template>
|
168
|
+
</BiTooltipIcon>
|
169
|
+
</template>
|
170
|
+
</bi-table>
|
171
|
+
</div>
|
172
|
+
</template>
|
84
173
|
<div class="example-table-box">
|
85
|
-
<p
|
86
|
-
<
|
87
|
-
|
88
|
-
|
89
|
-
|
174
|
+
<p>tooltipIcon在表格内的组件使用</p>
|
175
|
+
<p> <el-button @click="tableLoading=!tableLoading">tableLoading</el-button></p>
|
176
|
+
<el-table
|
177
|
+
v-sticky-header="{offsetTop:0}"
|
178
|
+
v-sticky-footer="{offsetBottom:0}"
|
90
179
|
:data="data"
|
91
|
-
:
|
92
|
-
max-height="200px"
|
93
|
-
fixed-offset="60"
|
94
|
-
pagination
|
95
|
-
:auto-scroll="false"
|
96
|
-
:total="100"
|
97
|
-
:page.sync="listQuery.page"
|
98
|
-
:limit.sync="listQuery.limit"
|
180
|
+
:summary-method="getSummaries"
|
99
181
|
show-summary
|
100
|
-
@selection-change="selectionChange"
|
101
|
-
@pagination="getList"
|
102
|
-
></bi-table>
|
103
|
-
</div>
|
104
|
-
|
105
|
-
<div class="example-table-box">
|
106
|
-
<p>sticky-tabs表格</p>
|
107
|
-
<el-tabs>
|
108
|
-
<el-tab-pane label="tabs">
|
109
|
-
<div style="height:300px;background:#eee"></div>
|
110
|
-
<bi-table
|
111
|
-
border
|
112
|
-
stripe
|
113
|
-
fixed="sticky"
|
114
|
-
:data="data"
|
115
|
-
:column="fullscreenColumn"
|
116
|
-
:summary-method="getSummaries"
|
117
|
-
show-summary
|
118
|
-
></bi-table>
|
119
|
-
</el-tab-pane>
|
120
|
-
</el-tabs>
|
121
|
-
</div>
|
122
|
-
<div class="example-table-box">
|
123
|
-
<p>tooltipIcon在表格内的组件使用</p>
|
124
|
-
<bi-table
|
125
|
-
border
|
126
|
-
stripe
|
127
|
-
fixed="sticky"
|
128
|
-
:data="minData"
|
129
|
-
:column="renderColumn2"
|
130
182
|
>
|
131
|
-
<
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
183
|
+
<el-table-column
|
184
|
+
label="日期"
|
185
|
+
prop="date"
|
186
|
+
fixed
|
187
|
+
></el-table-column>
|
188
|
+
<el-table-column
|
189
|
+
label="姓名"
|
190
|
+
prop="name"
|
191
|
+
fixed
|
192
|
+
></el-table-column>
|
193
|
+
<el-table-column
|
194
|
+
label="省份"
|
195
|
+
prop="province"
|
196
|
+
fixed
|
197
|
+
></el-table-column>
|
198
|
+
<el-table-column
|
199
|
+
label="省份tableLoading3"
|
200
|
+
prop="province"
|
201
|
+
fixed="right"
|
202
|
+
></el-table-column>
|
203
|
+
<el-table-column
|
204
|
+
v-if="tableLoading"
|
205
|
+
label="姓名right1"
|
206
|
+
prop="name"
|
207
|
+
fixed="right"
|
208
|
+
></el-table-column>
|
209
|
+
|
210
|
+
<el-table-column
|
211
|
+
v-if="tableLoading"
|
212
|
+
label="姓名right2"
|
213
|
+
prop="name"
|
214
|
+
fixed="right"
|
215
|
+
></el-table-column>
|
216
|
+
|
217
|
+
<el-table-column
|
218
|
+
label="市区"
|
219
|
+
prop="city"
|
220
|
+
></el-table-column>
|
221
|
+
|
222
|
+
<el-table-column
|
223
|
+
label="地址"
|
224
|
+
prop="address"
|
225
|
+
width="400"
|
226
|
+
></el-table-column>
|
227
|
+
<el-table-column
|
228
|
+
label="地址2"
|
229
|
+
prop="address"
|
230
|
+
width="400"
|
231
|
+
></el-table-column>
|
232
|
+
<el-table-column
|
233
|
+
label="地址3"
|
234
|
+
prop="address"
|
235
|
+
width="400"
|
236
|
+
></el-table-column>
|
237
|
+
<el-table-column
|
238
|
+
label="邮编"
|
239
|
+
prop="zip"
|
240
|
+
></el-table-column>
|
241
|
+
<el-table-column
|
242
|
+
label="操作"
|
243
|
+
prop="cmp"
|
244
|
+
></el-table-column>
|
245
|
+
<el-table-column
|
246
|
+
label="邮编"
|
247
|
+
prop="zip"
|
248
|
+
></el-table-column>
|
249
|
+
<el-table-column
|
250
|
+
label="操作"
|
251
|
+
prop="cmp"
|
252
|
+
></el-table-column>
|
253
|
+
<el-table-column
|
254
|
+
label="邮编"
|
255
|
+
prop="zip"
|
256
|
+
></el-table-column>
|
257
|
+
<el-table-column
|
258
|
+
label="操作"
|
259
|
+
prop="cmp"
|
260
|
+
></el-table-column>
|
261
|
+
<el-table-column
|
262
|
+
label="邮编"
|
263
|
+
prop="zip"
|
264
|
+
></el-table-column>
|
265
|
+
<el-table-column
|
266
|
+
label="操作"
|
267
|
+
prop="cmp"
|
268
|
+
></el-table-column>
|
269
|
+
<el-table-column
|
270
|
+
label="邮编"
|
271
|
+
prop="zip"
|
272
|
+
></el-table-column>
|
273
|
+
<el-table-column
|
274
|
+
label="操作"
|
275
|
+
prop="cmp"
|
276
|
+
></el-table-column>
|
277
|
+
</el-table>
|
171
278
|
</div>
|
172
279
|
</div>
|
173
280
|
</template>
|
@@ -231,7 +338,7 @@ export default {
|
|
231
338
|
}
|
232
339
|
}
|
233
340
|
],
|
234
|
-
tableLoading: false,
|
341
|
+
tableLoading: !false,
|
235
342
|
columnsProps: {
|
236
343
|
width: 'auto'
|
237
344
|
},
|