bi-element-ui 1.0.3 → 1.0.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.
@@ -1,173 +1,277 @@
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
- <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
51
+ <bi-table
52
+ border
53
+ stripe
13
54
  :data="data"
55
+ :column="basicColumn"
14
56
  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>
57
+ :summary-method="getSummaries"
58
+ ></bi-table>
49
59
  </div>
60
+ <el-button
61
+ type=""
62
+ @click="search"
63
+ >搜索</el-button>
50
64
 
51
- <bi-table
52
- border
53
- stripe
54
- :data="data"
55
- :column="basicColumn"
56
- show-summary
57
- :summary-method="getSummaries"
58
- ></bi-table>
59
- </div>
60
- <el-button
61
- type=""
62
- @click="search"
63
- >搜索</el-button>
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
- <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>
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
- <div style="padding-bottom:600px"></div>
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>普通固定表头</p>
86
- <bi-table
87
- border
88
- stripe
89
- fixed="fullscreen"
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
- :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"
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
- <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>
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="姓名right1"
200
+ prop="name"
201
+ fixed="right"
202
+ ></el-table-column>
203
+ <el-table-column
204
+ v-if="tableLoading"
205
+ label="姓名right2"
206
+ prop="name"
207
+ fixed="right"
208
+ ></el-table-column>
209
+
210
+ <el-table-column
211
+ label="市区"
212
+ prop="city"
213
+ ></el-table-column>
214
+ <el-table-column
215
+ label="省份tableLoading3"
216
+ prop="province"
217
+ fixed="right"
218
+ ></el-table-column>
219
+ <el-table-column
220
+ label="地址"
221
+ prop="address"
222
+ width="400"
223
+ ></el-table-column>
224
+ <el-table-column
225
+ label="地址2"
226
+ prop="address"
227
+ width="400"
228
+ ></el-table-column>
229
+ <el-table-column
230
+ label="地址3"
231
+ prop="address"
232
+ width="400"
233
+ ></el-table-column>
234
+ <el-table-column
235
+ label="邮编"
236
+ prop="zip"
237
+ ></el-table-column>
238
+ <el-table-column
239
+ label="操作"
240
+ prop="cmp"
241
+ ></el-table-column>
242
+ <el-table-column
243
+ label="邮编"
244
+ prop="zip"
245
+ ></el-table-column>
246
+ <el-table-column
247
+ label="操作"
248
+ prop="cmp"
249
+ ></el-table-column>
250
+ <el-table-column
251
+ label="邮编"
252
+ prop="zip"
253
+ ></el-table-column>
254
+ <el-table-column
255
+ label="操作"
256
+ prop="cmp"
257
+ ></el-table-column>
258
+ <el-table-column
259
+ label="邮编"
260
+ prop="zip"
261
+ ></el-table-column>
262
+ <el-table-column
263
+ label="操作"
264
+ prop="cmp"
265
+ ></el-table-column>
266
+ <el-table-column
267
+ label="邮编"
268
+ prop="zip"
269
+ ></el-table-column>
270
+ <el-table-column
271
+ label="操作"
272
+ prop="cmp"
273
+ ></el-table-column>
274
+ </el-table>
171
275
  </div>
172
276
  </div>
173
277
  </template>
@@ -231,7 +335,7 @@ export default {
231
335
  }
232
336
  }
233
337
  ],
234
- tableLoading: false,
338
+ tableLoading: !false,
235
339
  columnsProps: {
236
340
  width: 'auto'
237
341
  },