bi-element-ui 1.1.2 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bi-element-ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "description": "基于element-ui编写的ui组件库",
6
6
  "main": "lib/bi-element-ui.common.js",
@@ -7,6 +7,44 @@
7
7
  :button="moreButton"
8
8
  ></BiMoreButton>
9
9
 
10
+ <el-button
11
+ @click="drawer = true"
12
+ type="primary"
13
+ style="margin-left: 16px;"
14
+ >
15
+ 点我打开
16
+ </el-button>
17
+ <el-drawer
18
+ title="我是标题"
19
+ :visible.sync="drawer"
20
+ :with-header="false"
21
+ width="80%"
22
+ >
23
+ <bi-table
24
+ :loading="tableLoading"
25
+ :headerPopperType="$options.name"
26
+ border
27
+ stripe
28
+ :data="data"
29
+ pagination
30
+ :sticky-top="0"
31
+ :column="basicColumn"
32
+ :total="100"
33
+ show-summary
34
+ :auto-scroll="false"
35
+ :page.sync="listQuery.page"
36
+ :limit.sync="listQuery.limit"
37
+ >
38
+ <template v-slot:province="{ row }">
39
+ {{ row.province }}
40
+ </template>
41
+ <template v-slot:city_header>
42
+ <span>市区</span>
43
+ </template>
44
+
45
+ </bi-table>
46
+ </el-drawer>
47
+
10
48
  <div class="example-table-box">
11
49
  <p>基础表格</p>
12
50
  <BiCustomColumn
@@ -14,7 +52,7 @@
14
52
  :table-column="basicColumn"
15
53
  :default-list="defaultColumnList"
16
54
  :default-column="{
17
- left:['date'],
55
+ left:['date','selection'],
18
56
  center:['name'],
19
57
  right:['other']
20
58
  }"
@@ -35,6 +73,30 @@
35
73
  :auto-scroll="false"
36
74
  :page.sync="listQuery.page"
37
75
  :limit.sync="listQuery.limit"
76
+ @selection-change="handleSelectionChange"
77
+ >
78
+ <template v-slot:province="{ row }">
79
+ {{ row.province }}
80
+ </template>
81
+ <template v-slot:city_header>
82
+ <span>市区</span>
83
+ </template>
84
+
85
+ </bi-table>
86
+
87
+ <bi-table
88
+ :loading="tableLoading"
89
+ border
90
+ stripe
91
+ :data="data"
92
+ pagination
93
+ :sticky-top="0"
94
+ :column="basicColumn"
95
+ :total="100"
96
+ show-summary
97
+ :auto-scroll="false"
98
+ :page.sync="listQuery.page"
99
+ :limit.sync="listQuery.limit"
38
100
  >
39
101
  <template v-slot:province="{ row }">
40
102
  {{ row.province }}
@@ -287,15 +349,28 @@ export default {
287
349
  return {
288
350
  loadingData: [],
289
351
  basicColumn: [
352
+ { prop: 'selection', type: 'selection' },
290
353
  { label: '日期', prop: 'date', sortable: true, fixed: true },
291
354
  {
292
355
  label: '姓名',
293
356
  prop: 'name',
294
357
  renderHeader: (h) => {
295
- return <span>姓名(12)</span>
358
+ return (
359
+ <div>
360
+ <el-input />
361
+ 1234
362
+ </div>
363
+ )
364
+ }
365
+ },
366
+ {
367
+ label: '省份2',
368
+ prop: 'province',
369
+ slotScope: true,
370
+ renderHeader: (h) => {
371
+ return <div>省份2222 1234</div>
296
372
  }
297
373
  },
298
- { label: '省份2', prop: 'province', slotScope: true },
299
374
  {
300
375
  label: '市区',
301
376
  prop: 'city',
@@ -339,13 +414,17 @@ export default {
339
414
  limit: 20
340
415
  },
341
416
  editForm: {},
342
- dialogVisible: false
417
+ dialogVisible: false,
418
+ drawer: false
343
419
  }
344
420
  },
345
421
  mounted() {
346
422
  console.log(this.$options.name)
347
423
  },
348
424
  methods: {
425
+ handleSelectionChange(val) {
426
+ console.log('🚀 ~ handleSelectionChange ~ val:', val)
427
+ },
349
428
  selectionChange(rows) {
350
429
  console.log('selected', rows)
351
430
  },