@bildvitta/quasar-ui-asteroid 3.11.0-beta.10 → 3.11.0-beta.12
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 +1 -1
- package/src/components/field/QasField.vue +2 -1
- package/src/components/form-view/QasFormView.vue +17 -1
- package/src/components/form-view/QasFormView.yml +6 -0
- package/src/components/numeric-input/QasNumericInput.vue +2 -2
- package/src/components/numeric-input/QasNumericInput.yml +1 -1
- package/src/components/sortable/QasSortable.vue +11 -15
- package/src/components/sortable/QasSortable.yml +7 -12
- package/src/css/components/button.scss +2 -2
- package/src/mixins/search-filter.js +1 -1
package/package.json
CHANGED
|
@@ -74,6 +74,7 @@ export default {
|
|
|
74
74
|
filled = readonly,
|
|
75
75
|
suffix,
|
|
76
76
|
prefix,
|
|
77
|
+
places,
|
|
77
78
|
type,
|
|
78
79
|
mask,
|
|
79
80
|
maxFiles,
|
|
@@ -104,7 +105,7 @@ export default {
|
|
|
104
105
|
useIso
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
const numericInput = { is: 'qas-numeric-input', ...input }
|
|
108
|
+
const numericInput = { is: 'qas-numeric-input', places, ...input }
|
|
108
109
|
const datetimeInput = { is: 'qas-date-time-input', useIso, ...input }
|
|
109
110
|
|
|
110
111
|
// It'll generate a list of acceptable files extensions.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<slot name="header" />
|
|
5
5
|
</header>
|
|
6
6
|
|
|
7
|
-
<q-form ref="form"
|
|
7
|
+
<q-form ref="form" v-bind="defaultFormProps">
|
|
8
8
|
<slot />
|
|
9
9
|
|
|
10
10
|
<slot v-if="useActions" name="actions">
|
|
@@ -76,6 +76,11 @@ export default {
|
|
|
76
76
|
type: Boolean
|
|
77
77
|
},
|
|
78
78
|
|
|
79
|
+
formProps: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default: () => ({})
|
|
82
|
+
},
|
|
83
|
+
|
|
79
84
|
mode: {
|
|
80
85
|
default: 'create',
|
|
81
86
|
type: String
|
|
@@ -191,6 +196,17 @@ export default {
|
|
|
191
196
|
error: 'Não conseguimos salvar as informações. Por favor, tente novamente em alguns minutos.',
|
|
192
197
|
success: 'Informações salvas com sucesso.'
|
|
193
198
|
}
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
defaultFormProps () {
|
|
202
|
+
return {
|
|
203
|
+
...this.formProps,
|
|
204
|
+
|
|
205
|
+
onSubmit: event => {
|
|
206
|
+
this.submitHandler(event)
|
|
207
|
+
this.formProps?.onSubmit?.(event)
|
|
208
|
+
}
|
|
209
|
+
}
|
|
194
210
|
}
|
|
195
211
|
},
|
|
196
212
|
|
|
@@ -66,6 +66,12 @@ props:
|
|
|
66
66
|
examples: [v-model:fields="fields"]
|
|
67
67
|
model: true
|
|
68
68
|
|
|
69
|
+
form-props:
|
|
70
|
+
desc: Repassa todas as props/eventos para o `QForm`.
|
|
71
|
+
default: {}
|
|
72
|
+
type: Object
|
|
73
|
+
examples: ['{ onValidationError: ref => validationErrorHandler(ref) }']
|
|
74
|
+
|
|
69
75
|
ignore-keys-in-unsaved-changes:
|
|
70
76
|
desc: Vamos imaginar um cenário onde você precisa alterar valores do v-model por qualquer motivo que seja, mas quando o usuário sair da tela, não pode aparecer o modal perguntando se ele quer sair ou continuar editando, por que o usuário de fato não fez nenhuma alteração nos dados, esta prop serve para você dizer quais keys dentro do v-model você quer ignorar.
|
|
71
77
|
default: []
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
type: Object
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
places: {
|
|
29
29
|
default: 2,
|
|
30
30
|
type: Number
|
|
31
31
|
},
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (this.mode !== 'integer') {
|
|
116
|
-
options.decimalPlaces = this.
|
|
116
|
+
options.decimalPlaces = this.places
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
if (this.mode === 'money') {
|
|
@@ -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
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
position: relative;
|
|
40
40
|
|
|
41
41
|
&:disabled {
|
|
42
|
-
color: $grey-
|
|
42
|
+
color: $grey-6 !important;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
padding: 0 !important;
|
|
59
59
|
|
|
60
60
|
&:disabled {
|
|
61
|
-
color: $grey-
|
|
61
|
+
color: $grey-6 !important;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&-grey-9 {
|