@bildvitta/quasar-ui-asteroid 3.17.0-beta.30 → 3.17.0-beta.32
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
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{{ scope.opt.label }}
|
|
39
39
|
</q-item-label>
|
|
40
40
|
|
|
41
|
-
<div v-for="(badge, index) in getFilteredBadgeList(scope.opt)" :key="index">
|
|
41
|
+
<div v-for="(badge, index) in getFilteredBadgeList(scope.opt)" :key="index" class="flex">
|
|
42
42
|
<qas-badge v-if="hasBadge(badge)" v-bind="getBadgeProps(badge)" />
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
@@ -247,7 +247,16 @@ export default {
|
|
|
247
247
|
},
|
|
248
248
|
|
|
249
249
|
canSetDefaultOption () {
|
|
250
|
-
|
|
250
|
+
// Como o default do model pode ser um array (caso de multiple), é necessário validar o length
|
|
251
|
+
const hasModelValue = Array.isArray(this.modelValue) ? !!this.modelValue.length : !!this.modelValue
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Posso setar o default quando:
|
|
255
|
+
* - O campo for required ou tiver a prop useAutoSelect
|
|
256
|
+
* - Tiver apenas uma option
|
|
257
|
+
* - O modelValue estiver vazio
|
|
258
|
+
*/
|
|
259
|
+
return (this.required || this.useAutoSelect) && this.options.length === 1 && !hasModelValue
|
|
251
260
|
},
|
|
252
261
|
|
|
253
262
|
// redesign
|
|
@@ -7,7 +7,7 @@ meta:
|
|
|
7
7
|
desc: Componente para select que implementa o "QSelect" repassando propriedades, slots e eventos.
|
|
8
8
|
|
|
9
9
|
props:
|
|
10
|
-
badge-
|
|
10
|
+
badge-props:
|
|
11
11
|
desc: Configuração das badges no qual cada key é um callback com o valor booleano retornado pelo back.
|
|
12
12
|
default: {}
|
|
13
13
|
examples: ["{ isTester: () => { return { color: 'grey-8', label: 'Tester', textColor: 'white' }} }"]
|
|
@@ -41,6 +41,7 @@ import { baseProps } from '../../shared/badge-config'
|
|
|
41
41
|
|
|
42
42
|
import {
|
|
43
43
|
computed,
|
|
44
|
+
nextTick,
|
|
44
45
|
onMounted,
|
|
45
46
|
onUnmounted,
|
|
46
47
|
ref,
|
|
@@ -225,7 +226,9 @@ function useTruncate ({ parent, props, hasBadges }) {
|
|
|
225
226
|
watch(() => props.maxWidth, truncateText)
|
|
226
227
|
|
|
227
228
|
// functions
|
|
228
|
-
function truncateText () {
|
|
229
|
+
async function truncateText () {
|
|
230
|
+
await nextTick()
|
|
231
|
+
|
|
229
232
|
// Se tiver badges, então não pode ser feito calculo de width.
|
|
230
233
|
if (hasBadges.value) return
|
|
231
234
|
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
</slot>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
+
<div v-if="hasAfterGreetingSlot" class="q-mt-lg">
|
|
18
|
+
<slot name="after-greeting" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
17
21
|
<div v-if="hasShortcuts">
|
|
18
22
|
<qas-label class="q-mt-lg" label="Atalhos" />
|
|
19
23
|
|
|
@@ -102,6 +106,10 @@ export default {
|
|
|
102
106
|
if (time >= '12:00' && time < '18:59') return 'Boa tarde'
|
|
103
107
|
|
|
104
108
|
return 'Boa noite'
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
hasAfterGreetingSlot () {
|
|
112
|
+
return !!this.$slots['after-greeting']
|
|
105
113
|
}
|
|
106
114
|
}
|
|
107
115
|
}
|