@afeefa/vue-app 0.0.321 → 0.0.323
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.323
|
package/package.json
CHANGED
|
@@ -32,24 +32,43 @@
|
|
|
32
32
|
v-on="$listeners"
|
|
33
33
|
@input="columnSelected"
|
|
34
34
|
/>
|
|
35
|
+
|
|
36
|
+
<v-btn
|
|
37
|
+
v-if="drag"
|
|
38
|
+
x-small
|
|
39
|
+
text
|
|
40
|
+
class="mt-2 reset-button"
|
|
41
|
+
@click="resetColumnOrder"
|
|
42
|
+
>
|
|
43
|
+
<v-icon
|
|
44
|
+
small
|
|
45
|
+
class="mr-1"
|
|
46
|
+
>
|
|
47
|
+
{{ mdiRestore }}
|
|
48
|
+
</v-icon>
|
|
49
|
+
Reihenfolge zurücksetzen
|
|
50
|
+
</v-btn>
|
|
35
51
|
</a-context-menu>
|
|
36
52
|
</div>
|
|
37
53
|
</template>
|
|
38
54
|
|
|
39
55
|
<script>
|
|
40
56
|
import { Component, Vue } from '@a-vue'
|
|
41
|
-
import { mdiViewColumn } from '@mdi/js'
|
|
57
|
+
import { mdiRestore, mdiViewColumn } from '@mdi/js'
|
|
42
58
|
|
|
43
59
|
@Component({
|
|
44
60
|
props: ['columns', 'storageKey', {drag: false}]
|
|
45
61
|
})
|
|
46
62
|
export default class ListColumnSelector extends Vue {
|
|
47
63
|
mdiViewColumn = mdiViewColumn
|
|
64
|
+
mdiRestore = mdiRestore
|
|
48
65
|
|
|
49
66
|
columns_ = {}
|
|
67
|
+
defaultColumns = {}
|
|
50
68
|
selectedColumns = []
|
|
51
69
|
|
|
52
70
|
created () {
|
|
71
|
+
this.defaultColumns = JSON.parse(JSON.stringify(this.columns))
|
|
53
72
|
this.loadColumnConfiguration()
|
|
54
73
|
this.saveColumnConfiguration()
|
|
55
74
|
}
|
|
@@ -72,6 +91,17 @@ export default class ListColumnSelector extends Vue {
|
|
|
72
91
|
this.saveColumnConfiguration()
|
|
73
92
|
}
|
|
74
93
|
|
|
94
|
+
resetColumnOrder () {
|
|
95
|
+
const defaultKeys = Object.keys(this.defaultColumns)
|
|
96
|
+
const columns = {}
|
|
97
|
+
for (const key of defaultKeys) {
|
|
98
|
+
columns[key] = this.columns_[key]
|
|
99
|
+
}
|
|
100
|
+
this.columns_ = columns
|
|
101
|
+
this.$emit('update:columns', this.columns_)
|
|
102
|
+
this.saveColumnConfiguration()
|
|
103
|
+
}
|
|
104
|
+
|
|
75
105
|
columnOrderChanged (options) {
|
|
76
106
|
const columns = {}
|
|
77
107
|
for (const option of options) {
|
|
@@ -147,4 +177,10 @@ export default class ListColumnSelector extends Vue {
|
|
|
147
177
|
color: #666666;
|
|
148
178
|
}
|
|
149
179
|
}
|
|
180
|
+
|
|
181
|
+
.reset-button {
|
|
182
|
+
font-size: .75rem;
|
|
183
|
+
text-transform: none;
|
|
184
|
+
letter-spacing: normal;
|
|
185
|
+
}
|
|
150
186
|
</style>
|