br-dionysus 1.17.7 → 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.
- package/README.md +73 -24
- package/attributes.json +1 -1
- package/cypress/component/MSelect.cy.ts +0 -1
- package/cypress/component/MSelectTable.cy.ts +538 -0
- package/cypress/component/MSelectV2.cy.ts +0 -1
- package/cypress/component/MTable.cy.ts +123 -0
- package/cypress/e2e/1-getting-started/todo.cy.js +143 -0
- package/cypress/e2e/2-advanced-examples/actions.cy.js +321 -0
- package/cypress/e2e/2-advanced-examples/aliasing.cy.js +39 -0
- package/cypress/e2e/2-advanced-examples/assertions.cy.js +176 -0
- package/cypress/e2e/2-advanced-examples/connectors.cy.js +98 -0
- package/cypress/e2e/2-advanced-examples/cookies.cy.js +118 -0
- package/cypress/e2e/2-advanced-examples/cypress_api.cy.js +184 -0
- package/cypress/e2e/2-advanced-examples/files.cy.js +85 -0
- package/cypress/e2e/2-advanced-examples/location.cy.js +32 -0
- package/cypress/e2e/2-advanced-examples/misc.cy.js +98 -0
- package/cypress/e2e/2-advanced-examples/navigation.cy.js +55 -0
- package/cypress/e2e/2-advanced-examples/network_requests.cy.js +163 -0
- package/cypress/e2e/2-advanced-examples/querying.cy.js +114 -0
- package/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js +204 -0
- package/cypress/e2e/2-advanced-examples/storage.cy.js +117 -0
- package/cypress/e2e/2-advanced-examples/traversal.cy.js +121 -0
- package/cypress/e2e/2-advanced-examples/utilities.cy.js +107 -0
- package/cypress/e2e/2-advanced-examples/viewport.cy.js +58 -0
- package/cypress/e2e/2-advanced-examples/waiting.cy.js +30 -0
- package/cypress/e2e/2-advanced-examples/window.cy.js +22 -0
- package/cypress/e2e/toolSlotsToData.cy.ts +127 -0
- package/cypress/e2e/toolUniqueByKey.cy.ts +79 -0
- package/cypress/support/component.ts +20 -1
- package/cypress.config.ts +1 -0
- package/dist/br-dionysus.es.js +5872 -5696
- package/dist/br-dionysus.umd.js +6 -5
- package/dist/cypress/component/MInputNumber.cy.d.ts +0 -0
- package/dist/cypress/component/MSelect.cy.d.ts +1 -0
- package/dist/cypress/component/MSelectTable.cy.d.ts +1 -0
- package/dist/cypress/component/MSelectV2.cy.d.ts +1 -0
- package/dist/cypress/component/MTable.cy.d.ts +1 -0
- package/dist/cypress/e2e/spec.cy.d.ts +0 -0
- package/dist/cypress/e2e/toolCheckType.cy.d.ts +1 -0
- package/dist/cypress/e2e/toolCompareStructures.cy.d.ts +1 -0
- package/dist/cypress/e2e/toolCreateHash.cy.d.ts +1 -0
- package/dist/cypress/e2e/toolMoneyFormat.cy.d.ts +1 -0
- package/dist/cypress/e2e/toolSlotsToData.cy.d.ts +1 -0
- package/dist/cypress/e2e/toolUniqueByKey.cy.d.ts +1 -0
- package/dist/cypress/support/commands.d.ts +0 -0
- package/dist/cypress/support/component.d.ts +9 -0
- package/dist/cypress/support/e2e.d.ts +0 -0
- package/dist/index.css +1 -1
- package/dist/packages/Hook/usePackageConfig/usePackageConfig.d.ts +2 -0
- package/dist/packages/MTable/src/MTable.vue.d.ts +49 -15
- package/dist/packages/MTable/src/token.d.ts +13 -0
- package/dist/packages/MTableColumn/src/MTableColumn.vue.d.ts +9 -14
- package/dist/packages/Tool/globalEvents/globalEvents.d.ts +26 -0
- package/dist/packages/index.d.ts +2 -0
- package/package.json +2 -2
- package/packages/Hook/usePackageConfig/usePackageConfig.ts +6 -4
- package/packages/Hook/useZIndex/useGlobalZIndex.ts +1 -1
- package/packages/MDialog/src/MDialog.vue +8 -8
- package/packages/MSelectTable/docs/README.md +1 -0
- package/packages/MSelectTable/src/MSelectTable.vue +6 -6
- package/packages/MTable/docs/DemoTest4.vue +0 -1
- package/packages/MTable/docs/DemoTest6.vue +122 -0
- package/packages/MTable/docs/DemoTest7.vue +138 -0
- package/packages/MTable/docs/README.md +10 -10
- package/packages/MTable/docs/demo.vue +10 -2
- package/packages/MTable/src/MBatchEdit.vue +1 -0
- package/packages/MTable/src/MTable.vue +254 -38
- package/packages/MTable/src/token.ts +14 -1
- package/packages/MTableColumn/docs/README.md +1 -0
- package/packages/MTableColumn/src/MTableColumn.vue +98 -24
- package/packages/Tool/globalEvents/README.md +23 -0
- package/packages/Tool/globalEvents/globalEvents.ts +79 -0
- package/packages/index.ts +2 -0
- package/packages/typings/global.d.ts +6 -2
- package/tags.json +1 -1
- package/tsconfig.json +3 -1
- package/web-types.json +1 -1
- 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
- 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
- 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
- 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
- package/src/global.d.ts +0 -5
|
@@ -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
|
|
19
|
-
| sole
|
|
20
|
-
| filtersValue
|
|
21
|
-
| expandProp
|
|
22
|
-
| tableConfigKey
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
| 其余参数
|
|
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
|
-
|
|
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>
|