br-dionysus 1.17.6 → 1.18.0

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.
Files changed (95) hide show
  1. package/README.md +73 -24
  2. package/attributes.json +1 -1
  3. package/cypress/component/MSelect.cy.ts +0 -1
  4. package/cypress/component/MSelectTable.cy.ts +538 -0
  5. package/cypress/component/MSelectV2.cy.ts +0 -1
  6. package/cypress/component/MTable.cy.ts +123 -0
  7. package/cypress/e2e/1-getting-started/todo.cy.js +143 -0
  8. package/cypress/e2e/2-advanced-examples/actions.cy.js +321 -0
  9. package/cypress/e2e/2-advanced-examples/aliasing.cy.js +39 -0
  10. package/cypress/e2e/2-advanced-examples/assertions.cy.js +176 -0
  11. package/cypress/e2e/2-advanced-examples/connectors.cy.js +98 -0
  12. package/cypress/e2e/2-advanced-examples/cookies.cy.js +118 -0
  13. package/cypress/e2e/2-advanced-examples/cypress_api.cy.js +184 -0
  14. package/cypress/e2e/2-advanced-examples/files.cy.js +85 -0
  15. package/cypress/e2e/2-advanced-examples/location.cy.js +32 -0
  16. package/cypress/e2e/2-advanced-examples/misc.cy.js +98 -0
  17. package/cypress/e2e/2-advanced-examples/navigation.cy.js +55 -0
  18. package/cypress/e2e/2-advanced-examples/network_requests.cy.js +163 -0
  19. package/cypress/e2e/2-advanced-examples/querying.cy.js +114 -0
  20. package/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js +204 -0
  21. package/cypress/e2e/2-advanced-examples/storage.cy.js +117 -0
  22. package/cypress/e2e/2-advanced-examples/traversal.cy.js +121 -0
  23. package/cypress/e2e/2-advanced-examples/utilities.cy.js +107 -0
  24. package/cypress/e2e/2-advanced-examples/viewport.cy.js +58 -0
  25. package/cypress/e2e/2-advanced-examples/waiting.cy.js +30 -0
  26. package/cypress/e2e/2-advanced-examples/window.cy.js +22 -0
  27. package/cypress/e2e/toolSlotsToData.cy.ts +127 -0
  28. package/cypress/e2e/toolUniqueByKey.cy.ts +79 -0
  29. package/cypress/support/component.ts +20 -1
  30. package/cypress.config.ts +1 -0
  31. package/dist/br-dionysus.es.js +5872 -5695
  32. package/dist/br-dionysus.umd.js +6 -5
  33. package/dist/cypress/component/MInputNumber.cy.d.ts +0 -0
  34. package/dist/cypress/component/MSelect.cy.d.ts +1 -0
  35. package/dist/cypress/component/MSelectTable.cy.d.ts +1 -0
  36. package/dist/cypress/component/MSelectV2.cy.d.ts +1 -0
  37. package/dist/cypress/component/MTable.cy.d.ts +1 -0
  38. package/dist/cypress/e2e/spec.cy.d.ts +0 -0
  39. package/dist/cypress/e2e/toolCheckType.cy.d.ts +1 -0
  40. package/dist/cypress/e2e/toolCompareStructures.cy.d.ts +1 -0
  41. package/dist/cypress/e2e/toolCreateHash.cy.d.ts +1 -0
  42. package/dist/cypress/e2e/toolMoneyFormat.cy.d.ts +1 -0
  43. package/dist/cypress/e2e/toolSlotsToData.cy.d.ts +1 -0
  44. package/dist/cypress/e2e/toolUniqueByKey.cy.d.ts +1 -0
  45. package/dist/cypress/support/commands.d.ts +0 -0
  46. package/dist/cypress/support/component.d.ts +9 -0
  47. package/dist/cypress/support/e2e.d.ts +0 -0
  48. package/dist/index.css +1 -1
  49. package/dist/packages/Hook/usePackageConfig/usePackageConfig.d.ts +2 -0
  50. package/dist/packages/MTable/src/MTable.vue.d.ts +49 -15
  51. package/dist/packages/MTable/src/token.d.ts +13 -0
  52. package/dist/packages/MTableColumn/src/MTableColumn.vue.d.ts +9 -14
  53. package/dist/packages/Tool/globalEvents/globalEvents.d.ts +26 -0
  54. package/dist/packages/index.d.ts +2 -0
  55. package/mock/ajax/index.ts +48 -0
  56. package/mock/index.ts +51 -0
  57. package/mock/interface/enum.ts +4 -0
  58. package/mock/interface/type.ts +32 -0
  59. package/mock/mockData/book.ts +48 -0
  60. package/package.json +4 -2
  61. package/packages/Hook/usePackageConfig/usePackageConfig.ts +6 -4
  62. package/packages/Hook/useZIndex/useGlobalZIndex.ts +1 -1
  63. package/packages/MDialog/src/MDialog.vue +8 -8
  64. package/packages/MSelectTable/docs/DemoTest1.vue +25 -43
  65. package/packages/MSelectTable/docs/DemoTest2.vue +25 -43
  66. package/packages/MSelectTable/docs/DemoTest3.vue +29 -45
  67. package/packages/MSelectTable/docs/DemoTest4.vue +32 -39
  68. package/packages/MSelectTable/docs/DemoTest5.vue +37 -50
  69. package/packages/MSelectTable/docs/DemoTest6.vue +29 -44
  70. package/packages/MSelectTable/docs/README.md +1 -0
  71. package/packages/MSelectTable/src/MSelectTable.vue +9 -6
  72. package/packages/MTable/docs/DemoTest4.vue +0 -1
  73. package/packages/MTable/docs/DemoTest6.vue +122 -0
  74. package/packages/MTable/docs/DemoTest7.vue +138 -0
  75. package/packages/MTable/docs/README.md +10 -10
  76. package/packages/MTable/docs/demo.vue +10 -2
  77. package/packages/MTable/src/MBatchEdit.vue +1 -0
  78. package/packages/MTable/src/MTable.vue +254 -38
  79. package/packages/MTable/src/token.ts +14 -1
  80. package/packages/MTableColumn/docs/README.md +1 -0
  81. package/packages/MTableColumn/src/MTableColumn.vue +98 -24
  82. package/packages/Tool/globalEvents/README.md +23 -0
  83. package/packages/Tool/globalEvents/globalEvents.ts +79 -0
  84. package/packages/Tool/moneyFormat/moneyFormat.ts +2 -1
  85. package/packages/index.ts +2 -0
  86. package/packages/typings/global.d.ts +6 -2
  87. package/tags.json +1 -1
  88. package/tsconfig.json +3 -1
  89. package/vite.config.ts +1 -1
  90. package/web-types.json +1 -1
  91. package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/345/215/225/351/200/211/345/212/237/350/203/275 (failed).png +0 -0
  92. package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/345/237/272/347/241/200/345/212/237/350/203/275 (failed).png +0 -0
  93. package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/345/244/232/351/200/211/345/212/237/350/203/275 (failed).png +0 -0
  94. package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/350/277/234/347/250/213/346/220/234/347/264/242/345/212/237/350/203/275 (failed).png +0 -0
  95. package/src/global.d.ts +0 -7
