@bildvitta/quasar-ui-asteroid 3.11.0-beta.10 → 3.11.0-beta.11
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
|
@@ -25,11 +25,6 @@ export default {
|
|
|
25
25
|
type: Object
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
list: {
|
|
29
|
-
default: () => [],
|
|
30
|
-
type: Array
|
|
31
|
-
},
|
|
32
|
-
|
|
33
28
|
tag: {
|
|
34
29
|
default: 'div',
|
|
35
30
|
type: String
|
|
@@ -40,7 +35,7 @@ export default {
|
|
|
40
35
|
type: String
|
|
41
36
|
},
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
modelValue: {
|
|
44
39
|
default: () => [],
|
|
45
40
|
type: Array
|
|
46
41
|
},
|
|
@@ -52,7 +47,7 @@ export default {
|
|
|
52
47
|
},
|
|
53
48
|
|
|
54
49
|
emits: [
|
|
55
|
-
'update:
|
|
50
|
+
'update:modelValue',
|
|
56
51
|
'sort',
|
|
57
52
|
'success',
|
|
58
53
|
'error'
|
|
@@ -76,9 +71,9 @@ export default {
|
|
|
76
71
|
this.sortable.options = { ...this.sortable.options, ...value }
|
|
77
72
|
},
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
handler (
|
|
81
|
-
this.
|
|
74
|
+
modelValue: {
|
|
75
|
+
handler (newValues) {
|
|
76
|
+
this.sortedList = newValues
|
|
82
77
|
},
|
|
83
78
|
|
|
84
79
|
deep: true
|
|
@@ -139,16 +134,17 @@ export default {
|
|
|
139
134
|
const deleted = this.sortedList.splice(oldIndex, 1)
|
|
140
135
|
this.sortedList.splice(newIndex, 0, deleted[0])
|
|
141
136
|
|
|
137
|
+
this.updateModel()
|
|
138
|
+
|
|
142
139
|
this.useSaveOnSort && this.replace()
|
|
143
140
|
},
|
|
144
141
|
|
|
145
|
-
setSortedValue (
|
|
146
|
-
this.sortedList = extend(true, [],
|
|
147
|
-
this.updateSortedModel()
|
|
142
|
+
setSortedValue () {
|
|
143
|
+
this.sortedList = extend(true, [], this.modelValue)
|
|
148
144
|
},
|
|
149
145
|
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
updateModel () {
|
|
147
|
+
this.$emit('update:modelValue', this.sortedList)
|
|
152
148
|
}
|
|
153
149
|
}
|
|
154
150
|
}
|
|
@@ -9,21 +9,16 @@ props:
|
|
|
9
9
|
required: true
|
|
10
10
|
type: String
|
|
11
11
|
|
|
12
|
-
list:
|
|
13
|
-
desc: Lista que vai ser reordenada.
|
|
14
|
-
default: []
|
|
15
|
-
type: Array
|
|
16
|
-
|
|
17
12
|
sortable-options:
|
|
18
13
|
desc: Opções do "sortablejs" (https://github.com/SortableJS/Sortable#options).
|
|
19
14
|
default: { animation: 500 }
|
|
20
15
|
type: Object
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
desc: Model
|
|
17
|
+
model-value:
|
|
18
|
+
desc: Model do componente onde será fornecido a lista, e ele será responsável pela ordenação.
|
|
24
19
|
default: []
|
|
25
20
|
type: Array
|
|
26
|
-
examples: [v-model
|
|
21
|
+
examples: [v-model="fields"]
|
|
27
22
|
model: true
|
|
28
23
|
|
|
29
24
|
tag:
|
|
@@ -62,9 +57,9 @@ events:
|
|
|
62
57
|
desc: fields.
|
|
63
58
|
type: Object
|
|
64
59
|
|
|
65
|
-
'@update:
|
|
66
|
-
desc: Dispara
|
|
60
|
+
'@update:model-value -> function(values)':
|
|
61
|
+
desc: Dispara quando o model-value altera, após acontecer uma ordenação.
|
|
67
62
|
params:
|
|
68
|
-
|
|
69
|
-
desc:
|
|
63
|
+
values:
|
|
64
|
+
desc: Novo valor do model.
|
|
70
65
|
type: Array
|