quasar 1.16.3 → 1.17.3
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/BottomSheet.json +2 -2
- package/dist/api/Loading.json +0 -2
- package/dist/api/LoadingBar.json +1 -1
- package/dist/api/Notify.json +25 -25
- package/dist/api/QAjaxBar.json +23 -4
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +32 -11
- package/dist/api/QBtn.json +35 -14
- package/dist/api/QBtnDropdown.json +36 -15
- package/dist/api/QBtnToggle.json +1 -1
- package/dist/api/QCarousel.json +7 -7
- package/dist/api/QCarouselSlide.json +2 -2
- package/dist/api/QChatMessage.json +1 -5
- package/dist/api/QChip.json +4 -4
- package/dist/api/QColor.json +6 -0
- package/dist/api/QDialog.json +7 -1
- package/dist/api/QExpansionItem.json +34 -13
- package/dist/api/QFab.json +34 -2
- package/dist/api/QFabAction.json +9 -1
- package/dist/api/QField.json +80 -6
- package/dist/api/QFile.json +80 -6
- package/dist/api/QImg.json +2 -2
- package/dist/api/QInnerLoading.json +32 -0
- package/dist/api/QInput.json +82 -6
- package/dist/api/QItem.json +31 -10
- package/dist/api/QOptionGroup.json +58 -1
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QParallax.json +1 -1
- package/dist/api/QPopupEdit.json +14 -7
- package/dist/api/QPullToRefresh.json +1 -1
- package/dist/api/QRange.json +581 -96
- package/dist/api/QRating.json +3 -3
- package/dist/api/QRouteTab.json +32 -12
- package/dist/api/QScrollArea.json +188 -20
- package/dist/api/QSelect.json +82 -10
- package/dist/api/QSeparator.json +1 -1
- package/dist/api/QSlider.json +499 -34
- package/dist/api/QStep.json +4 -4
- package/dist/api/QStepper.json +4 -4
- package/dist/api/QTab.json +1 -1
- package/dist/api/QTable.json +4 -4
- package/dist/api/QTabs.json +9 -0
- package/dist/api/QTimelineEntry.json +2 -2
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTree.json +7 -1
- package/dist/api/QVideo.json +10 -0
- package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
- package/dist/icon-set/eva-icons.umd.min.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
- package/dist/icon-set/line-awesome.umd.min.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
- package/dist/icon-set/material-icons-round.umd.min.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
- package/dist/icon-set/material-icons.umd.min.js +1 -1
- package/dist/icon-set/mdi-v3.umd.min.js +1 -1
- package/dist/icon-set/mdi-v4.umd.min.js +1 -1
- package/dist/icon-set/mdi-v5.umd.min.js +1 -1
- package/dist/icon-set/mdi-v6.umd.min.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
- package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
- package/dist/icon-set/svg-themify.umd.min.js +1 -1
- package/dist/icon-set/themify.umd.min.js +1 -1
- package/dist/lang/ar.umd.min.js +2 -2
- package/dist/lang/az-latn.umd.min.js +1 -1
- package/dist/lang/bg.umd.min.js +1 -1
- package/dist/lang/ca.umd.min.js +1 -1
- package/dist/lang/cs.umd.min.js +1 -1
- package/dist/lang/da.umd.min.js +1 -1
- package/dist/lang/de.umd.min.js +1 -1
- package/dist/lang/el.umd.min.js +1 -1
- package/dist/lang/en-gb.umd.min.js +1 -1
- package/dist/lang/en-us.umd.min.js +1 -1
- package/dist/lang/eo.umd.min.js +1 -1
- package/dist/lang/es.umd.min.js +1 -1
- package/dist/lang/et.umd.min.js +1 -1
- package/dist/lang/fa-ir.umd.min.js +1 -1
- package/dist/lang/fa.umd.min.js +1 -1
- package/dist/lang/fi.umd.min.js +1 -1
- package/dist/lang/fr.umd.min.js +2 -2
- package/dist/lang/gn.umd.min.js +1 -1
- package/dist/lang/he.umd.min.js +1 -1
- package/dist/lang/hr.umd.min.js +1 -1
- package/dist/lang/hu.umd.min.js +1 -1
- package/dist/lang/id.umd.min.js +1 -1
- package/dist/lang/is.umd.min.js +1 -1
- package/dist/lang/it.umd.min.js +1 -1
- package/dist/lang/ja.umd.min.js +1 -1
- package/dist/lang/km.umd.min.js +1 -1
- package/dist/lang/ko-kr.umd.min.js +1 -1
- package/dist/lang/kur-ckb.umd.min.js +1 -1
- package/dist/lang/lu.umd.min.js +1 -1
- package/dist/lang/lv.umd.min.js +1 -1
- package/dist/lang/ml.umd.min.js +1 -1
- package/dist/lang/ms.umd.min.js +1 -1
- package/dist/lang/nb-no.umd.min.js +1 -1
- package/dist/lang/nl.umd.min.js +1 -1
- package/dist/lang/pl.umd.min.js +1 -1
- package/dist/lang/pt-br.umd.min.js +1 -1
- package/dist/lang/pt.umd.min.js +1 -1
- package/dist/lang/ro.umd.min.js +1 -1
- package/dist/lang/ru.umd.min.js +1 -1
- package/dist/lang/sk.umd.min.js +1 -1
- package/dist/lang/sl.umd.min.js +1 -1
- package/dist/lang/sr.umd.min.js +2 -2
- package/dist/lang/sv.umd.min.js +1 -1
- package/dist/lang/ta.umd.min.js +1 -1
- package/dist/lang/th.umd.min.js +1 -1
- package/dist/lang/tr.umd.min.js +1 -1
- package/dist/lang/ug.umd.min.js +2 -2
- package/dist/lang/uk.umd.min.js +1 -1
- package/dist/lang/vi.umd.min.js +1 -1
- package/dist/lang/zh-hans.umd.min.js +2 -2
- package/dist/lang/zh-hant.umd.min.js +2 -2
- package/dist/quasar.addon.css +1 -1
- package/dist/quasar.addon.rtl.css +1 -1
- package/dist/quasar.common.js +2 -2
- package/dist/quasar.css +380 -227
- package/dist/quasar.esm.js +2 -2
- package/dist/quasar.ie.polyfills.js +1 -1
- package/dist/quasar.ie.polyfills.umd.min.js +1 -1
- package/dist/quasar.min.css +1 -1
- package/dist/quasar.rtl.css +512 -303
- package/dist/quasar.rtl.min.css +1 -1
- package/dist/quasar.sass +328 -210
- package/dist/quasar.styl +328 -210
- package/dist/quasar.umd.js +3244 -1894
- package/dist/quasar.umd.min.js +2 -2
- package/dist/quasar.umd.modern.js +3199 -1875
- package/dist/quasar.umd.modern.min.js +2 -2
- package/dist/transform-asset-urls.json +20 -0
- package/dist/types/index.d.ts +427 -105
- package/dist/types/utils/scroll.d.ts +1 -0
- package/dist/vetur/quasar-attributes.json +320 -92
- package/dist/vetur/quasar-tags.json +76 -19
- package/dist/web-types/web-types.json +1296 -257
- package/icon-set/svg-ionicons-v6.js +225 -0
- package/lang/ar.js +1 -1
- package/lang/fa-ir.js +3 -1
- package/lang/fa.js +3 -1
- package/lang/fr.js +1 -1
- package/lang/index.json +1 -1
- package/lang/kur-ckb.js +2 -2
- package/lang/sr.js +4 -4
- package/lang/ug.js +48 -46
- package/lang/zh-hans.js +1 -1
- package/lang/zh-hant.js +18 -18
- package/package.json +1 -1
- package/src/api.extends.json +1 -2
- package/src/components/ajax-bar/QAjaxBar.js +48 -26
- package/src/components/ajax-bar/QAjaxBar.json +22 -4
- package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
- package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
- package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
- package/src/components/btn/QBtn.js +3 -3
- package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
- package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
- package/src/components/btn-toggle/QBtnToggle.js +4 -1
- package/src/components/carousel/QCarousel.js +6 -2
- package/src/components/carousel/QCarousel.json +9 -1
- package/src/components/carousel/QCarouselSlide.json +2 -2
- package/src/components/chat/QChatMessage.json +1 -1
- package/src/components/color/QColor.js +100 -85
- package/src/components/color/QColor.json +7 -0
- package/src/components/color/QColor.sass +14 -24
- package/src/components/color/QColor.styl +14 -24
- package/src/components/date/QDate.js +7 -1
- package/src/components/date/QDate.sass +2 -0
- package/src/components/date/QDate.styl +2 -0
- package/src/components/dialog/QDialog.js +8 -4
- package/src/components/dialog/QDialog.json +8 -1
- package/src/components/drawer/QDrawer.js +16 -15
- package/src/components/editor/QEditor.js +2 -2
- package/src/components/editor/QEditor.sass +13 -1
- package/src/components/editor/QEditor.styl +13 -1
- package/src/components/expansion-item/QExpansionItem.js +13 -11
- package/src/components/fab/QFab.js +20 -11
- package/src/components/fab/QFab.json +35 -0
- package/src/components/fab/QFabAction.js +16 -9
- package/src/components/fab/QFabAction.json +10 -0
- package/src/components/field/QField.js +28 -23
- package/src/components/field/__QField.json +72 -8
- package/src/components/file/QFile.js +12 -4
- package/src/components/file/QFile.sass +4 -3
- package/src/components/file/QFile.styl +4 -3
- package/src/components/footer/QFooter.js +1 -1
- package/src/components/form/QForm.js +1 -1
- package/src/components/header/QHeader.js +1 -1
- package/src/components/icon/QIcon.js +89 -75
- package/src/components/icon/QIcon.sass +2 -2
- package/src/components/icon/QIcon.styl +2 -2
- package/src/components/img/QImg.json +2 -2
- package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
- package/src/components/inner-loading/QInnerLoading.js +54 -22
- package/src/components/inner-loading/QInnerLoading.json +29 -0
- package/src/components/inner-loading/QInnerLoading.sass +3 -0
- package/src/components/inner-loading/QInnerLoading.styl +3 -0
- package/src/components/item/QItem.js +9 -15
- package/src/components/layout/QLayout.js +49 -0
- package/src/components/linear-progress/QLinearProgress.js +6 -2
- package/src/components/menu/QMenu.js +5 -1
- package/src/components/option-group/QOptionGroup.js +32 -22
- package/src/components/option-group/QOptionGroup.json +50 -1
- package/src/components/parallax/QParallax.js +3 -0
- package/src/components/parallax/QParallax.json +1 -1
- package/src/components/popup-edit/QPopupEdit.js +41 -16
- package/src/components/popup-edit/QPopupEdit.json +15 -8
- package/src/components/range/QRange.js +223 -278
- package/src/components/range/QRange.json +11 -122
- package/src/components/rating/QRating.js +56 -38
- package/src/components/rating/QRating.json +3 -3
- package/src/components/rating/QRating.sass +8 -6
- package/src/components/rating/QRating.styl +8 -6
- package/src/components/resize-observer/QResizeObserver.js +15 -10
- package/src/components/scroll-area/QScrollArea.js +342 -126
- package/src/components/scroll-area/QScrollArea.json +164 -20
- package/src/components/scroll-area/QScrollArea.sass +5 -0
- package/src/components/scroll-area/QScrollArea.styl +5 -0
- package/src/components/scroll-observer/QScrollObserver.js +12 -7
- package/src/components/select/QSelect.js +8 -2
- package/src/components/select/QSelect.json +1 -1
- package/src/components/separator/QSeparator.js +0 -1
- package/src/components/separator/QSeparator.json +1 -1
- package/src/components/slider/QSlider.js +97 -140
- package/src/components/slider/QSlider.json +1 -122
- package/src/components/slider/QSlider.sass +205 -139
- package/src/components/slider/QSlider.styl +205 -139
- package/src/components/slider/slider-utils.js +468 -123
- package/src/components/slider/slider-utils.json +546 -0
- package/src/components/stepper/QStepper.js +1 -1
- package/src/components/stepper/QStepper.sass +25 -26
- package/src/components/stepper/QStepper.styl +25 -26
- package/src/components/table/QTable.sass +3 -0
- package/src/components/table/QTable.styl +3 -0
- package/src/components/tabs/QRouteTab.js +13 -13
- package/src/components/tabs/QRouteTab.json +0 -7
- package/src/components/tabs/QTab.js +71 -20
- package/src/components/tabs/QTabs.js +237 -52
- package/src/components/tabs/QTabs.json +8 -0
- package/src/components/tabs/QTabs.sass +6 -6
- package/src/components/tabs/QTabs.styl +6 -6
- package/src/components/time/QTime.js +6 -2
- package/src/components/timeline/QTimeline.sass +1 -2
- package/src/components/timeline/QTimeline.styl +1 -2
- package/src/components/timeline/QTimelineEntry.json +1 -1
- package/src/components/tree/QTree.js +10 -6
- package/src/components/tree/QTree.json +5 -0
- package/src/components/tree/QTree.sass +58 -4
- package/src/components/tree/QTree.styl +58 -4
- package/src/components/uploader/QUploaderBase.js +15 -19
- package/src/components/video/QVideo.js +4 -1
- package/src/components/video/QVideo.json +11 -0
- package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
- package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
- package/src/css/core/helpers.sass +3 -0
- package/src/css/core/helpers.styl +3 -0
- package/src/css/core/positioning.sass +5 -0
- package/src/css/core/positioning.styl +5 -0
- package/src/css/variables.sass +4 -6
- package/src/css/variables.styl +4 -6
- package/src/directives/Scroll.js +2 -2
- package/src/directives/ScrollFire.js +1 -0
- package/src/ie-compat/ie.js +13 -13
- package/src/install.js +1 -1
- package/src/lang.js +7 -4
- package/src/mixins/anchor.js +3 -13
- package/src/mixins/btn.js +33 -38
- package/src/mixins/btn.json +26 -11
- package/src/mixins/file.js +27 -5
- package/src/mixins/fullscreen.js +16 -4
- package/src/mixins/portal.js +10 -10
- package/src/mixins/router-link.js +88 -14
- package/src/mixins/router-link.json +26 -10
- package/src/mixins/validate.js +33 -15
- package/src/mixins/virtual-scroll.js +40 -42
- package/src/plugins/AppFullscreen.js +41 -16
- package/src/plugins/BottomSheet.json +1 -1
- package/src/plugins/Cookies.js +1 -1
- package/src/plugins/Loading.js +8 -0
- package/src/plugins/LoadingBar.js +9 -0
- package/src/plugins/LoadingBar.json +1 -1
- package/src/plugins/Notify.js +351 -333
- package/src/plugins/Notify.json +20 -20
- package/src/plugins/Notify.sass +9 -3
- package/src/plugins/Notify.styl +9 -3
- package/src/utils/clone.js +53 -4
- package/src/utils/date.js +134 -69
- package/src/utils/dom.js +28 -9
- package/src/utils/extend.js +2 -2
- package/src/utils/focus-manager.js +8 -10
- package/src/utils/global-dialog.js +18 -1
- package/src/utils/is.js +2 -2
- package/src/utils/morph.js +2 -12
- package/src/utils/scroll.js +71 -35
|
@@ -8,6 +8,8 @@ import { getScrollTarget, getScrollHeight, getScrollPosition, setScrollPosition
|
|
|
8
8
|
import { listenOpts } from '../../utils/event.js'
|
|
9
9
|
import { slot, uniqueSlot } from '../../utils/slot.js'
|
|
10
10
|
|
|
11
|
+
const { passive } = listenOpts
|
|
12
|
+
|
|
11
13
|
export default Vue.extend({
|
|
12
14
|
name: 'QInfiniteScroll',
|
|
13
15
|
|
|
@@ -37,18 +39,20 @@ export default Vue.extend({
|
|
|
37
39
|
data () {
|
|
38
40
|
return {
|
|
39
41
|
index: this.initialIndex || 0,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
isFetching: false,
|
|
43
|
+
isWorking: true
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
|
|
45
47
|
watch: {
|
|
46
48
|
disable (val) {
|
|
47
|
-
if (val === true) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
if (val === true) { this.stop() }
|
|
50
|
+
else { this.resume() }
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
reverse () {
|
|
54
|
+
if (this.isFetching === false && this.isWorking === true) {
|
|
55
|
+
this.immediatePoll()
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
|
|
@@ -63,7 +67,7 @@ export default Vue.extend({
|
|
|
63
67
|
|
|
64
68
|
methods: {
|
|
65
69
|
poll () {
|
|
66
|
-
if (this.disable === true || this.
|
|
70
|
+
if (this.disable === true || this.isFetching === true || this.isWorking === false) {
|
|
67
71
|
return
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -73,30 +77,28 @@ export default Vue.extend({
|
|
|
73
77
|
containerHeight = height(this.__scrollTarget)
|
|
74
78
|
|
|
75
79
|
if (this.reverse === false) {
|
|
76
|
-
if (scrollPosition + containerHeight + this.offset >= scrollHeight) {
|
|
80
|
+
if (Math.round(scrollPosition + containerHeight + this.offset) >= Math.round(scrollHeight)) {
|
|
77
81
|
this.trigger()
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
|
-
else {
|
|
81
|
-
|
|
82
|
-
this.trigger()
|
|
83
|
-
}
|
|
84
|
+
else if (Math.round(scrollPosition) < this.offset) {
|
|
85
|
+
this.trigger()
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
88
|
|
|
87
89
|
trigger () {
|
|
88
|
-
if (this.disable === true || this.
|
|
90
|
+
if (this.disable === true || this.isFetching === true || this.isWorking === false) {
|
|
89
91
|
return
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
this.index++
|
|
93
|
-
this.
|
|
95
|
+
this.isFetching = true
|
|
94
96
|
|
|
95
97
|
const heightBefore = getScrollHeight(this.__scrollTarget)
|
|
96
98
|
|
|
97
99
|
this.$emit('load', this.index, stop => {
|
|
98
|
-
if (this.
|
|
99
|
-
this.
|
|
100
|
+
if (this.isWorking === true) {
|
|
101
|
+
this.isFetching = false
|
|
100
102
|
this.$nextTick(() => {
|
|
101
103
|
if (this.reverse === true) {
|
|
102
104
|
const
|
|
@@ -123,30 +125,31 @@ export default Vue.extend({
|
|
|
123
125
|
},
|
|
124
126
|
|
|
125
127
|
resume () {
|
|
126
|
-
if (this.
|
|
127
|
-
this.
|
|
128
|
-
this.__scrollTarget.addEventListener('scroll', this.poll,
|
|
128
|
+
if (this.isWorking === false) {
|
|
129
|
+
this.isWorking = true
|
|
130
|
+
this.__scrollTarget.addEventListener('scroll', this.poll, passive)
|
|
129
131
|
}
|
|
130
132
|
this.immediatePoll()
|
|
131
133
|
},
|
|
132
134
|
|
|
133
135
|
stop () {
|
|
134
|
-
if (this.
|
|
135
|
-
this.
|
|
136
|
-
this.
|
|
137
|
-
this.__scrollTarget.removeEventListener('scroll', this.poll,
|
|
136
|
+
if (this.isWorking === true) {
|
|
137
|
+
this.isWorking = false
|
|
138
|
+
this.isFetching = false
|
|
139
|
+
this.__scrollTarget.removeEventListener('scroll', this.poll, passive)
|
|
140
|
+
typeof this.poll.cancel === 'function' && this.poll.cancel()
|
|
138
141
|
}
|
|
139
142
|
},
|
|
140
143
|
|
|
141
144
|
updateScrollTarget () {
|
|
142
|
-
if (this.__scrollTarget && this.
|
|
143
|
-
this.__scrollTarget.removeEventListener('scroll', this.poll,
|
|
145
|
+
if (this.__scrollTarget && this.isWorking === true) {
|
|
146
|
+
this.__scrollTarget.removeEventListener('scroll', this.poll, passive)
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
this.__scrollTarget = getScrollTarget(this.$el, this.scrollTarget)
|
|
147
150
|
|
|
148
|
-
if (this.
|
|
149
|
-
this.__scrollTarget.addEventListener('scroll', this.poll,
|
|
151
|
+
if (this.isWorking === true) {
|
|
152
|
+
this.__scrollTarget.addEventListener('scroll', this.poll, passive)
|
|
150
153
|
}
|
|
151
154
|
},
|
|
152
155
|
|
|
@@ -163,12 +166,12 @@ export default Vue.extend({
|
|
|
163
166
|
? this.immediatePoll
|
|
164
167
|
: debounce(this.immediatePoll, isNaN(val) === true ? 100 : val)
|
|
165
168
|
|
|
166
|
-
if (this.__scrollTarget && this.
|
|
169
|
+
if (this.__scrollTarget && this.isWorking === true) {
|
|
167
170
|
if (oldPoll !== void 0) {
|
|
168
|
-
this.__scrollTarget.removeEventListener('scroll', oldPoll,
|
|
171
|
+
this.__scrollTarget.removeEventListener('scroll', oldPoll, passive)
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
this.__scrollTarget.addEventListener('scroll', this.poll,
|
|
174
|
+
this.__scrollTarget.addEventListener('scroll', this.poll, passive)
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
},
|
|
@@ -190,20 +193,30 @@ export default Vue.extend({
|
|
|
190
193
|
this.immediatePoll()
|
|
191
194
|
},
|
|
192
195
|
|
|
193
|
-
|
|
194
|
-
if (this.
|
|
195
|
-
this.__scrollTarget
|
|
196
|
+
activated () {
|
|
197
|
+
if (this.__scrollTarget && this.__scrollPosition !== void 0) {
|
|
198
|
+
setScrollPosition(this.__scrollTarget, this.__scrollPosition)
|
|
196
199
|
}
|
|
197
200
|
},
|
|
198
201
|
|
|
202
|
+
deactivated () {
|
|
203
|
+
this.__scrollPosition = this.__scrollTarget
|
|
204
|
+
? getScrollPosition(this.__scrollTarget)
|
|
205
|
+
: void 0
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
beforeDestroy () {
|
|
209
|
+
this.stop()
|
|
210
|
+
},
|
|
211
|
+
|
|
199
212
|
render (h) {
|
|
200
213
|
const child = uniqueSlot(this, 'default', [])
|
|
201
214
|
|
|
202
|
-
if (this.disable !== true && this.
|
|
215
|
+
if (this.disable !== true && this.isWorking === true) {
|
|
203
216
|
child[this.reverse === false ? 'push' : 'unshift'](
|
|
204
217
|
h('div', {
|
|
205
218
|
staticClass: 'q-infinite-scroll__loading',
|
|
206
|
-
class: this.
|
|
219
|
+
class: this.isFetching === true ? '' : 'invisible'
|
|
207
220
|
}, slot(this, 'loading'))
|
|
208
221
|
)
|
|
209
222
|
}
|
|
@@ -18,37 +18,69 @@ export default Vue.extend({
|
|
|
18
18
|
size: {
|
|
19
19
|
type: [String, Number],
|
|
20
20
|
default: 42
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
label: String,
|
|
24
|
+
labelClass: String,
|
|
25
|
+
labelStyle: [ String, Array, Object ]
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
computed: {
|
|
29
|
+
classes () {
|
|
30
|
+
return 'q-inner-loading absolute-full column flex-center' +
|
|
31
|
+
(this.isDark === true ? ' q-inner-loading--dark' : '')
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
labelClasses () {
|
|
35
|
+
return 'q-inner-loading__label' +
|
|
36
|
+
(this.labelClass !== void 0 ? ` ${this.labelClass}` : '')
|
|
21
37
|
}
|
|
22
38
|
},
|
|
23
39
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
h(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
on: { ...this.qListeners }
|
|
32
|
-
},
|
|
33
|
-
this.$scopedSlots.default !== void 0
|
|
34
|
-
? this.$scopedSlots.default()
|
|
35
|
-
: [
|
|
36
|
-
h(QSpinner, {
|
|
37
|
-
props: {
|
|
38
|
-
size: this.size,
|
|
39
|
-
color: this.color
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
]
|
|
43
|
-
)
|
|
40
|
+
methods: {
|
|
41
|
+
__getInner (h) {
|
|
42
|
+
const child = [
|
|
43
|
+
h(QSpinner, {
|
|
44
|
+
size: this.size,
|
|
45
|
+
color: this.color
|
|
46
|
+
})
|
|
44
47
|
]
|
|
45
|
-
: void 0
|
|
46
48
|
|
|
49
|
+
if (this.label !== void 0) {
|
|
50
|
+
child.push(
|
|
51
|
+
h('div', {
|
|
52
|
+
class: this.labelClasses,
|
|
53
|
+
style: this.labelStyle
|
|
54
|
+
}, [ this.label ])
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return child
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
__getContent (h) {
|
|
62
|
+
return this.showing === true
|
|
63
|
+
? [
|
|
64
|
+
h('div',
|
|
65
|
+
{
|
|
66
|
+
staticClass: this.classes,
|
|
67
|
+
on: { ...this.qListeners }
|
|
68
|
+
},
|
|
69
|
+
this.$scopedSlots.default !== void 0
|
|
70
|
+
? this.$scopedSlots.default()
|
|
71
|
+
: this.__getInner(h)
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
: void 0
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
render (h) {
|
|
47
79
|
return h('transition', {
|
|
48
80
|
props: {
|
|
49
81
|
name: this.transition,
|
|
50
82
|
appear: true
|
|
51
83
|
}
|
|
52
|
-
},
|
|
84
|
+
}, this.__getContent(h))
|
|
53
85
|
}
|
|
54
86
|
})
|
|
@@ -26,6 +26,35 @@
|
|
|
26
26
|
"default": "42px"
|
|
27
27
|
},
|
|
28
28
|
|
|
29
|
+
"label": {
|
|
30
|
+
"type": "String",
|
|
31
|
+
"desc": "Add a label; Gets overriden when using the default slot",
|
|
32
|
+
"examples": [ "Please wait..." ],
|
|
33
|
+
"category": "label",
|
|
34
|
+
"addedIn": "v1.17"
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
"label-class": {
|
|
38
|
+
"type": "String",
|
|
39
|
+
"desc": "Add CSS class(es) to the label; Works along the 'label' prop only",
|
|
40
|
+
"examples": [
|
|
41
|
+
"text-red q-mt-xl"
|
|
42
|
+
],
|
|
43
|
+
"category": "label",
|
|
44
|
+
"addedIn": "v1.17"
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
"label-style": {
|
|
48
|
+
"type": [ "Array", "String", "Object" ],
|
|
49
|
+
"desc": "Apply custom style to the label; Works along the 'label' prop only",
|
|
50
|
+
"examples": [
|
|
51
|
+
"font-size: 28px",
|
|
52
|
+
":label-style=\"{ color: '#ff0000' }\""
|
|
53
|
+
],
|
|
54
|
+
"category": "label",
|
|
55
|
+
"addedIn": "v1.17"
|
|
56
|
+
},
|
|
57
|
+
|
|
29
58
|
"transition-show": {
|
|
30
59
|
"extends": "transition",
|
|
31
60
|
"default": "fade"
|
|
@@ -2,7 +2,7 @@ import Vue from 'vue'
|
|
|
2
2
|
|
|
3
3
|
import DarkMixin from '../../mixins/dark.js'
|
|
4
4
|
import TagMixin from '../../mixins/tag.js'
|
|
5
|
-
import
|
|
5
|
+
import RouterLinkMixin from '../../mixins/router-link.js'
|
|
6
6
|
import ListenersMixin from '../../mixins/listeners.js'
|
|
7
7
|
|
|
8
8
|
import { uniqueSlot } from '../../utils/slot.js'
|
|
@@ -30,8 +30,7 @@ export default Vue.extend({
|
|
|
30
30
|
computed: {
|
|
31
31
|
isActionable () {
|
|
32
32
|
return this.clickable === true ||
|
|
33
|
-
this.
|
|
34
|
-
this.tag === 'a' ||
|
|
33
|
+
this.hasLink === true ||
|
|
35
34
|
this.tag === 'label'
|
|
36
35
|
},
|
|
37
36
|
|
|
@@ -120,29 +119,24 @@ export default Vue.extend({
|
|
|
120
119
|
staticClass: 'q-item q-item-type row no-wrap',
|
|
121
120
|
class: this.classes,
|
|
122
121
|
style: this.style,
|
|
122
|
+
attrs: {},
|
|
123
123
|
[ this.hasRouterLink === true ? 'nativeOn' : 'on' ]: this.onEvents
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
if (this.isClickable === true) {
|
|
127
|
-
data.attrs =
|
|
128
|
-
tabindex: this.tabindex || '0'
|
|
129
|
-
}
|
|
127
|
+
data.attrs.tabindex = this.tabindex || '0'
|
|
130
128
|
}
|
|
131
129
|
else if (this.isActionable === true) {
|
|
132
|
-
data.attrs =
|
|
133
|
-
'aria-disabled': 'true'
|
|
134
|
-
}
|
|
130
|
+
data.attrs['aria-disabled'] = 'true'
|
|
135
131
|
}
|
|
136
132
|
|
|
137
|
-
if (this.
|
|
138
|
-
data.
|
|
139
|
-
data.
|
|
140
|
-
|
|
141
|
-
return h('router-link', data, this.__getContent(h))
|
|
133
|
+
if (this.hasLink === true) {
|
|
134
|
+
data.props = this.linkProps.props
|
|
135
|
+
Object.assign(data.attrs, this.linkProps.attrs)
|
|
142
136
|
}
|
|
143
137
|
|
|
144
138
|
return h(
|
|
145
|
-
this.
|
|
139
|
+
this.linkTag,
|
|
146
140
|
data,
|
|
147
141
|
this.__getContent(h)
|
|
148
142
|
)
|
|
@@ -109,13 +109,30 @@ export default Vue.extend({
|
|
|
109
109
|
classes () {
|
|
110
110
|
return 'q-layout q-layout--' +
|
|
111
111
|
(this.container === true ? 'containerized' : 'standard')
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
scrollbarEvtAction () {
|
|
115
|
+
return this.container !== true && this.scrollbarWidth > 0
|
|
116
|
+
? 'add' : 'remove'
|
|
112
117
|
}
|
|
113
118
|
},
|
|
114
119
|
|
|
120
|
+
watch: {
|
|
121
|
+
scrollbarEvtAction: '__updateScrollEvent'
|
|
122
|
+
},
|
|
123
|
+
|
|
115
124
|
created () {
|
|
116
125
|
this.instances = {}
|
|
117
126
|
},
|
|
118
127
|
|
|
128
|
+
mounted () {
|
|
129
|
+
this.scrollbarEvtAction === 'add' && this.__updateScrollEvent('add')
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
beforeDestroy () {
|
|
133
|
+
this.scrollbarEvtAction === 'add' && this.__updateScrollEvent('remove')
|
|
134
|
+
},
|
|
135
|
+
|
|
119
136
|
render (h) {
|
|
120
137
|
const layout = h('div', {
|
|
121
138
|
class: this.classes,
|
|
@@ -210,6 +227,38 @@ export default Vue.extend({
|
|
|
210
227
|
this.scrollbarWidth = width
|
|
211
228
|
}
|
|
212
229
|
}
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
__updateScrollEvent (action) {
|
|
233
|
+
if (this.timerScrollbar !== void 0 && action === 'remove') {
|
|
234
|
+
clearTimeout(this.timerScrollbar)
|
|
235
|
+
this.__restoreScrollbar()
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
window[`${action}EventListener`]('resize', this.__hideScrollbar)
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
__hideScrollbar () {
|
|
242
|
+
if (this.timerScrollbar === void 0) {
|
|
243
|
+
const el = document.body
|
|
244
|
+
|
|
245
|
+
// if it has no scrollbar then there's nothing to do
|
|
246
|
+
if (el.scrollHeight > this.$q.screen.height) {
|
|
247
|
+
return
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
el.classList.add('hide-scrollbar')
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
clearTimeout(this.timerScrollbar)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
this.timerScrollbar = setTimeout(this.__restoreScrollbar, 200)
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
__restoreScrollbar () {
|
|
260
|
+
this.timerScrollbar = void 0
|
|
261
|
+
document.body.classList.remove('hide-scrollbar')
|
|
213
262
|
}
|
|
214
263
|
}
|
|
215
264
|
})
|
|
@@ -53,6 +53,10 @@ export default Vue.extend({
|
|
|
53
53
|
return this.indeterminate === true || this.query === true
|
|
54
54
|
},
|
|
55
55
|
|
|
56
|
+
widthReverse () {
|
|
57
|
+
return this.reverse !== this.query
|
|
58
|
+
},
|
|
59
|
+
|
|
56
60
|
classes () {
|
|
57
61
|
return 'q-linear-progress' +
|
|
58
62
|
(this.color !== void 0 ? ` text-${this.color}` : '') +
|
|
@@ -61,7 +65,7 @@ export default Vue.extend({
|
|
|
61
65
|
},
|
|
62
66
|
|
|
63
67
|
trackStyle () {
|
|
64
|
-
return width(this.buffer !== void 0 ? this.buffer : 1, this.
|
|
68
|
+
return width(this.buffer !== void 0 ? this.buffer : 1, this.widthReverse, this.$q)
|
|
65
69
|
},
|
|
66
70
|
|
|
67
71
|
trackClass () {
|
|
@@ -71,7 +75,7 @@ export default Vue.extend({
|
|
|
71
75
|
},
|
|
72
76
|
|
|
73
77
|
modelStyle () {
|
|
74
|
-
return width(this.motion === true ? 1 : this.value, this.
|
|
78
|
+
return width(this.motion === true ? 1 : this.value, this.widthReverse, this.$q)
|
|
75
79
|
},
|
|
76
80
|
|
|
77
81
|
modelClasses () {
|
|
@@ -6,6 +6,7 @@ import DarkMixin from '../../mixins/dark.js'
|
|
|
6
6
|
import PortalMixin, { closePortalMenus } from '../../mixins/portal.js'
|
|
7
7
|
import TransitionMixin from '../../mixins/transition.js'
|
|
8
8
|
import AttrsMixin from '../../mixins/attrs.js'
|
|
9
|
+
import { client } from '../../plugins/Platform.js'
|
|
9
10
|
|
|
10
11
|
import ClickOutside from './ClickOutside.js'
|
|
11
12
|
import { getScrollTarget } from '../../utils/scroll.js'
|
|
@@ -144,7 +145,7 @@ export default Vue.extend({
|
|
|
144
145
|
|
|
145
146
|
__show (evt) {
|
|
146
147
|
// IE can have null document.activeElement
|
|
147
|
-
this.__refocusTarget = this.noRefocus === false && document.activeElement !== null
|
|
148
|
+
this.__refocusTarget = client.is.mobile !== true && this.noRefocus === false && document.activeElement !== null
|
|
148
149
|
? document.activeElement
|
|
149
150
|
: void 0
|
|
150
151
|
|
|
@@ -218,6 +219,7 @@ export default Vue.extend({
|
|
|
218
219
|
)
|
|
219
220
|
) {
|
|
220
221
|
this.__refocusTarget.focus()
|
|
222
|
+
this.__refocusTarget = void 0
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
this.$el.dispatchEvent(create('popup-hide', { bubbles: true }))
|
|
@@ -337,6 +339,8 @@ export default Vue.extend({
|
|
|
337
339
|
},
|
|
338
340
|
|
|
339
341
|
beforeDestroy () {
|
|
342
|
+
this.__refocusTarget = void 0
|
|
343
|
+
|
|
340
344
|
// When the menu is destroyed while open we can only emit the event on anchorEl
|
|
341
345
|
if (this.showing === true && this.anchorEl !== void 0) {
|
|
342
346
|
this.anchorEl.dispatchEvent(
|
|
@@ -106,27 +106,37 @@ export default Vue.extend({
|
|
|
106
106
|
class: this.classes,
|
|
107
107
|
attrs: this.attrs,
|
|
108
108
|
on: { ...this.qListeners }
|
|
109
|
-
}, this.options.map(opt =>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
109
|
+
}, this.options.map((opt, i) => {
|
|
110
|
+
const child = this.$scopedSlots[ 'label-' + i ] !== void 0
|
|
111
|
+
? this.$scopedSlots[ 'label-' + i ](opt)
|
|
112
|
+
: (
|
|
113
|
+
this.$scopedSlots.label !== void 0
|
|
114
|
+
? this.$scopedSlots.label(opt)
|
|
115
|
+
: void 0
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
return h('div', [
|
|
119
|
+
h(this.component, {
|
|
120
|
+
props: {
|
|
121
|
+
value: this.value,
|
|
122
|
+
val: opt.value,
|
|
123
|
+
name: opt.name === void 0 ? this.name : opt.name,
|
|
124
|
+
disable: this.disable || opt.disable,
|
|
125
|
+
label: child === void 0 ? opt.label : void 0,
|
|
126
|
+
leftLabel: opt.leftLabel === void 0 ? this.leftLabel : opt.leftLabel,
|
|
127
|
+
color: opt.color === void 0 ? this.color : opt.color,
|
|
128
|
+
checkedIcon: opt.checkedIcon,
|
|
129
|
+
uncheckedIcon: opt.uncheckedIcon,
|
|
130
|
+
dark: opt.dark || this.isDark,
|
|
131
|
+
size: opt.size === void 0 ? this.size : opt.size,
|
|
132
|
+
dense: this.dense,
|
|
133
|
+
keepColor: opt.keepColor === void 0 ? this.keepColor : opt.keepColor
|
|
134
|
+
},
|
|
135
|
+
on: cache(this, 'inp', {
|
|
136
|
+
input: this.__update
|
|
137
|
+
})
|
|
138
|
+
}, child)
|
|
139
|
+
])
|
|
140
|
+
}))
|
|
131
141
|
}
|
|
132
142
|
})
|
|
@@ -19,7 +19,30 @@
|
|
|
19
19
|
|
|
20
20
|
"options": {
|
|
21
21
|
"type": "Array",
|
|
22
|
-
"desc": "Array of objects with value and
|
|
22
|
+
"desc": "Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
|
|
23
|
+
"definition": {
|
|
24
|
+
"label": {
|
|
25
|
+
"type": "String",
|
|
26
|
+
"desc": "Label to display along the component",
|
|
27
|
+
"required": true,
|
|
28
|
+
"examples": [ "Option 1", "Option 2", "Option 3" ]
|
|
29
|
+
},
|
|
30
|
+
"value": {
|
|
31
|
+
"type": "Any",
|
|
32
|
+
"desc": "Value of the option that will be used by the component model",
|
|
33
|
+
"required": true,
|
|
34
|
+
"examples": [ "op1", "op2", "op3" ]
|
|
35
|
+
},
|
|
36
|
+
"disable": {
|
|
37
|
+
"type": "Boolean",
|
|
38
|
+
"desc": "If true, the option will be disabled"
|
|
39
|
+
},
|
|
40
|
+
"...props": {
|
|
41
|
+
"type": "Any",
|
|
42
|
+
"desc": "Any other props from QToggle, QCheckbox, or QRadio",
|
|
43
|
+
"examples": [ "val=\"car\"", ":true-value=\"trueValue\"", "checked-icon=\"visibility\"" ]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
23
46
|
"examples": [
|
|
24
47
|
":options=\"[ { label: 'Option 1', value: 'op1' }, { label: 'Option 2', value: 'op2' }, { label: 'Option 3', value: 'op3', disable: true } ]\""
|
|
25
48
|
],
|
|
@@ -82,6 +105,32 @@
|
|
|
82
105
|
}
|
|
83
106
|
},
|
|
84
107
|
|
|
108
|
+
"scopedSlots": {
|
|
109
|
+
"label": {
|
|
110
|
+
"desc": "Generic slot for all labels",
|
|
111
|
+
"scope": {
|
|
112
|
+
"opt": {
|
|
113
|
+
"type": "Object",
|
|
114
|
+
"desc": "The corresponding option entry from the 'options' prop",
|
|
115
|
+
"__exemption": [ "examples" ]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"addedIn": "v1.17"
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
"label-[name]": {
|
|
122
|
+
"desc": "Slot to define the specific label for the option at '[name]' where name is a 0-based index; Overrides the generic 'label' slot if used",
|
|
123
|
+
"scope": {
|
|
124
|
+
"opt": {
|
|
125
|
+
"type": "Object",
|
|
126
|
+
"desc": "The corresponding option entry from the 'options' prop",
|
|
127
|
+
"__exemption": [ "examples" ]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"addedIn": "v1.17"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
|
|
85
134
|
"events": {
|
|
86
135
|
"input": {
|
|
87
136
|
"extends": "input"
|
|
@@ -103,6 +103,9 @@ export default Vue.extend({
|
|
|
103
103
|
__stop () {
|
|
104
104
|
if (this.working === true) {
|
|
105
105
|
this.working = false
|
|
106
|
+
this.__setPos.cancel()
|
|
107
|
+
this.__update.cancel()
|
|
108
|
+
this.__resizeHandler.cancel()
|
|
106
109
|
this.__scrollTarget.removeEventListener('scroll', this.__updatePos, passive)
|
|
107
110
|
window.removeEventListener('resize', this.__resizeHandler, passive)
|
|
108
111
|
this.__scrollTarget = void 0
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"desc": "Path to image (unless a 'media' slot is used)",
|
|
14
14
|
"transformAssetUrls": true,
|
|
15
15
|
"examples": [
|
|
16
|
-
"(
|
|
16
|
+
"(public folder) src=\"img/something.png\"",
|
|
17
17
|
"(assets folder) src=\"~assets/my-img.png\"",
|
|
18
18
|
"(relative path format) :src=\"require('./my_img.jpg')\"",
|
|
19
19
|
"(URL) src=\"https://some-site.net/some-img.jpg\""
|