@afeefa/vue-app 0.0.320 → 0.0.321
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 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.321
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively merges source into target.
|
|
3
|
+
* Returns a new object without mutating target or source.
|
|
4
|
+
* Arrays and non-plain-objects are overwritten (not merged).
|
|
5
|
+
*/
|
|
6
|
+
export function deepMerge (target, source) {
|
|
7
|
+
const result = { ...target }
|
|
8
|
+
for (const key of Object.keys(source)) {
|
|
9
|
+
if (
|
|
10
|
+
result[key] && typeof result[key] === 'object' && !Array.isArray(result[key]) &&
|
|
11
|
+
source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])
|
|
12
|
+
) {
|
|
13
|
+
result[key] = deepMerge(result[key], source[key])
|
|
14
|
+
} else {
|
|
15
|
+
result[key] = source[key]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return result
|
|
19
|
+
}
|
|
20
|
+
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<a-context-menu>
|
|
4
4
|
<template #activator>
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<v-btn
|
|
6
|
+
class="columnsButton"
|
|
7
|
+
title="Spalten wählen"
|
|
8
|
+
>
|
|
9
|
+
<v-icon color="#BBBBBB">
|
|
10
|
+
{{ mdiViewColumn }}
|
|
11
|
+
</v-icon>
|
|
12
|
+
<div class="ml-1">
|
|
13
|
+
{{ selectedColumns.length }}/{{ Object.keys(columns_).length }}
|
|
14
|
+
</div>
|
|
15
|
+
</v-btn>
|
|
8
16
|
</template>
|
|
9
17
|
|
|
10
18
|
<a-draggable-checkbox-group
|
|
@@ -30,11 +38,14 @@
|
|
|
30
38
|
|
|
31
39
|
<script>
|
|
32
40
|
import { Component, Vue } from '@a-vue'
|
|
41
|
+
import { mdiViewColumn } from '@mdi/js'
|
|
33
42
|
|
|
34
43
|
@Component({
|
|
35
44
|
props: ['columns', 'storageKey', {drag: false}]
|
|
36
45
|
})
|
|
37
46
|
export default class ListColumnSelector extends Vue {
|
|
47
|
+
mdiViewColumn = mdiViewColumn
|
|
48
|
+
|
|
38
49
|
columns_ = {}
|
|
39
50
|
selectedColumns = []
|
|
40
51
|
|
|
@@ -54,9 +65,10 @@ export default class ListColumnSelector extends Vue {
|
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
columnSelected () {
|
|
57
|
-
for (const key in this.
|
|
58
|
-
this.
|
|
68
|
+
for (const key in this.columns_) {
|
|
69
|
+
this.columns_[key].visible = this.selectedColumns.includes(key)
|
|
59
70
|
}
|
|
71
|
+
this.$emit('update:columns', this.columns_)
|
|
60
72
|
this.saveColumnConfiguration()
|
|
61
73
|
}
|
|
62
74
|
|
|
@@ -126,8 +138,13 @@ export default class ListColumnSelector extends Vue {
|
|
|
126
138
|
|
|
127
139
|
|
|
128
140
|
<style lang="scss" scoped>
|
|
129
|
-
.
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
.columnsButton {
|
|
142
|
+
padding: 0 8px 0 5px !important;
|
|
143
|
+
height: 2.2rem !important;
|
|
144
|
+
|
|
145
|
+
div {
|
|
146
|
+
font-size: .8rem;
|
|
147
|
+
color: #666666;
|
|
148
|
+
}
|
|
132
149
|
}
|
|
133
150
|
</style>
|