quasar 2.8.3 → 2.9.0
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/dist/api/QBreadcrumbsEl.json +52 -0
- package/dist/api/QBtn.json +41 -6
- package/dist/api/QBtnDropdown.json +9 -0
- package/dist/api/QChip.json +9 -0
- package/dist/api/QCircularProgress.json +6 -0
- package/dist/api/QEditor.json +7 -0
- package/dist/api/QExpansionItem.json +59 -0
- package/dist/api/QItem.json +52 -0
- package/dist/api/QRating.json +13 -0
- package/dist/api/QRouteTab.json +42 -6
- package/dist/api/QTable.json +2 -2
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar-TN.umd.prod.js +2 -2
- package/dist/lang/ar.umd.prod.js +2 -2
- package/dist/lang/az-Latn.umd.prod.js +2 -2
- package/dist/lang/bg.umd.prod.js +2 -2
- package/dist/lang/bn.umd.prod.js +2 -2
- package/dist/lang/ca.umd.prod.js +2 -2
- package/dist/lang/cs.umd.prod.js +2 -2
- package/dist/lang/da.umd.prod.js +2 -2
- package/dist/lang/de.umd.prod.js +2 -2
- package/dist/lang/el.umd.prod.js +2 -2
- package/dist/lang/en-GB.umd.prod.js +2 -2
- package/dist/lang/en-US.umd.prod.js +2 -2
- package/dist/lang/eo.umd.prod.js +2 -2
- package/dist/lang/es.umd.prod.js +2 -2
- package/dist/lang/et.umd.prod.js +2 -2
- package/dist/lang/eu.umd.prod.js +2 -2
- package/dist/lang/fa-IR.umd.prod.js +2 -2
- package/dist/lang/fa.umd.prod.js +2 -2
- package/dist/lang/fi.umd.prod.js +2 -2
- package/dist/lang/fr.umd.prod.js +2 -2
- package/dist/lang/gn.umd.prod.js +2 -2
- package/dist/lang/he.umd.prod.js +2 -2
- package/dist/lang/hr.umd.prod.js +2 -2
- package/dist/lang/hu.umd.prod.js +2 -2
- package/dist/lang/id.umd.prod.js +2 -2
- package/dist/lang/is.umd.prod.js +2 -2
- package/dist/lang/it.umd.prod.js +2 -2
- package/dist/lang/ja.umd.prod.js +2 -2
- package/dist/lang/km.umd.prod.js +2 -2
- package/dist/lang/ko-KR.umd.prod.js +2 -2
- package/dist/lang/kur-CKB.umd.prod.js +2 -2
- package/dist/lang/kz.umd.prod.js +2 -2
- package/dist/lang/lt.umd.prod.js +2 -2
- package/dist/lang/lu.umd.prod.js +2 -2
- package/dist/lang/lv.umd.prod.js +2 -2
- package/dist/lang/ml.umd.prod.js +2 -2
- package/dist/lang/mm.umd.prod.js +2 -2
- package/dist/lang/ms.umd.prod.js +2 -2
- package/dist/lang/my.umd.prod.js +2 -2
- package/dist/lang/nb-NO.umd.prod.js +2 -2
- package/dist/lang/nl.umd.prod.js +2 -2
- package/dist/lang/pl.umd.prod.js +2 -2
- package/dist/lang/pt-BR.umd.prod.js +2 -2
- package/dist/lang/pt.umd.prod.js +2 -2
- package/dist/lang/ro.umd.prod.js +2 -2
- package/dist/lang/ru.umd.prod.js +2 -2
- package/dist/lang/sk.umd.prod.js +2 -2
- package/dist/lang/sl.umd.prod.js +2 -2
- package/dist/lang/sm.umd.prod.js +2 -2
- package/dist/lang/sr-CYR.umd.prod.js +2 -2
- package/dist/lang/sr.umd.prod.js +2 -2
- package/dist/lang/sv.umd.prod.js +2 -2
- package/dist/lang/ta.umd.prod.js +2 -2
- package/dist/lang/th.umd.prod.js +2 -2
- package/dist/lang/tr.umd.prod.js +2 -2
- package/dist/lang/ug.umd.prod.js +2 -2
- package/dist/lang/uk.umd.prod.js +2 -2
- package/dist/lang/uz-Cyrl.umd.prod.js +2 -2
- package/dist/lang/uz-Latn.umd.prod.js +2 -2
- package/dist/lang/vi.umd.prod.js +2 -2
- package/dist/lang/zh-CN.umd.prod.js +2 -2
- package/dist/lang/zh-TW.umd.prod.js +2 -2
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.esm.js +16157 -15723
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.sass +1 -1
- package/dist/quasar.umd.js +16290 -15854
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/transforms/import-map.json +2 -0
- package/dist/types/api/qeditor.d.ts +17 -0
- package/dist/types/api/qloading.d.ts +5 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/index.d.ts +133 -9
- package/dist/types/utils/is.d.ts +67 -0
- package/dist/types/utils/run-sequential-promises.d.ts +119 -0
- package/dist/types/utils.d.ts +9 -0
- package/dist/vetur/quasar-attributes.json +25 -1
- package/dist/vetur/quasar-tags.json +7 -1
- package/dist/web-types/web-types.json +108 -10
- package/lang/ar-TN.js +3 -1
- package/lang/ar-TN.mjs +3 -1
- package/lang/ar.js +3 -1
- package/lang/ar.mjs +3 -1
- package/lang/az-Latn.js +3 -1
- package/lang/az-Latn.mjs +3 -1
- package/lang/bg.js +3 -1
- package/lang/bg.mjs +3 -1
- package/lang/bn.js +3 -1
- package/lang/bn.mjs +3 -1
- package/lang/ca.js +3 -1
- package/lang/ca.mjs +3 -1
- package/lang/cs.js +3 -1
- package/lang/cs.mjs +3 -1
- package/lang/da.js +3 -1
- package/lang/da.mjs +3 -1
- package/lang/de.js +3 -1
- package/lang/de.mjs +3 -1
- package/lang/el.js +3 -1
- package/lang/el.mjs +3 -1
- package/lang/en-GB.js +3 -1
- package/lang/en-GB.mjs +3 -1
- package/lang/en-US.js +3 -1
- package/lang/en-US.mjs +3 -1
- package/lang/eo.js +3 -1
- package/lang/eo.mjs +3 -1
- package/lang/es.js +3 -1
- package/lang/es.mjs +3 -1
- package/lang/et.js +3 -1
- package/lang/et.mjs +3 -1
- package/lang/eu.js +3 -1
- package/lang/eu.mjs +3 -1
- package/lang/fa-IR.js +5 -3
- package/lang/fa-IR.mjs +5 -3
- package/lang/fa.js +5 -3
- package/lang/fa.mjs +5 -3
- package/lang/fi.js +3 -1
- package/lang/fi.mjs +3 -1
- package/lang/fr.js +3 -1
- package/lang/fr.mjs +3 -1
- package/lang/gn.js +3 -1
- package/lang/gn.mjs +3 -1
- package/lang/he.js +3 -1
- package/lang/he.mjs +3 -1
- package/lang/hr.js +3 -1
- package/lang/hr.mjs +3 -1
- package/lang/hu.js +3 -1
- package/lang/hu.mjs +3 -1
- package/lang/id.js +3 -1
- package/lang/id.mjs +3 -1
- package/lang/is.js +3 -1
- package/lang/is.mjs +3 -1
- package/lang/it.js +3 -1
- package/lang/it.mjs +3 -1
- package/lang/ja.js +3 -1
- package/lang/ja.mjs +3 -1
- package/lang/km.js +3 -1
- package/lang/km.mjs +3 -1
- package/lang/ko-KR.js +3 -1
- package/lang/ko-KR.mjs +3 -1
- package/lang/kur-CKB.js +3 -1
- package/lang/kur-CKB.mjs +3 -1
- package/lang/kz.js +3 -1
- package/lang/kz.mjs +3 -1
- package/lang/lt.js +3 -1
- package/lang/lt.mjs +3 -1
- package/lang/lu.js +3 -1
- package/lang/lu.mjs +3 -1
- package/lang/lv.js +3 -1
- package/lang/lv.mjs +3 -1
- package/lang/ml.js +3 -1
- package/lang/ml.mjs +3 -1
- package/lang/mm.js +4 -1
- package/lang/mm.mjs +4 -1
- package/lang/ms.js +3 -1
- package/lang/ms.mjs +3 -1
- package/lang/my.js +3 -1
- package/lang/my.mjs +3 -1
- package/lang/nb-NO.js +3 -1
- package/lang/nb-NO.mjs +3 -1
- package/lang/nl.js +3 -1
- package/lang/nl.mjs +3 -1
- package/lang/pl.js +3 -1
- package/lang/pl.mjs +3 -1
- package/lang/pt-BR.js +3 -1
- package/lang/pt-BR.mjs +3 -1
- package/lang/pt.js +3 -1
- package/lang/pt.mjs +3 -1
- package/lang/ro.js +3 -1
- package/lang/ro.mjs +3 -1
- package/lang/ru.js +3 -1
- package/lang/ru.mjs +3 -1
- package/lang/sk.js +3 -1
- package/lang/sk.mjs +3 -1
- package/lang/sl.js +3 -1
- package/lang/sl.mjs +3 -1
- package/lang/sm.js +3 -1
- package/lang/sm.mjs +3 -1
- package/lang/sr-CYR.js +3 -1
- package/lang/sr-CYR.mjs +3 -1
- package/lang/sr.js +3 -1
- package/lang/sr.mjs +3 -1
- package/lang/sv.js +3 -1
- package/lang/sv.mjs +3 -1
- package/lang/ta.js +3 -1
- package/lang/ta.mjs +3 -1
- package/lang/th.js +3 -1
- package/lang/th.mjs +3 -1
- package/lang/tr.js +3 -1
- package/lang/tr.mjs +3 -1
- package/lang/ug.js +5 -3
- package/lang/ug.mjs +5 -3
- package/lang/uk.js +3 -1
- package/lang/uk.mjs +3 -1
- package/lang/uz-Cyrl.js +3 -1
- package/lang/uz-Cyrl.mjs +3 -1
- package/lang/uz-Latn.js +3 -1
- package/lang/uz-Latn.mjs +3 -1
- package/lang/vi.js +3 -1
- package/lang/vi.mjs +3 -1
- package/lang/zh-CN.js +3 -1
- package/lang/zh-CN.mjs +3 -1
- package/lang/zh-TW.js +3 -1
- package/lang/zh-TW.mjs +3 -1
- package/package.json +6 -5
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +6 -7
- package/src/components/breadcrumbs/QBreadcrumbsEl.json +53 -0
- package/src/components/btn/QBtn.js +19 -19
- package/src/components/btn/QBtn.json +41 -6
- package/src/components/btn/use-btn.js +6 -4
- package/src/components/btn-dropdown/QBtnDropdown.js +10 -2
- package/src/components/btn-dropdown/QBtnDropdown.json +8 -0
- package/src/components/checkbox/QCheckbox.js +1 -2
- package/src/components/checkbox/use-checkbox.js +2 -1
- package/src/components/chip/QChip.js +9 -2
- package/src/components/chip/QChip.json +8 -0
- package/src/components/chip/__tests__/QChip.spec.js +359 -46
- package/src/components/circular-progress/QCircularProgress.js +4 -2
- package/src/components/circular-progress/QCircularProgress.json +7 -0
- package/src/components/circular-progress/use-circular-progress.js +1 -0
- package/src/components/dialog/QDialog.js +7 -4
- package/src/components/drawer/QDrawer.js +7 -4
- package/src/components/editor/QEditor.json +9 -0
- package/src/components/expansion-item/QExpansionItem.js +37 -8
- package/src/components/expansion-item/QExpansionItem.json +67 -0
- package/src/components/fab/QFab.js +20 -1
- package/src/components/form/QForm.js +35 -40
- package/src/components/form/QFormChildMixin.js +3 -1
- package/src/components/item/QItem.js +4 -5
- package/src/components/item/QItem.json +53 -0
- package/src/components/menu/QMenu.js +5 -5
- package/src/components/menu/__tests__/QMenu.spec.js +7 -0
- package/src/components/page/QPage.js +1 -1
- package/src/components/popup-edit/QPopupEdit.js +2 -5
- package/src/components/radio/QRadio.js +3 -3
- package/src/components/rating/QRating.js +48 -10
- package/src/components/rating/QRating.json +11 -0
- package/src/components/select/QSelect.js +1 -4
- package/src/components/stepper/QStep.js +5 -3
- package/src/components/table/QTable.js +4 -6
- package/src/components/table/QTable.json +2 -2
- package/src/components/tabs/QRouteTab.js +6 -4
- package/src/components/tabs/QRouteTab.json +42 -6
- package/src/components/tabs/QTabs.js +188 -107
- package/src/components/tabs/use-tab.js +62 -38
- package/src/components/time/QTime.js +2 -2
- package/src/components/tooltip/QTooltip.js +7 -13
- package/src/components/tree/QTree.js +1 -1
- package/src/components/uploader/uploader-core.js +2 -3
- package/src/composables/private/__tests__/use-model-toggle.spec.js +2 -0
- package/src/composables/private/__tests__/use-transition.spec.js +4 -0
- package/src/composables/private/use-file.js +1 -1
- package/src/composables/private/use-router-link.js +80 -43
- package/src/composables/private/use-tick.js +15 -9
- package/src/composables/private/use-timeout.js +20 -7
- package/src/composables/private/use-validate.js +7 -13
- package/src/composables/use-form-child.js +6 -4
- package/src/directives/TouchPan.js +1 -1
- package/src/directives/TouchRepeat.js +1 -1
- package/src/directives/TouchSwipe.js +1 -1
- package/src/utils/EventBus.js +64 -0
- package/src/utils/extend.js +19 -19
- package/src/utils/private/inject-obj-prop.js +2 -0
- package/src/utils/private/rtl.js +10 -7
- package/src/utils/private/vm.js +4 -0
- package/src/utils/run-sequential-promises.js +115 -0
- package/src/utils.js +4 -0
|
@@ -31,6 +31,8 @@ export default createComponent({
|
|
|
31
31
|
iconHalf: [ String, Array ],
|
|
32
32
|
iconSelected: [ String, Array ],
|
|
33
33
|
|
|
34
|
+
iconAriaLabel: [ String, Array ],
|
|
35
|
+
|
|
34
36
|
color: [ String, Array ],
|
|
35
37
|
colorHalf: [ String, Array ],
|
|
36
38
|
colorSelected: [ String, Array ],
|
|
@@ -96,11 +98,29 @@ export default createComponent({
|
|
|
96
98
|
}
|
|
97
99
|
})
|
|
98
100
|
|
|
101
|
+
const iconLabel = computed(() => {
|
|
102
|
+
if (typeof props.iconAriaLabel === 'string') {
|
|
103
|
+
const label = props.iconAriaLabel.length > 0 ? `${ props.iconAriaLabel } ` : ''
|
|
104
|
+
return i => `${ label }${ i }`
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (Array.isArray(props.iconAriaLabel) === true) {
|
|
108
|
+
const iMax = props.iconAriaLabel.length
|
|
109
|
+
|
|
110
|
+
if (iMax > 0) {
|
|
111
|
+
return i => props.iconAriaLabel[ Math.min(i, iMax) - 1 ]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return (i, label) => `${ label } ${ i }`
|
|
116
|
+
})
|
|
117
|
+
|
|
99
118
|
const stars = computed(() => {
|
|
100
119
|
const
|
|
101
120
|
acc = [],
|
|
102
121
|
icons = iconData.value,
|
|
103
|
-
ceil = Math.ceil(props.modelValue)
|
|
122
|
+
ceil = Math.ceil(props.modelValue),
|
|
123
|
+
tabindex = editable.value === true ? 0 : null
|
|
104
124
|
|
|
105
125
|
const halfIndex = props.iconHalf === void 0 || ceil === props.modelValue
|
|
106
126
|
? -1
|
|
@@ -117,7 +137,16 @@ export default createComponent({
|
|
|
117
137
|
icons.selColor !== void 0 && active === true
|
|
118
138
|
? (i <= icons.selColorLen ? props.colorSelected[ i - 1 ] : icons.selColor)
|
|
119
139
|
: (i <= icons.colorLen ? props.color[ i - 1 ] : icons.color)
|
|
120
|
-
)
|
|
140
|
+
),
|
|
141
|
+
name = (
|
|
142
|
+
half === true
|
|
143
|
+
? (i <= icons.halfIconLen ? props.iconHalf[ i - 1 ] : icons.halfIcon)
|
|
144
|
+
: (
|
|
145
|
+
icons.selIcon !== void 0 && (active === true || exSelected === true)
|
|
146
|
+
? (i <= icons.selIconLen ? props.iconSelected[ i - 1 ] : icons.selIcon)
|
|
147
|
+
: (i <= icons.iconLen ? props.icon[ i - 1 ] : icons.icon)
|
|
148
|
+
)
|
|
149
|
+
) || $q.iconSet.rating.icon
|
|
121
150
|
|
|
122
151
|
acc.push({
|
|
123
152
|
name: (
|
|
@@ -130,7 +159,14 @@ export default createComponent({
|
|
|
130
159
|
)
|
|
131
160
|
) || $q.iconSet.rating.icon,
|
|
132
161
|
|
|
133
|
-
|
|
162
|
+
attrs: {
|
|
163
|
+
tabindex,
|
|
164
|
+
role: 'radio',
|
|
165
|
+
'aria-checked': props.modelValue === i ? 'true' : 'false',
|
|
166
|
+
'aria-label': iconLabel.value(i, name)
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
iconClass: 'q-rating__icon'
|
|
134
170
|
+ (active === true || half === true ? ' q-rating__icon--active' : '')
|
|
135
171
|
+ (exSelected === true ? ' q-rating__icon--exselected' : '')
|
|
136
172
|
+ (mouseModel.value === i ? ' q-rating__icon--hovered' : '')
|
|
@@ -142,15 +178,17 @@ export default createComponent({
|
|
|
142
178
|
})
|
|
143
179
|
|
|
144
180
|
const attributes = computed(() => {
|
|
181
|
+
const attrs = { role: 'radiogroup' }
|
|
182
|
+
|
|
145
183
|
if (props.disable === true) {
|
|
146
|
-
|
|
184
|
+
attrs[ 'aria-disabled' ] = 'true'
|
|
147
185
|
}
|
|
148
186
|
if (props.readonly === true) {
|
|
149
|
-
|
|
187
|
+
attrs[ 'aria-readonly' ] = 'true'
|
|
150
188
|
}
|
|
151
|
-
})
|
|
152
189
|
|
|
153
|
-
|
|
190
|
+
return attrs
|
|
191
|
+
})
|
|
154
192
|
|
|
155
193
|
function set (value) {
|
|
156
194
|
if (editable.value === true) {
|
|
@@ -201,7 +239,7 @@ export default createComponent({
|
|
|
201
239
|
return () => {
|
|
202
240
|
const child = []
|
|
203
241
|
|
|
204
|
-
stars.value.forEach(({
|
|
242
|
+
stars.value.forEach(({ iconClass, name, attrs }, index) => {
|
|
205
243
|
const i = index + 1
|
|
206
244
|
|
|
207
245
|
child.push(
|
|
@@ -209,7 +247,7 @@ export default createComponent({
|
|
|
209
247
|
key: i,
|
|
210
248
|
ref: vm => { iconRefs[ `rt${ i }` ] = vm },
|
|
211
249
|
class: 'q-rating__icon-container flex flex-center',
|
|
212
|
-
|
|
250
|
+
...attrs,
|
|
213
251
|
onClick () { set(i) },
|
|
214
252
|
onMouseover () { setHoverValue(i) },
|
|
215
253
|
onMouseout: resetMouseModel,
|
|
@@ -218,7 +256,7 @@ export default createComponent({
|
|
|
218
256
|
onKeyup (e) { onKeyup(e, i) }
|
|
219
257
|
}, hMergeSlot(
|
|
220
258
|
slots[ `tip-${ i }` ],
|
|
221
|
-
[ h(QIcon, { class:
|
|
259
|
+
[ h(QIcon, { class: iconClass, name }) ]
|
|
222
260
|
))
|
|
223
261
|
)
|
|
224
262
|
})
|
|
@@ -56,6 +56,17 @@
|
|
|
56
56
|
"category": "content"
|
|
57
57
|
},
|
|
58
58
|
|
|
59
|
+
"icon-aria-label": {
|
|
60
|
+
"type": [ "String", "Array" ],
|
|
61
|
+
"desc": "Label to be set on aria-label for Icon; If an array is provided each rating value will use the corresponding aria-label in the array (0 based); If string value is provided the rating value will be appended; If not provided the name of the icon will be used",
|
|
62
|
+
"examples": [
|
|
63
|
+
"Rating",
|
|
64
|
+
"[\"Bad\", \"Normal\", \"Good\"]"
|
|
65
|
+
],
|
|
66
|
+
"category": "accessibility",
|
|
67
|
+
"addedIn": "v1.20.3"
|
|
68
|
+
},
|
|
69
|
+
|
|
59
70
|
"color": {
|
|
60
71
|
"extends": "color",
|
|
61
72
|
"type": [ "String", "Array" ],
|
|
@@ -273,16 +273,13 @@ export default createComponent({
|
|
|
273
273
|
tabindex: props.tabindex,
|
|
274
274
|
role: 'combobox',
|
|
275
275
|
'aria-label': props.label,
|
|
276
|
+
'aria-readonly': props.readonly === true ? 'true' : 'false',
|
|
276
277
|
'aria-autocomplete': props.useInput === true ? 'list' : 'none',
|
|
277
278
|
'aria-expanded': menu.value === true ? 'true' : 'false',
|
|
278
279
|
'aria-owns': `${ state.targetUid.value }_lb`,
|
|
279
280
|
'aria-controls': `${ state.targetUid.value }_lb`
|
|
280
281
|
}
|
|
281
282
|
|
|
282
|
-
if (optionIndex.value >= 0) {
|
|
283
|
-
attrs[ 'aria-activedescendant' ] = `${ state.targetUid.value }_${ optionIndex.value }`
|
|
284
|
-
}
|
|
285
|
-
|
|
286
283
|
return attrs
|
|
287
284
|
})
|
|
288
285
|
|
|
@@ -53,10 +53,12 @@ export default createComponent({
|
|
|
53
53
|
default: true
|
|
54
54
|
},
|
|
55
55
|
done: Boolean,
|
|
56
|
-
error: Boolean
|
|
56
|
+
error: Boolean,
|
|
57
|
+
|
|
58
|
+
onScroll: [ Function, Array ]
|
|
57
59
|
},
|
|
58
60
|
|
|
59
|
-
setup (props, {
|
|
61
|
+
setup (props, { slots, emit }) {
|
|
60
62
|
const { proxy: { $q } } = getCurrentInstance()
|
|
61
63
|
|
|
62
64
|
const $stepper = inject(stepperKey, () => {
|
|
@@ -80,7 +82,7 @@ export default createComponent({
|
|
|
80
82
|
if (target.scrollTop > 0) {
|
|
81
83
|
target.scrollTop = 0
|
|
82
84
|
}
|
|
83
|
-
|
|
85
|
+
props.onScroll !== void 0 && emit('scroll', e)
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
))
|
|
@@ -348,7 +348,7 @@ export default createComponent({
|
|
|
348
348
|
|
|
349
349
|
if (rowEl !== null) {
|
|
350
350
|
const scrollTarget = rootRef.value.querySelector('.q-table__middle.scroll')
|
|
351
|
-
const
|
|
351
|
+
const offsetTop = rowEl.offsetTop - props.virtualScrollStickySizeStart
|
|
352
352
|
const direction = offsetTop < scrollTarget.scrollTop ? 'decrease' : 'increase'
|
|
353
353
|
|
|
354
354
|
scrollTarget.scrollTop = offsetTop
|
|
@@ -479,11 +479,9 @@ export default createComponent({
|
|
|
479
479
|
function getBodyScope (data) {
|
|
480
480
|
injectBodyCommonScope(data)
|
|
481
481
|
|
|
482
|
-
data.cols = data.cols.map(
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
return c
|
|
486
|
-
})
|
|
482
|
+
data.cols = data.cols.map(
|
|
483
|
+
col => injectProp({ ...col }, 'value', () => getCellValue(col, data.row))
|
|
484
|
+
)
|
|
487
485
|
|
|
488
486
|
return data
|
|
489
487
|
}
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
|
|
78
78
|
"virtual-scroll-sticky-size-start": {
|
|
79
79
|
"type": [ "Number", "String" ],
|
|
80
|
-
"desc": "Size in pixels of the sticky header (if using one); A correct value will improve scroll precision",
|
|
80
|
+
"desc": "Size in pixels of the sticky header (if using one); A correct value will improve scroll precision; Will be also used for non-virtual-scroll tables for fixing top alignment when using scrollTo method",
|
|
81
81
|
"default": "0",
|
|
82
82
|
"examples": [ "virtual-scroll-sticky-size-start=\"48\"" ],
|
|
83
|
-
"category": "virtual-scroll"
|
|
83
|
+
"category": "virtual-scroll|behavior"
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
"virtual-scroll-sticky-size-end": {
|
|
@@ -16,7 +16,9 @@ export default createComponent({
|
|
|
16
16
|
emits: useTabEmits,
|
|
17
17
|
|
|
18
18
|
setup (props, { slots, emit }) {
|
|
19
|
-
const
|
|
19
|
+
const routeData = useRouterLink({
|
|
20
|
+
useDisableForRouterLinkProps: false
|
|
21
|
+
})
|
|
20
22
|
|
|
21
23
|
const { renderTab, $tabs } = useTab(
|
|
22
24
|
props,
|
|
@@ -24,14 +26,14 @@ export default createComponent({
|
|
|
24
26
|
emit,
|
|
25
27
|
{
|
|
26
28
|
exact: computed(() => props.exact),
|
|
27
|
-
...
|
|
29
|
+
...routeData
|
|
28
30
|
}
|
|
29
31
|
)
|
|
30
32
|
|
|
31
|
-
watch(() => props.name
|
|
33
|
+
watch(() => `${ props.name } | ${ props.exact } | ${ (routeData.resolvedLink.value || {}).href }`, () => {
|
|
32
34
|
$tabs.verifyRouteModel()
|
|
33
35
|
})
|
|
34
36
|
|
|
35
|
-
return () => renderTab(
|
|
37
|
+
return () => renderTab(routeData.linkTag.value, routeData.linkAttrs.value)
|
|
36
38
|
}
|
|
37
39
|
})
|
|
@@ -7,17 +7,53 @@
|
|
|
7
7
|
|
|
8
8
|
"events": {
|
|
9
9
|
"click": {
|
|
10
|
-
"desc": "Emitted when component is clicked
|
|
10
|
+
"desc": "Emitted when the component is clicked",
|
|
11
11
|
"params": {
|
|
12
12
|
"evt": {
|
|
13
13
|
"extends": "evt",
|
|
14
|
-
"desc": "JS event object; If you want to cancel navigation
|
|
14
|
+
"desc": "JS event object; If you want to cancel navigation then call evt.preventDefault() synchronously in your event handler"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
16
|
+
"go": {
|
|
17
17
|
"type": "Function",
|
|
18
|
-
"desc": "When you need to control the time at which the
|
|
19
|
-
"
|
|
20
|
-
"
|
|
18
|
+
"desc": "When you need to control the time at which the component should trigger the route navigation then call evt.preventDefault() synchronously and then call this function at your convenience; Useful if you have async work to be done before the actual route navigation or if you want to redirect somewhere else",
|
|
19
|
+
"required": false,
|
|
20
|
+
"params": {
|
|
21
|
+
"opts": {
|
|
22
|
+
"type": "Object",
|
|
23
|
+
"desc": "Optional options",
|
|
24
|
+
"required": false,
|
|
25
|
+
"definition": {
|
|
26
|
+
"to": {
|
|
27
|
+
"type": [ "String", "Object" ],
|
|
28
|
+
"desc": "Equivalent to Vue Router <router-link> 'to' property; Specify it explicitly otherwise it will be set with same value as component's 'to' prop",
|
|
29
|
+
"required": false,
|
|
30
|
+
"examples": [
|
|
31
|
+
"/home/dashboard",
|
|
32
|
+
"{ name: 'my-route-name' }"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
"replace": {
|
|
37
|
+
"type": "Boolean",
|
|
38
|
+
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Specify it explicitly otherwise it will be set with same value as component's 'replace' prop",
|
|
39
|
+
"required": false
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
"returnRouterError": {
|
|
43
|
+
"type": "Boolean",
|
|
44
|
+
"desc": "Return the router error, if any; Otherwise the returned Promise will always fulfill",
|
|
45
|
+
"required": false
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"addedIn": "v2.9"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"returns": {
|
|
52
|
+
"type": "Promise<any>",
|
|
53
|
+
"desc": "Returns the router's navigation promise",
|
|
54
|
+
"__exemption": [ "examples" ],
|
|
55
|
+
"addedIn": "v2.9"
|
|
56
|
+
}
|
|
21
57
|
}
|
|
22
58
|
}
|
|
23
59
|
}
|