bi-element-ui 1.1.3 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bi-element-ui",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
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,7 @@
35
73
  :auto-scroll="false"
36
74
  :page.sync="listQuery.page"
37
75
  :limit.sync="listQuery.limit"
76
+ @selection-change="handleSelectionChange"
38
77
  >
39
78
  <template v-slot:province="{ row }">
40
79
  {{ row.province }}
@@ -310,6 +349,7 @@ export default {
310
349
  return {
311
350
  loadingData: [],
312
351
  basicColumn: [
352
+ { prop: 'selection', type: 'selection' },
313
353
  { label: '日期', prop: 'date', sortable: true, fixed: true },
314
354
  {
315
355
  label: '姓名',
@@ -323,7 +363,14 @@ export default {
323
363
  )
324
364
  }
325
365
  },
326
- { label: '省份2', prop: 'province', slotScope: true },
366
+ {
367
+ label: '省份2',
368
+ prop: 'province',
369
+ slotScope: true,
370
+ renderHeader: (h) => {
371
+ return <div>省份2222 1234</div>
372
+ }
373
+ },
327
374
  {
328
375
  label: '市区',
329
376
  prop: 'city',
@@ -367,13 +414,17 @@ export default {
367
414
  limit: 20
368
415
  },
369
416
  editForm: {},
370
- dialogVisible: false
417
+ dialogVisible: false,
418
+ drawer: false
371
419
  }
372
420
  },
373
421
  mounted() {
374
422
  console.log(this.$options.name)
375
423
  },
376
424
  methods: {
425
+ handleSelectionChange(val) {
426
+ console.log('🚀 ~ handleSelectionChange ~ val:', val)
427
+ },
377
428
  selectionChange(rows) {
378
429
  console.log('selected', rows)
379
430
  },