@@ -7,7 +7,7 @@
7
7
  v-model="code"
8
8
  :tableTitle="commodityOptionsTitle"
9
9
  :options="options"
10
- :keywords="{ label: 'ApprovedQtyPU', value: 'DocNo' }"
10
+ :keywords="{ label: 'name', value: 'sn' }"
11
11
  :total="total"
12
12
  scrollbarAlwaysOn
13
13
  filterable
@@ -26,73 +26,58 @@
26
26
  <script setup lang="ts">
27
27
  import { ref } from 'vue'
28
28
  import { Page } from './../../typings/class'
29
+ import { Book, BookList } from '../../../mock/mockData/book'
30
+ import { getBookList } from '../../../mock'
29
31
 
30
- const commodityOptionsTitle: TableTitle[] = [{
31
- prop: 'PRDocType',
32
- label: '单据类型'
32
+ const commodityOptionsTitle: TableTitle<Book>[] = [{
33
+ prop: 'sn',
34
+ label: '编码'
33
35
  }, {
34
- prop: 'DocNo',
35
- label: '请购单号'
36
+ prop: 'name',
37
+ label: '书名'
36
38
  }, {
37
- prop: 'ApprovedQtyPU',
38
- label: '名称'
39
+ prop: 'author',
40
+ label: '作者'
39
41
  }, {
40
- prop: 'ACCode',
41
- label: '货币'
42
+ // prop: 'address',
43
+ // label: '发行地'
44
+ // }, {
45
+ prop: 'date',
46
+ label: '入库时间'
42
47
  }]
43
48
 
44
49
  const code = ref<string | number | Array<string | number>>([])
45
50
 
46
- const total = ref(0)
47
- const options = ref<any[]>([])
48
- const mockData: any[] = []
49
- for (let i = 0; i < 1000; i++) {
50
- mockData.push({
51
- PRDocType: '测试数据' + (i + 1),
52
- DocNo: i + 1,
53
- ApprovedQtyPU: 'ApprovedQtyPU' + (i + 1),
54
- ACCode: 'ACCode'
55
- })
56
- }
51
+ const total = ref<number>(0)
52
+ const options = ref<BookList>([])
57
53
 
58
54
  setTimeout(() => {
59
- options.value = [{
60
- PRDocType: 'xxxPRDocType1',
61
- DocNo: 1,
62
- ApprovedQtyPU: 'xxxApprovedQtyPU1',
63
- ACCode: 'xxxACCode1'
64
- }, {
65
- PRDocType: 'xxxPRDocType2',
66
- DocNo: 2,
67
- ApprovedQtyPU: 'xxxApprovedQtyPU2',
68
- ACCode: 'xxxACCode2'
69
- }]
55
+ options.value = [
56
+ { id: 4, name: '西游记', date: '2023-10-27 14:22:45', author: '吴承恩', address: '中国 江苏', sn: 'sn2310270004' },
57
+ { id: 5, name: '水浒传', date: '2023-10-28 18:33:02', author: '施耐庵', address: '中国 山东', sn: 'sn2310280005' }
58
+ ]
70
59
  }, 100)
71
60
 
72
61
  const toPage = (page: Page, str: any) => {
73
- getData(str, page)
62
+ remoteMethod(str, page)
74
63
  }
75
64
  const selectMultiple = (value: string | number | Array<number | string>) => {
76
65
  code.value = value
77
66
  }
78
67
 
79
68
  const remoteMethod = async (query: string, page: Page = new Page()) => {
80
- await getData(query, page)
69
+ const res = await getBookList({
70
+ keyword: query,
71
+ page: page.currentPage,
72
+ pageSize: page.pageSize
73
+ })
74
+ options.value = res.data?.rows ?? []
75
+ total.value = res.data?.total ?? 0
81
76
  }
82
77
 
83
78
  const selectChange = (value: string | number | Array<number | string>) => {
84
79
  console.log('选择变化事件触发,注意,绑定值没有发生变化', value)
85
80
  }
86
- const getData = async (query: string, page: any) => {
87
- return new Promise<void>((resolve) => {
88
- setTimeout(() => {
89
- const start = (page.currentPage - 1) * page.pageSize
90
- options.value = mockData.filter(item => item.PRDocType.includes(query)).slice(start, start + page.pageSize)
91
- total.value = mockData.length
92
- resolve()
93
- }, 500)
94
- })
95
- }
96
81
  </script>
97
82
 
98
83
  <style>
@@ -36,6 +36,7 @@ import demo from './demo.vue'
36
36
  | allowCreate | 是否能够创建条目 | boolean | - | 否 | false |
37
37
  | popupWidth | 弹窗的宽度 | string,number | - | 否 | 500 |
38
38
  | border | 表格边框 | boolean | - | 否 | false |
39
+ | keywords | 定义默认的 label 和value | { label: string, value: string } | - | 否 | { label: label, value: value } |
39
40
 
40
41
  #### Options(选项接口)
41
42
 
@@ -277,7 +277,7 @@ const mMarkStyle = {
277
277
  }
278
278
 
279
279
  /** 表格组件对象 */
280
- const selectTableRef = ref<InstanceType<typeof ElTable> | null>(null)
280
+ const selectTableRef = ref<any | null>(null)
281
281
 
282
282
  // 组件内使用自定义
283
283
  const state = reactive<{
@@ -379,7 +379,7 @@ const addTag = () => {
379
379
  }
380
380
 
381
381
  // 直接跟输入框绑定
382
- const selectModelValue = ref<string | number | Array<number | string>>(props.multiple ? [] : '')
382
+ const selectModelValue = ref<string | number | Array<number | string> | any>(props.multiple ? [] : '')
383
383
  watch(
384
384
  () => props.name,
385
385
  () => {
@@ -499,7 +499,7 @@ const defaultBackFillValue = () => {
499
499
  newArr.forEach((row) => {
500
500
  const arr = tabDataMap.value.filter(item => item[props.keywords.value] === row[props.keywords.value])
501
501
  if (!arr.length) return false
502
- selectTableRef.value.toggleRowSelection(arr[0], true)
502
+ selectTableRef.value?.toggleRowSelection(arr[0], true)
503
503
  })
504
504
  isBackFill.value = false
505
505
  })
@@ -507,7 +507,7 @@ const defaultBackFillValue = () => {
507
507
  const item = tabDataMap.value.find(item => props.modelValue === item[props.keywords.value])
508
508
  if (!item) return false
509
509
  nextTick(() => {
510
- selectTableRef.value.setCurrentRow(item, true)
510
+ selectTableRef.value?.setCurrentRow(item, true)
511
511
  isBackFill.value = false
512
512
  })
513
513
  }
@@ -580,11 +580,11 @@ const clearLoading = ref<boolean>(false)
580
580
  // 清空后的回调
581
581
  const clear = () => {
582
582
  if (props.multiple) {
583
- selectTableRef.value.clearSelection()
583
+ selectTableRef.value?.clearSelection()
584
584
  modelValue.value = []
585
585
  } else {
586
586
  // 取消高亮
587
- selectTableRef.value.setCurrentRow()
587
+ selectTableRef.value?.setCurrentRow()
588
588
  modelValue.value = ''
589
589
  }
590
590
  clearLoading.value = true
@@ -644,7 +644,10 @@ const focus = () => {
644
644
  isVisible.value = true
645
645
  }, 150)
646
646
  }
647
+
648
+ // 删除搜索值时,也需要清空选择状态
647
649
  const changeBlur = () => {
650
+ if (selectModelValue.value === '') clear()
648
651
  }
649
652
  // 触发select隐藏
650
653
  // const blur = () => {
@@ -12,7 +12,6 @@
12
12
  :data="tableData"
13
13
  border
14
14
  scrollbarAlwaysOn
15
- showSelectionCellStatus
16
15
  v-model:selectionCell="selectionCell"
17
16
  >
18
17
  <MTableColumn
@@ -0,0 +1,122 @@
1
+ <template>
2
+ <div>
3
+ <h5>选中单元格</h5>
4
+ <p>selectionCell: {{ selectionCell }}</p>
5
+ <MTable
6
+ :data="tableData"
7
+ border
8
+ scrollbarAlwaysOn
9
+ v-model:selectionCell="selectionCell"
10
+ >
11
+ <el-table-column
12
+ fixed="left"
13
+ type="selection"
14
+ />
15
+ <MTableColumn
16
+ v-for="item in tableTitle"
17
+ :key="item.prop"
18
+ :prop="item.prop"
19
+ :label="item.label"
20
+ :align="item.align"
21
+ :minWidth="item.minWidth"
22
+ :isBatchEdit="item.isBatchEdit"
23
+ showOverflowTooltip
24
+ ></MTableColumn>
25
+ </MTable>
26
+ </div>
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import { ref } from 'vue'
31
+ import { MTableColumn } from './../../MTableColumn'
32
+
33
+ const tableData = ref<Record<string, string | number>[]>([])
34
+ tableData.value = [{
35
+ id: 1,
36
+ sn: 1,
37
+ date: '2016-05-03',
38
+ name: 'Tom1',
39
+ address: 'No. 189, Grove St, Los Angeles',
40
+ tag: 'Home',
41
+ pid: 0,
42
+ qty: 10
43
+ }, {
44
+ id: 2,
45
+ sn: 2,
46
+ date: '2016-05-02',
47
+ name: 'Tom2',
48
+ address: 'No. 189, Grove St, Los Angeles',
49
+ tag: 'Office',
50
+ pid: 0,
51
+ qty: 101
52
+ }, {
53
+ id: 3,
54
+ sn: 3,
55
+ date: '2016-05-04',
56
+ name: 'Tom3',
57
+ address: 'No. 189, Grove St, Los Angeles',
58
+ tag: 'Home',
59
+ pid: 0,
60
+ qty: 102
61
+ }, {
62
+ id: 4,
63
+ sn: 4,
64
+ date: '2016-05-01',
65
+ name: 'Tom4',
66
+ address: 'No. 189, Grove St, Los Angeles',
67
+ tag: 'Office',
68
+ pid: 0,
69
+ qty: 103
70
+ }, {
71
+ id: 5,
72
+ sn: 5,
73
+ date: '2016-05-05',
74
+ name: 'Tom4',
75
+ address: 'No. 189, Grove St, Los Angeles',
76
+ tag: 'Office',
77
+ pid: 0,
78
+ qty: 104
79
+ }, {
80
+ id: 6,
81
+ sn: 6,
82
+ date: '2016-06-01',
83
+ name: 'Tom4',
84
+ address: 'No. 189, Grove St, Los Angeles',
85
+ tag: 'Office',
86
+ pid: 0,
87
+ qty: 105
88
+ }]
89
+
90
+ const tableTitle: TableTitle[] = [{
91
+ label: '序号',
92
+ prop: 'sn',
93
+ minWidth: 200,
94
+ fixed: 'left',
95
+ isBatchEdit: true
96
+ }, {
97
+ label: '时间',
98
+ prop: 'date',
99
+ minWidth: 200,
100
+ isBatchEdit: true
101
+ }, {
102
+ label: '地址',
103
+ prop: 'address',
104
+ minWidth: 200,
105
+ isBatchEdit: true
106
+ }, {
107
+ label: '名称',
108
+ prop: 'name',
109
+ minWidth: 200,
110
+ isBatchEdit: true
111
+ }, {
112
+ label: '数量',
113
+ prop: 'qty',
114
+ minWidth: 200,
115
+ isBatchEdit: true
116
+ }]
117
+
118
+ const selectionCell = ref<string>('')
119
+ </script>
120
+
121
+ <style>
122
+ </style>
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <div>
3
+ <h5>合计行</h5>
4
+ <MTable
5
+ :data="tableData"
6
+ border
7
+ showSummary
8
+ sumText="合"
9
+ scrollbarAlwaysOn
10
+ >
11
+ <el-table-column
12
+ fixed="left"
13
+ type="selection"
14
+ />
15
+ <MTableColumn
16
+ v-for="item in tableTitle"
17
+ :key="item.prop"
18
+ :prop="item.prop"
19
+ :label="item.label"
20
+ :align="item.align"
21
+ :minWidth="item.minWidth"
22
+ :className="item.className"
23
+ :filters="item.filters"
24
+ :headerAlign="item.headerAlign"
25
+ :fixed="item.fixed"
26
+ :isSummary="item.isSummary"
27
+ :isBatchEdit="item.isBatchEdit"
28
+ showOverflowTooltip
29
+ ></MTableColumn>
30
+ </MTable>
31
+ </div>
32
+ </template>
33
+
34
+ <script setup lang="ts">
35
+ import { ref } from 'vue'
36
+ import { MTableColumn } from './../../MTableColumn'
37
+
38
+ const tableData = ref<Record<string, string | number>[]>([])
39
+ tableData.value = [{
40
+ id: 1,
41
+ sn: 1,
42
+ date: '2016-05-03',
43
+ name: 'Tom1',
44
+ address: 'No. 189, Grove St, Los Angeles',
45
+ tag: 'Home',
46
+ pid: 0,
47
+ qty: 10,
48
+ day: 100
49
+ }, {
50
+ id: 2,
51
+ sn: 2,
52
+ date: '2016-05-02',
53
+ name: 'Tom2',
54
+ address: 'No. 189, Grove St, Los Angeles',
55
+ tag: 'Office',
56
+ pid: 0,
57
+ qty: 101,
58
+ day: 100
59
+ }, {
60
+ id: 3,
61
+ sn: 3,
62
+ date: '2016-05-04',
63
+ name: 'Tom3',
64
+ address: 'No. 189, Grove St, Los Angeles',
65
+ tag: 'Home',
66
+ pid: 0,
67
+ qty: 102,
68
+ day: 100
69
+ }, {
70
+ id: 4,
71
+ sn: 4,
72
+ date: '2016-05-01',
73
+ name: 'Tom4',
74
+ address: 'No. 189, Grove St, Los Angeles',
75
+ tag: 'Office',
76
+ pid: 0,
77
+ qty: 103,
78
+ day: 100
79
+ }, {
80
+ id: 5,
81
+ sn: 5,
82
+ date: '2016-05-05',
83
+ name: 'Tom4',
84
+ address: 'No. 189, Grove St, Los Angeles',
85
+ tag: 'Office',
86
+ pid: 0,
87
+ qty: 104,
88
+ day: 100
89
+ }, {
90
+ id: 6,
91
+ sn: 6,
92
+ date: '2016-06-01',
93
+ name: 'Tom4',
94
+ address: 'No. 189, Grove St, Los Angeles',
95
+ tag: 'Office',
96
+ pid: 0,
97
+ qty: 105,
98
+ day: 100
99
+ }]
100
+
101
+ const tableTitle: TableTitle[] = [{
102
+ label: '序号',
103
+ prop: 'sn',
104
+ minWidth: 200,
105
+ fixed: 'left',
106
+ isBatchEdit: false
107
+ }, {
108
+ label: '时间',
109
+ prop: 'date',
110
+ minWidth: 200,
111
+ isBatchEdit: true
112
+ }, {
113
+ label: '数量',
114
+ prop: 'qty',
115
+ minWidth: 200,
116
+ isBatchEdit: true,
117
+ isSummary: true
118
+ }, {
119
+ label: '天数',
120
+ prop: 'day',
121
+ minWidth: 200,
122
+ isBatchEdit: true,
123
+ isSummary: false
124
+ }, {
125
+ label: '地址',
126
+ prop: 'address',
127
+ minWidth: 200,
128
+ isBatchEdit: true
129
+ }, {
130
+ label: '名称',
131
+ prop: 'name',
132
+ minWidth: 200,
133
+ isBatchEdit: true
134
+ }]
135
+ </script>
136
+
137
+ <style>
138
+ </style>
@@ -13,16 +13,16 @@ import demo from './demo.vue'
13
13
 
14
14
  ### 2) Attributes
15
15
 
16
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
17
- |-------------------------|-----------------------------|-----------------------|-----|-----------------------------------------------------|
18
- | data | 表格的数据 | Record<string, any>[] | - | [ ] |
19
- | sole | 行的唯一值 | String , number | - | key |
20
- | filtersValue | 表格内容筛选(当为null时,不显示筛选图标) | Function \| null | - | null |
21
- | expandProp | 展开图标列(如使用这个属性则必须存在rowKey属性) | string | - | '' |
22
- | tableConfigKey | 表格配置key | string | - | '' |
23
- | showSelectionCellStatus | 显示单元格选中状态 | boolean | - | false |
24
- | selectionCell | 选中列(必须showSelection为true) | string | - | '' |
25
- | 其余参数 | 参考el官网的table | any | - | https://element-plus.org/zh-CN/component/table.html |
16
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
17
+ |----------------|-----------------------------|-----------------------|-----|-----------------------------------------------------|
18
+ | data | 表格的数据 | Record<string, any>[] | - | [ ] |
19
+ | sole | 行的唯一值 | String , number | - | key |
20
+ | filtersValue | 表格内容筛选(当为null时,不显示筛选图标) | Function \| null | - | null |
21
+ | expandProp | 展开图标列(如使用这个属性则必须存在rowKey属性) | string | - | '' |
22
+ | tableConfigKey | 表格配置key | string | - | '' |
23
+ | selectionCell | 选中列 | string | - | '' |
24
+ | circleTotal | 是否圈选合计 | boolean | - | true |
25
+ | 其余参数 | 参考el官网的table | any | - | https://element-plus.org/zh-CN/component/table.html |
26
26
 
27
27
  ## 要求
28
28
 
@@ -12,7 +12,13 @@
12
12
  <!--<DemoTest4></DemoTest4>-->
13
13
  <!--<el-divider />-->
14
14
 
15
- <DemoTest5></DemoTest5>
15
+ <!--<DemoTest5></DemoTest5>-->
16
+ <!--<el-divider />-->
17
+
18
+ <!--<DemoTest6></DemoTest6>-->
19
+ <!--<el-divider />-->
20
+
21
+ <DemoTest7></DemoTest7>
16
22
  <el-divider />
17
23
  </div>
18
24
  </template>
@@ -22,7 +28,9 @@
22
28
  // import DemoTest2 from 'packages/MTable/docs/DemoTest2.vue'
23
29
  // import DemoTest3 from 'packages/MTable/docs/DemoTest3.vue'
24
30
  // import DemoTest4 from 'packages/MTable/docs/DemoTest4.vue'
25
- import DemoTest5 from 'packages/MTable/docs/DemoTest5.vue'
31
+ // import DemoTest5 from 'packages/MTable/docs/DemoTest5.vue'
32
+ // import DemoTest6 from 'packages/MTable/docs/DemoTest6.vue'
33
+ import DemoTest7 from 'packages/MTable/docs/DemoTest7.vue'
26
34
  </script>
27
35
 
28
36
  <style lang="scss" scoped>
@@ -5,6 +5,7 @@
5
5
  :size="props.size"
6
6
  icon="Brush"
7
7
  @click="open(props.selectionCell)"
8
+ @mousedown.stop
8
9
  >
9
10
  批改
10
11
  </el-button>