quasar 2.14.4 → 2.14.6
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/AddressbarColor.json +1 -22
- package/dist/api/AppFullscreen.json +1 -78
- package/dist/api/AppVisibility.json +1 -15
- package/dist/api/BottomSheet.json +1 -264
- package/dist/api/Brand.json +1 -49
- package/dist/api/ClosePopup.json +1 -21
- package/dist/api/Cookies.json +1 -190
- package/dist/api/Dark.json +1 -63
- package/dist/api/Dialog.json +1 -479
- package/dist/api/Intersection.json +1 -204
- package/dist/api/Lang.json +1 -18
- package/dist/api/Loading.json +1 -317
- package/dist/api/LoadingBar.json +1 -62
- package/dist/api/LocalStorage.json +1 -187
- package/dist/api/Meta.json +1 -6
- package/dist/api/Morph.json +1 -188
- package/dist/api/Mutation.json +1 -122
- package/dist/api/Notify.json +1 -697
- package/dist/api/Platform.json +1 -238
- package/dist/api/QAjaxBar.json +1 -117
- package/dist/api/QAvatar.json +1 -76
- package/dist/api/QBadge.json +1 -82
- package/dist/api/QBanner.json +1 -44
- package/dist/api/QBar.json +1 -28
- package/dist/api/QBreadcrumbs.json +1 -82
- package/dist/api/QBreadcrumbsEl.json +1 -162
- package/dist/api/QBtn.json +1 -354
- package/dist/api/QBtnDropdown.json +1 -560
- package/dist/api/QBtnGroup.json +1 -59
- package/dist/api/QBtnToggle.json +1 -263
- package/dist/api/QCard.json +1 -51
- package/dist/api/QCardActions.json +1 -34
- package/dist/api/QCardSection.json +1 -31
- package/dist/api/QCarousel.json +1 -421
- package/dist/api/QCarouselControl.json +1 -41
- package/dist/api/QCarouselSlide.json +1 -44
- package/dist/api/QChatMessage.json +1 -128
- package/dist/api/QCheckbox.json +1 -211
- package/dist/api/QChip.json +1 -232
- package/dist/api/QCircularProgress.json +1 -145
- package/dist/api/QColor.json +1 -150
- package/dist/api/QDate.json +1 -637
- package/dist/api/QDialog.json +1 -259
- package/dist/api/QDrawer.json +1 -272
- package/dist/api/QEditor.json +1 -485
- package/dist/api/QExpansionItem.json +1 -434
- package/dist/api/QFab.json +1 -352
- package/dist/api/QFabAction.json +1 -241
- package/dist/api/QField.json +1 -448
- package/dist/api/QFile.json +1 -643
- package/dist/api/QFooter.json +1 -60
- package/dist/api/QForm.json +1 -112
- package/dist/api/QFormChildMixin.json +1 -24
- package/dist/api/QHeader.json +1 -67
- package/dist/api/QIcon.json +1 -69
- package/dist/api/QImg.json +1 -279
- package/dist/api/QInfiniteScroll.json +1 -116
- package/dist/api/QInnerLoading.json +1 -117
- package/dist/api/QInput.json +1 -521
- package/dist/api/QIntersection.json +1 -112
- package/dist/api/QItem.json +1 -203
- package/dist/api/QItemLabel.json +1 -36
- package/dist/api/QItemSection.json +1 -38
- package/dist/api/QKnob.json +1 -197
- package/dist/api/QLayout.json +1 -100
- package/dist/api/QLinearProgress.json +1 -113
- package/dist/api/QList.json +1 -58
- package/dist/api/QMarkupTable.json +1 -64
- package/dist/api/QMenu.json +1 -337
- package/dist/api/QNoSsr.json +1 -38
- package/dist/api/QOptionGroup.json +1 -242
- package/dist/api/QPage.json +1 -42
- package/dist/api/QPageContainer.json +1 -11
- package/dist/api/QPageScroller.json +1 -68
- package/dist/api/QPageSticky.json +1 -44
- package/dist/api/QPagination.json +1 -376
- package/dist/api/QParallax.json +1 -74
- package/dist/api/QPopupEdit.json +1 -335
- package/dist/api/QPopupProxy.json +1 -168
- package/dist/api/QPullToRefresh.json +1 -91
- package/dist/api/QRadio.json +1 -163
- package/dist/api/QRange.json +1 -789
- package/dist/api/QRating.json +1 -186
- package/dist/api/QResizeObserver.json +1 -56
- package/dist/api/QResponsive.json +1 -26
- package/dist/api/QRouteTab.json +1 -225
- package/dist/api/QScrollArea.json +1 -354
- package/dist/api/QScrollObserver.json +1 -140
- package/dist/api/QSelect.json +1 -1387
- package/dist/api/QSeparator.json +1 -72
- package/dist/api/QSkeleton.json +1 -127
- package/dist/api/QSlideItem.json +1 -219
- package/dist/api/QSlideTransition.json +1 -33
- package/dist/api/QSlider.json +1 -687
- package/dist/api/QSpace.json +1 -6
- package/dist/api/QSpinner.json +1 -37
- package/dist/api/QSpinnerAudio.json +1 -30
- package/dist/api/QSpinnerBall.json +1 -30
- package/dist/api/QSpinnerBars.json +1 -30
- package/dist/api/QSpinnerBox.json +1 -30
- package/dist/api/QSpinnerClock.json +1 -30
- package/dist/api/QSpinnerComment.json +1 -30
- package/dist/api/QSpinnerCube.json +1 -30
- package/dist/api/QSpinnerDots.json +1 -30
- package/dist/api/QSpinnerFacebook.json +1 -30
- package/dist/api/QSpinnerGears.json +1 -30
- package/dist/api/QSpinnerGrid.json +1 -30
- package/dist/api/QSpinnerHearts.json +1 -30
- package/dist/api/QSpinnerHourglass.json +1 -30
- package/dist/api/QSpinnerInfinity.json +1 -30
- package/dist/api/QSpinnerIos.json +1 -30
- package/dist/api/QSpinnerOrbit.json +1 -30
- package/dist/api/QSpinnerOval.json +1 -30
- package/dist/api/QSpinnerPie.json +1 -30
- package/dist/api/QSpinnerPuff.json +1 -30
- package/dist/api/QSpinnerRadio.json +1 -30
- package/dist/api/QSpinnerRings.json +1 -30
- package/dist/api/QSpinnerTail.json +1 -30
- package/dist/api/QSplitter.json +1 -146
- package/dist/api/QStep.json +1 -167
- package/dist/api/QStepper.json +1 -340
- package/dist/api/QStepperNavigation.json +1 -11
- package/dist/api/QTab.json +1 -113
- package/dist/api/QTabPanel.json +1 -39
- package/dist/api/QTabPanels.json +1 -203
- package/dist/api/QTable.json +1 -2799
- package/dist/api/QTabs.json +1 -179
- package/dist/api/QTd.json +1 -31
- package/dist/api/QTh.json +1 -26
- package/dist/api/QTime.json +1 -317
- package/dist/api/QTimeline.json +1 -57
- package/dist/api/QTimelineEntry.json +1 -105
- package/dist/api/QToggle.json +1 -230
- package/dist/api/QToolbar.json +1 -18
- package/dist/api/QToolbarTitle.json +1 -18
- package/dist/api/QTooltip.json +1 -282
- package/dist/api/QTr.json +1 -26
- package/dist/api/QTree.json +1 -599
- package/dist/api/QUploader.json +1 -665
- package/dist/api/QUploaderAddTrigger.json +1 -6
- package/dist/api/QVideo.json +1 -83
- package/dist/api/QVirtualScroll.json +1 -260
- package/dist/api/Ripple.json +1 -115
- package/dist/api/Screen.json +1 -190
- package/dist/api/Scroll.json +1 -28
- package/dist/api/ScrollFire.json +1 -24
- package/dist/api/SessionStorage.json +1 -187
- package/dist/api/TouchHold.json +1 -81
- package/dist/api/TouchPan.json +1 -178
- package/dist/api/TouchRepeat.json +1 -142
- package/dist/api/TouchSwipe.json +1 -113
- package/dist/icon-set/bootstrap-icons.umd.prod.js +3 -2
- package/dist/icon-set/eva-icons.umd.prod.js +3 -2
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +3 -2
- package/dist/icon-set/fontawesome-v5.umd.prod.js +3 -2
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +3 -2
- package/dist/icon-set/fontawesome-v6.umd.prod.js +3 -2
- package/dist/icon-set/ionicons-v4.umd.prod.js +3 -2
- package/dist/icon-set/line-awesome.umd.prod.js +3 -2
- package/dist/icon-set/material-icons-outlined.umd.prod.js +3 -2
- package/dist/icon-set/material-icons-round.umd.prod.js +3 -2
- package/dist/icon-set/material-icons-sharp.umd.prod.js +3 -2
- package/dist/icon-set/material-icons.umd.prod.js +3 -2
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +3 -2
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +3 -2
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +3 -2
- package/dist/icon-set/mdi-v3.umd.prod.js +3 -2
- package/dist/icon-set/mdi-v4.umd.prod.js +3 -2
- package/dist/icon-set/mdi-v5.umd.prod.js +3 -2
- package/dist/icon-set/mdi-v6.umd.prod.js +3 -2
- package/dist/icon-set/mdi-v7.umd.prod.js +3 -2
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +3 -2
- package/dist/icon-set/svg-eva-icons.umd.prod.js +3 -2
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +3 -2
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +3 -2
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +3 -2
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +3 -2
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +3 -2
- package/dist/icon-set/svg-line-awesome.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-icons.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +3 -2
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +3 -2
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +3 -2
- package/dist/icon-set/svg-mdi-v7.umd.prod.js +3 -2
- package/dist/icon-set/svg-themify.umd.prod.js +3 -2
- package/dist/icon-set/themify.umd.prod.js +3 -2
- package/dist/lang/ar-TN.umd.prod.js +3 -2
- package/dist/lang/ar.umd.prod.js +3 -2
- package/dist/lang/az-Latn.umd.prod.js +3 -2
- package/dist/lang/bg.umd.prod.js +3 -2
- package/dist/lang/bn.umd.prod.js +3 -2
- package/dist/lang/ca.umd.prod.js +3 -2
- package/dist/lang/cs.umd.prod.js +3 -2
- package/dist/lang/da.umd.prod.js +3 -2
- package/dist/lang/de-CH.umd.prod.js +3 -2
- package/dist/lang/de-DE.umd.prod.js +3 -2
- package/dist/lang/de.umd.prod.js +3 -2
- package/dist/lang/el.umd.prod.js +3 -2
- package/dist/lang/en-GB.umd.prod.js +3 -2
- package/dist/lang/en-US.umd.prod.js +3 -2
- package/dist/lang/eo.umd.prod.js +3 -2
- package/dist/lang/es.umd.prod.js +3 -2
- package/dist/lang/et.umd.prod.js +3 -2
- package/dist/lang/eu.umd.prod.js +3 -2
- package/dist/lang/fa-IR.umd.prod.js +3 -2
- package/dist/lang/fa.umd.prod.js +3 -2
- package/dist/lang/fi.umd.prod.js +3 -2
- package/dist/lang/fr.umd.prod.js +3 -2
- package/dist/lang/gn.umd.prod.js +3 -2
- package/dist/lang/he.umd.prod.js +3 -2
- package/dist/lang/hi.umd.prod.js +3 -2
- package/dist/lang/hr.umd.prod.js +3 -2
- package/dist/lang/hu.umd.prod.js +3 -2
- package/dist/lang/id.umd.prod.js +3 -2
- package/dist/lang/is.umd.prod.js +3 -2
- package/dist/lang/it.umd.prod.js +3 -2
- package/dist/lang/ja.umd.prod.js +3 -2
- package/dist/lang/kk.umd.prod.js +3 -2
- package/dist/lang/km.umd.prod.js +3 -2
- package/dist/lang/ko-KR.umd.prod.js +3 -2
- package/dist/lang/kur-CKB.umd.prod.js +3 -2
- package/dist/lang/lt.umd.prod.js +3 -2
- package/dist/lang/lu.umd.prod.js +3 -2
- package/dist/lang/lv.umd.prod.js +3 -2
- package/dist/lang/mk.umd.prod.js +3 -2
- package/dist/lang/ml.umd.prod.js +3 -2
- package/dist/lang/mm.umd.prod.js +3 -2
- package/dist/lang/ms.umd.prod.js +3 -2
- package/dist/lang/my.umd.prod.js +3 -2
- package/dist/lang/nb-NO.umd.prod.js +3 -2
- package/dist/lang/nl.umd.prod.js +3 -2
- package/dist/lang/pl.umd.prod.js +3 -2
- package/dist/lang/pt-BR.umd.prod.js +3 -2
- package/dist/lang/pt.umd.prod.js +3 -2
- package/dist/lang/ro.umd.prod.js +3 -2
- package/dist/lang/ru.umd.prod.js +3 -2
- package/dist/lang/sk.umd.prod.js +3 -2
- package/dist/lang/sl.umd.prod.js +3 -2
- package/dist/lang/sm.umd.prod.js +3 -2
- package/dist/lang/sr-CYR.umd.prod.js +3 -2
- package/dist/lang/sr.umd.prod.js +3 -2
- package/dist/lang/sv.umd.prod.js +3 -2
- package/dist/lang/ta.umd.prod.js +3 -2
- package/dist/lang/th.umd.prod.js +3 -2
- package/dist/lang/tl.umd.prod.js +7 -0
- package/dist/lang/tr.umd.prod.js +3 -2
- package/dist/lang/ug.umd.prod.js +3 -2
- package/dist/lang/uk.umd.prod.js +3 -2
- package/dist/lang/uz-Cyrl.umd.prod.js +3 -2
- package/dist/lang/uz-Latn.umd.prod.js +3 -2
- package/dist/lang/vi.umd.prod.js +3 -2
- package/dist/lang/zh-CN.umd.prod.js +3 -2
- package/dist/lang/zh-TW.umd.prod.js +3 -2
- package/dist/quasar.cjs.prod.js +123 -2
- package/dist/quasar.css +25 -30
- package/dist/quasar.esm.js +16930 -26278
- package/dist/quasar.esm.prod.js +123 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +31 -50
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +18 -25
- package/dist/quasar.umd.js +16733 -26521
- package/dist/quasar.umd.prod.js +123 -2
- package/dist/transforms/api-list.json +1 -153
- package/dist/transforms/auto-import.json +1 -267
- package/dist/transforms/import-map.json +1 -181
- package/dist/transforms/loader-asset-urls.json +1 -60
- package/dist/types/api/dialog.d.ts +1 -1
- package/dist/types/api/qinput.d.ts +1 -1
- package/dist/types/api/qtable.d.ts +1 -1
- package/dist/types/api/qtree.d.ts +1 -1
- package/dist/types/api/quploader.d.ts +1 -1
- package/dist/types/api/validation.d.ts +1 -1
- package/dist/types/api/web-storage.d.ts +6 -6
- package/dist/types/feature-flag.d.ts +1 -1
- package/dist/types/globals.d.ts +22 -15
- package/dist/types/index.d.ts +45 -36
- package/dist/types/lang.d.ts +3 -3
- package/dist/types/plugin.d.ts +3 -1
- package/dist/types/ts-helpers.d.ts +3 -3
- package/dist/types/utils/colors.d.ts +1 -1
- package/dist/types/utils/date.d.ts +10 -10
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/run-sequential-promises.d.ts +12 -12
- package/dist/types/utils/scroll.d.ts +5 -5
- package/dist/types/utils.d.ts +15 -13
- package/dist/vetur/quasar-attributes.json +1 -5890
- package/dist/vetur/quasar-tags.json +1 -2084
- package/dist/web-types/web-types.json +1 -19595
- package/lang/index.json +1 -266
- package/lang/tl.js +98 -0
- package/lang/tl.mjs +93 -0
- package/package.json +18 -22
- package/src/body.js +6 -14
- package/src/components/ajax-bar/QAjaxBar.js +1 -1
- package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
- package/src/components/btn/QBtn.js +6 -6
- package/src/components/btn-dropdown/QBtnDropdown.json +1 -1
- package/src/components/card/QCard.sass +17 -24
- package/src/components/checkbox/use-checkbox.js +1 -1
- package/src/components/chip/QChip.js +1 -1
- package/src/components/color/QColor.js +4 -4
- package/src/components/date/QDate.js +1 -1
- package/src/components/dialog/__tests__/DialogWrapper.vue +33 -0
- package/src/components/dialog/__tests__/QDialog.cy.js +450 -36
- package/src/components/drawer/QDrawer.js +1 -1
- package/src/components/drawer/QDrawer.json +1 -1
- package/src/components/file/QFile.js +2 -2
- package/src/components/footer/QFooter.js +2 -2
- package/src/components/form/QForm.js +3 -3
- package/src/components/header/QHeader.js +1 -1
- package/src/components/img/QImg.js +47 -39
- package/src/components/img/QImg.json +9 -0
- package/src/components/inner-loading/QInnerLoading.js +1 -1
- package/src/components/inner-loading/QInnerLoading.sass +1 -0
- package/src/components/input/use-mask.js +3 -3
- package/src/components/menu/QMenu.json +1 -1
- package/src/components/no-ssr/QNoSsr.js +4 -4
- package/src/components/page-sticky/use-page-sticky.js +4 -4
- package/src/components/popup-edit/QPopupEdit.js +1 -1
- package/src/components/resize-observer/QResizeObserver.js +1 -0
- package/src/components/scroll-area/QScrollArea.js +1 -1
- package/src/components/select/QSelect.js +9 -9
- package/src/components/table/QTd.js +1 -1
- package/src/components/table/QTh.js +1 -1
- package/src/components/tabs/QTabs.js +3 -3
- package/src/components/time/QTime.js +3 -3
- package/src/components/tooltip/QTooltip.js +4 -2
- package/src/components/tooltip/QTooltip.json +6 -0
- package/src/components/tree/QTree.js +1 -1
- package/src/components/uploader/uploader-core.js +2 -2
- package/src/components/uploader/xhr-uploader-plugin.js +1 -1
- package/src/components/virtual-scroll/use-virtual-scroll.js +3 -3
- package/src/composables/private/__tests__/use-model-toggle.cy.js +43 -3
- package/src/composables/private/use-anchor.js +1 -1
- package/src/composables/private/use-key-composition.js +1 -1
- package/src/composables/private/use-panel.js +1 -1
- package/src/composables/private/use-portal.js +1 -1
- package/src/composables/private/use-router-link.js +1 -1
- package/src/directives/TouchPan.js +1 -1
- package/src/history.js +1 -1
- package/src/index.umd.js +5 -1
- package/src/lang.js +1 -1
- package/src/plugins/BottomSheet.json +1 -1
- package/src/plugins/Cookies.js +1 -1
- package/src/plugins/Dark.js +1 -1
- package/src/plugins/Loading.js +1 -1
- package/src/plugins/LoadingBar.js +1 -1
- package/src/plugins/Notify.js +4 -4
- package/src/plugins/Platform.js +111 -93
- package/src/plugins/Screen.js +1 -1
- package/src/utils/event.js +1 -1
- package/src/utils/frame-debounce.js +1 -1
- package/src/utils/morph.js +1 -1
- package/src/utils/private/click-outside.js +1 -1
- package/src/utils/private/escape-key.js +1 -1
- package/src/utils/private/focusout.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ref, computed, watch, onMounted,
|
|
1
|
+
import { h, ref, computed, watch, onMounted, Transition, getCurrentInstance } from 'vue'
|
|
2
2
|
|
|
3
3
|
import QSpinner from '../spinner/QSpinner.js'
|
|
4
4
|
|
|
@@ -6,6 +6,8 @@ import useRatio, { useRatioProps } from '../../composables/private/use-ratio.js'
|
|
|
6
6
|
|
|
7
7
|
import { createComponent } from '../../utils/private/create.js'
|
|
8
8
|
import { hSlot } from '../../utils/private/render.js'
|
|
9
|
+
import { vmIsDestroyed } from '../../utils/private/vm.js'
|
|
10
|
+
import useTimeout from '../../composables/private/use-timeout.js'
|
|
9
11
|
|
|
10
12
|
const defaultRatio = 16 / 9
|
|
11
13
|
|
|
@@ -30,6 +32,11 @@ export default createComponent({
|
|
|
30
32
|
type: String,
|
|
31
33
|
default: 'lazy'
|
|
32
34
|
},
|
|
35
|
+
loadingShowDelay: {
|
|
36
|
+
type: [ Number, String ],
|
|
37
|
+
default: 0
|
|
38
|
+
},
|
|
39
|
+
|
|
33
40
|
fetchpriority: {
|
|
34
41
|
type: String,
|
|
35
42
|
default: 'auto'
|
|
@@ -68,8 +75,10 @@ export default createComponent({
|
|
|
68
75
|
setup (props, { slots, emit }) {
|
|
69
76
|
const naturalRatio = ref(props.initialRatio)
|
|
70
77
|
const ratioStyle = useRatio(props, naturalRatio)
|
|
78
|
+
const vm = getCurrentInstance()
|
|
71
79
|
|
|
72
|
-
|
|
80
|
+
const { registerTimeout: registerLoadTimeout, removeTimeout: removeLoadTimeout } = useTimeout()
|
|
81
|
+
const { registerTimeout: registerLoadShowTimeout, removeTimeout: removeLoadShowTimeout } = useTimeout()
|
|
73
82
|
|
|
74
83
|
const images = [
|
|
75
84
|
ref(null),
|
|
@@ -103,6 +112,24 @@ export default createComponent({
|
|
|
103
112
|
|
|
104
113
|
watch(() => getCurrentSrc(), addImage)
|
|
105
114
|
|
|
115
|
+
function setLoading () {
|
|
116
|
+
removeLoadShowTimeout()
|
|
117
|
+
|
|
118
|
+
if (props.loadingShowDelay === 0) {
|
|
119
|
+
isLoading.value = true
|
|
120
|
+
return
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
registerLoadShowTimeout(() => {
|
|
124
|
+
isLoading.value = true
|
|
125
|
+
}, props.loadingShowDelay)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function clearLoading () {
|
|
129
|
+
removeLoadShowTimeout()
|
|
130
|
+
isLoading.value = false
|
|
131
|
+
}
|
|
132
|
+
|
|
106
133
|
function getCurrentSrc () {
|
|
107
134
|
return props.src || props.srcset || props.sizes
|
|
108
135
|
? {
|
|
@@ -120,74 +147,64 @@ export default createComponent({
|
|
|
120
147
|
}
|
|
121
148
|
|
|
122
149
|
function addImage (imgProps) {
|
|
123
|
-
|
|
124
|
-
clearTimeout(loadTimer)
|
|
125
|
-
loadTimer = null
|
|
126
|
-
}
|
|
127
|
-
|
|
150
|
+
removeLoadTimeout()
|
|
128
151
|
hasError.value = false
|
|
129
152
|
|
|
130
153
|
if (imgProps === null) {
|
|
131
|
-
|
|
154
|
+
clearLoading()
|
|
132
155
|
images[ position.value ^ 1 ].value = getPlaceholderSrc()
|
|
133
156
|
}
|
|
134
157
|
else {
|
|
135
|
-
|
|
158
|
+
setLoading()
|
|
136
159
|
}
|
|
137
160
|
|
|
138
161
|
images[ position.value ].value = imgProps
|
|
139
162
|
}
|
|
140
163
|
|
|
141
164
|
function onLoad ({ target }) {
|
|
142
|
-
if (
|
|
165
|
+
if (vmIsDestroyed(vm) === false) {
|
|
166
|
+
removeLoadTimeout()
|
|
143
167
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
168
|
+
naturalRatio.value = target.naturalHeight === 0
|
|
169
|
+
? 0.5
|
|
170
|
+
: target.naturalWidth / target.naturalHeight
|
|
148
171
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
: target.naturalWidth / target.naturalHeight
|
|
152
|
-
|
|
153
|
-
waitForCompleteness(target, 1)
|
|
172
|
+
waitForCompleteness(target, 1)
|
|
173
|
+
}
|
|
154
174
|
}
|
|
155
175
|
|
|
156
176
|
function waitForCompleteness (target, count) {
|
|
157
177
|
// protect against running forever
|
|
158
|
-
if (
|
|
178
|
+
if (count === 1000 || vmIsDestroyed(vm) === true) return
|
|
159
179
|
|
|
160
180
|
if (target.complete === true) {
|
|
161
181
|
onReady(target)
|
|
162
182
|
}
|
|
163
183
|
else {
|
|
164
|
-
|
|
165
|
-
loadTimer = null
|
|
184
|
+
registerLoadTimeout(() => {
|
|
166
185
|
waitForCompleteness(target, count + 1)
|
|
167
186
|
}, 50)
|
|
168
187
|
}
|
|
169
188
|
}
|
|
170
189
|
|
|
171
190
|
function onReady (img) {
|
|
172
|
-
if (
|
|
191
|
+
if (vmIsDestroyed(vm) === true) return
|
|
173
192
|
|
|
174
193
|
position.value = position.value ^ 1
|
|
175
194
|
images[ position.value ].value = null
|
|
176
|
-
|
|
195
|
+
clearLoading()
|
|
177
196
|
hasError.value = false
|
|
178
197
|
emit('load', img.currentSrc || img.src)
|
|
179
198
|
}
|
|
180
199
|
|
|
181
200
|
function onError (err) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
loadTimer = null
|
|
185
|
-
}
|
|
201
|
+
removeLoadTimeout()
|
|
202
|
+
clearLoading()
|
|
186
203
|
|
|
187
|
-
isLoading.value = false
|
|
188
204
|
hasError.value = true
|
|
189
205
|
images[ position.value ].value = null
|
|
190
206
|
images[ position.value ^ 1 ].value = getPlaceholderSrc()
|
|
207
|
+
|
|
191
208
|
emit('error', err)
|
|
192
209
|
}
|
|
193
210
|
|
|
@@ -227,7 +244,7 @@ export default createComponent({
|
|
|
227
244
|
}
|
|
228
245
|
|
|
229
246
|
function getContent () {
|
|
230
|
-
if (isLoading.value
|
|
247
|
+
if (isLoading.value === false) {
|
|
231
248
|
return h('div', {
|
|
232
249
|
key: 'content',
|
|
233
250
|
class: 'q-img__content absolute-full q-anchor--skip'
|
|
@@ -262,15 +279,6 @@ export default createComponent({
|
|
|
262
279
|
else {
|
|
263
280
|
addImage(getCurrentSrc())
|
|
264
281
|
}
|
|
265
|
-
|
|
266
|
-
onBeforeUnmount(() => {
|
|
267
|
-
isDestroyed = true
|
|
268
|
-
|
|
269
|
-
if (loadTimer !== null) {
|
|
270
|
-
clearTimeout(loadTimer)
|
|
271
|
-
loadTimer = null
|
|
272
|
-
}
|
|
273
|
-
})
|
|
274
282
|
}
|
|
275
283
|
|
|
276
284
|
return () => {
|
|
@@ -99,6 +99,15 @@
|
|
|
99
99
|
"category": "behavior"
|
|
100
100
|
},
|
|
101
101
|
|
|
102
|
+
"loading-show-delay": {
|
|
103
|
+
"type": [ "Number", "String" ],
|
|
104
|
+
"desc": "Delay showing the spinner when image changes; Gives time for the browser to load the image from cache to prevent flashing the spinner unnecessarily; Value should represent milliseconds",
|
|
105
|
+
"default": 0,
|
|
106
|
+
"examples": [ "500", "caption-lines=\"1000\"" ],
|
|
107
|
+
"category": "behavior",
|
|
108
|
+
"addedIn": "v2.14.6"
|
|
109
|
+
},
|
|
110
|
+
|
|
102
111
|
"crossorigin": {
|
|
103
112
|
"type": "String",
|
|
104
113
|
"desc": "Same syntax as <img> crossorigin attribute",
|
|
@@ -33,7 +33,7 @@ export default createComponent({
|
|
|
33
33
|
const { transitionProps, transitionStyle } = useTransition(props)
|
|
34
34
|
|
|
35
35
|
const classes = computed(() =>
|
|
36
|
-
'q-inner-loading absolute-full column flex-center'
|
|
36
|
+
'q-inner-loading q--avoid-card-border absolute-full column flex-center'
|
|
37
37
|
+ (isDark.value === true ? ' q-inner-loading--dark' : '')
|
|
38
38
|
)
|
|
39
39
|
|
|
@@ -97,7 +97,7 @@ export default function (props, emit, emitValue, inputRef) {
|
|
|
97
97
|
let pad = '', localMaskMarked = maskMarked
|
|
98
98
|
const padPos = localMaskMarked.indexOf(MARKER)
|
|
99
99
|
|
|
100
|
-
if (padPos
|
|
100
|
+
if (padPos !== -1) {
|
|
101
101
|
for (let i = size - localMaskMarked.length; i > 0; i--) {
|
|
102
102
|
pad += MARKER
|
|
103
103
|
}
|
|
@@ -259,7 +259,7 @@ export default function (props, emit, emitValue, inputRef) {
|
|
|
259
259
|
return
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
if ([ 'deleteContentBackward', 'deleteContentForward' ].indexOf(inputType)
|
|
262
|
+
if ([ 'deleteContentBackward', 'deleteContentForward' ].indexOf(inputType) !== -1) {
|
|
263
263
|
const cursor = props.reverseFillMask === true
|
|
264
264
|
? (
|
|
265
265
|
end === 0
|
|
@@ -525,7 +525,7 @@ export default function (props, emit, emitValue, inputRef) {
|
|
|
525
525
|
|
|
526
526
|
let valIndex = val.length - 1, output = ''
|
|
527
527
|
|
|
528
|
-
for (let maskIndex = mask.length - 1; maskIndex >= 0 && valIndex
|
|
528
|
+
for (let maskIndex = mask.length - 1; maskIndex >= 0 && valIndex !== -1; maskIndex--) {
|
|
529
529
|
const maskDef = mask[ maskIndex ]
|
|
530
530
|
|
|
531
531
|
let valChar = val[ valIndex ]
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
"persistent": {
|
|
65
65
|
"type": "Boolean",
|
|
66
|
-
"desc": "Allows the menu to not be dismissed by a click/tap outside of the menu or by hitting the ESC key",
|
|
66
|
+
"desc": "Allows the menu to not be dismissed by a click/tap outside of the menu or by hitting the ESC key; Also, an app route change won't dismiss it",
|
|
67
67
|
"category": "behavior"
|
|
68
68
|
},
|
|
69
69
|
|
|
@@ -21,16 +21,16 @@ export default createComponent({
|
|
|
21
21
|
const canRender = useCanRender()
|
|
22
22
|
|
|
23
23
|
return () => {
|
|
24
|
-
const data = {}
|
|
25
|
-
|
|
26
24
|
if (canRender.value === true) {
|
|
27
25
|
const node = hSlot(slots.default)
|
|
28
26
|
return node === void 0
|
|
29
27
|
? node
|
|
30
|
-
: (node.length > 1 ? h(props.tag,
|
|
28
|
+
: (node.length > 1 ? h(props.tag, {}, node) : node[ 0 ])
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
data
|
|
31
|
+
const data = {
|
|
32
|
+
class: 'q-no-ssr-placeholder'
|
|
33
|
+
}
|
|
34
34
|
|
|
35
35
|
const node = hSlot(slots.placeholder)
|
|
36
36
|
if (node !== void 0) {
|
|
@@ -33,10 +33,10 @@ export default function () {
|
|
|
33
33
|
const pos = props.position
|
|
34
34
|
|
|
35
35
|
return {
|
|
36
|
-
top: pos.indexOf('top')
|
|
37
|
-
right: pos.indexOf('right')
|
|
38
|
-
bottom: pos.indexOf('bottom')
|
|
39
|
-
left: pos.indexOf('left')
|
|
36
|
+
top: pos.indexOf('top') !== -1,
|
|
37
|
+
right: pos.indexOf('right') !== -1,
|
|
38
|
+
bottom: pos.indexOf('bottom') !== -1,
|
|
39
|
+
left: pos.indexOf('left') !== -1,
|
|
40
40
|
vertical: pos === 'top' || pos === 'bottom',
|
|
41
41
|
horizontal: pos === 'left' || pos === 'right'
|
|
42
42
|
}
|
|
@@ -446,7 +446,7 @@ export default createComponent({
|
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
function removeAtIndex (index) {
|
|
449
|
-
if (index
|
|
449
|
+
if (index !== -1 && index < innerValue.value.length) {
|
|
450
450
|
if (props.multiple === true) {
|
|
451
451
|
const model = props.modelValue.slice()
|
|
452
452
|
emit('remove', { index, value: model.splice(index, 1)[ 0 ] })
|
|
@@ -542,7 +542,7 @@ export default createComponent({
|
|
|
542
542
|
model = props.modelValue.slice(),
|
|
543
543
|
index = innerOptionsValue.value.findIndex(v => isDeepEqual(v, optValue))
|
|
544
544
|
|
|
545
|
-
if (index
|
|
545
|
+
if (index !== -1) {
|
|
546
546
|
emit('remove', { index, value: model.splice(index, 1)[ 0 ] })
|
|
547
547
|
}
|
|
548
548
|
else {
|
|
@@ -560,9 +560,9 @@ export default createComponent({
|
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
function setOptionIndex (index) {
|
|
563
|
-
if ($q.platform.is.desktop !== true)
|
|
563
|
+
if ($q.platform.is.desktop !== true) return
|
|
564
564
|
|
|
565
|
-
const val = index
|
|
565
|
+
const val = index !== -1 && index < virtualScrollLength.value
|
|
566
566
|
? index
|
|
567
567
|
: -1
|
|
568
568
|
|
|
@@ -716,7 +716,7 @@ export default createComponent({
|
|
|
716
716
|
|
|
717
717
|
const tabShouldSelect = e.shiftKey !== true
|
|
718
718
|
&& props.multiple !== true
|
|
719
|
-
&& (optionIndex.value
|
|
719
|
+
&& (optionIndex.value !== -1 || newValueModeValid === true)
|
|
720
720
|
|
|
721
721
|
// escape
|
|
722
722
|
if (e.keyCode === 27) {
|
|
@@ -734,7 +734,7 @@ export default createComponent({
|
|
|
734
734
|
e.target === void 0
|
|
735
735
|
|| e.target.id !== state.targetUid.value
|
|
736
736
|
|| state.editable.value !== true
|
|
737
|
-
)
|
|
737
|
+
) return
|
|
738
738
|
|
|
739
739
|
// down
|
|
740
740
|
if (
|
|
@@ -828,7 +828,7 @@ export default createComponent({
|
|
|
828
828
|
searchBuffer += char
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
const searchRe = new RegExp('^' + searchBuffer.split('').map(l => (reEscapeList.indexOf(l)
|
|
831
|
+
const searchRe = new RegExp('^' + searchBuffer.split('').map(l => (reEscapeList.indexOf(l) !== -1 ? '\\' + l : l)).join('.*'), 'i')
|
|
832
832
|
|
|
833
833
|
let index = optionIndex.value
|
|
834
834
|
|
|
@@ -862,11 +862,11 @@ export default createComponent({
|
|
|
862
862
|
e.keyCode !== 13
|
|
863
863
|
&& (e.keyCode !== 32 || props.useInput === true || searchBuffer !== '')
|
|
864
864
|
&& (e.keyCode !== 9 || tabShouldSelect === false)
|
|
865
|
-
)
|
|
865
|
+
) return
|
|
866
866
|
|
|
867
867
|
e.keyCode !== 9 && stopAndPrevent(e)
|
|
868
868
|
|
|
869
|
-
if (optionIndex.value
|
|
869
|
+
if (optionIndex.value !== -1 && optionIndex.value < optionsLength) {
|
|
870
870
|
toggleOption(props.options[ optionIndex.value ])
|
|
871
871
|
return
|
|
872
872
|
}
|
|
@@ -188,7 +188,7 @@ export default createComponent({
|
|
|
188
188
|
// it can be called faster than component being initialized
|
|
189
189
|
// so we need to protect against that case
|
|
190
190
|
// (one example of such case is the docs release notes page)
|
|
191
|
-
if (domProps.value === void 0 || contentRef.value === null)
|
|
191
|
+
if (domProps.value === void 0 || contentRef.value === null) return
|
|
192
192
|
|
|
193
193
|
const
|
|
194
194
|
size = domSize[ domProps.value.container ],
|
|
@@ -279,7 +279,7 @@ export default createComponent({
|
|
|
279
279
|
|
|
280
280
|
function updateArrows () {
|
|
281
281
|
const content = contentRef.value
|
|
282
|
-
if (content === null)
|
|
282
|
+
if (content === null) return
|
|
283
283
|
|
|
284
284
|
const
|
|
285
285
|
rect = content.getBoundingClientRect(),
|
|
@@ -328,7 +328,7 @@ export default createComponent({
|
|
|
328
328
|
)
|
|
329
329
|
|
|
330
330
|
const len = tabs.length
|
|
331
|
-
if (len === 0)
|
|
331
|
+
if (len === 0) return
|
|
332
332
|
|
|
333
333
|
if (keyCode === 36) { // Home
|
|
334
334
|
scrollToTabEl(tabs[ 0 ])
|
|
@@ -567,7 +567,7 @@ export default createComponent({
|
|
|
567
567
|
? validHours.value.values
|
|
568
568
|
: validHours.value[ isAM.value === true ? 'am' : 'pm' ].values
|
|
569
569
|
|
|
570
|
-
if (values.length === 0)
|
|
570
|
+
if (values.length === 0) return
|
|
571
571
|
|
|
572
572
|
if (innerModel.value.hour === null) {
|
|
573
573
|
setHour(values[ 0 ])
|
|
@@ -603,7 +603,7 @@ export default createComponent({
|
|
|
603
603
|
if (validMinutes.value !== null) {
|
|
604
604
|
const values = validMinutes.value.values
|
|
605
605
|
|
|
606
|
-
if (values.length === 0)
|
|
606
|
+
if (values.length === 0) return
|
|
607
607
|
|
|
608
608
|
if (innerModel.value.minute === null) {
|
|
609
609
|
setMinute(values[ 0 ])
|
|
@@ -635,7 +635,7 @@ export default createComponent({
|
|
|
635
635
|
if (validSeconds.value !== null) {
|
|
636
636
|
const values = validSeconds.value.values
|
|
637
637
|
|
|
638
|
-
if (values.length === 0)
|
|
638
|
+
if (values.length === 0) return
|
|
639
639
|
|
|
640
640
|
if (innerModel.value.seconds === null) {
|
|
641
641
|
setSecond(values[ 0 ])
|
|
@@ -72,7 +72,9 @@ export default createComponent({
|
|
|
72
72
|
hideDelay: {
|
|
73
73
|
type: Number,
|
|
74
74
|
default: 0
|
|
75
|
-
}
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
persistent: Boolean
|
|
76
78
|
},
|
|
77
79
|
|
|
78
80
|
emits: [
|
|
@@ -241,7 +243,7 @@ export default createComponent({
|
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
function configureAnchorEl () {
|
|
244
|
-
if (props.noParentEvent === true || anchorEl.value === null)
|
|
246
|
+
if (props.noParentEvent === true || anchorEl.value === null) return
|
|
245
247
|
|
|
246
248
|
const evts = $q.platform.is.mobile === true
|
|
247
249
|
? [
|
|
@@ -96,6 +96,12 @@
|
|
|
96
96
|
"desc": "Configure Tooltip to disappear with delay",
|
|
97
97
|
"default": 0,
|
|
98
98
|
"category": "behavior"
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
"persistent": {
|
|
102
|
+
"type": "Boolean",
|
|
103
|
+
"desc": "Prevents Tooltip from auto-closing when app's route changes",
|
|
104
|
+
"category": "behavior"
|
|
99
105
|
}
|
|
100
106
|
},
|
|
101
107
|
|
|
@@ -129,7 +129,7 @@ export default createComponent({
|
|
|
129
129
|
: (node, filter) => {
|
|
130
130
|
const filt = filter.toLowerCase()
|
|
131
131
|
return node[ props.labelKey ]
|
|
132
|
-
&& node[ props.labelKey ].toLowerCase().indexOf(filt)
|
|
132
|
+
&& node[ props.labelKey ].toLowerCase().indexOf(filt) !== -1
|
|
133
133
|
}
|
|
134
134
|
))
|
|
135
135
|
|
|
@@ -229,7 +229,7 @@ export function getRenderer (getPlugin, expose) {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
function removeFile (file) {
|
|
232
|
-
if (props.disable)
|
|
232
|
+
if (props.disable) return
|
|
233
233
|
|
|
234
234
|
if (file.__status === 'uploaded') {
|
|
235
235
|
state.uploadedFiles.value = state.uploadedFiles.value.filter(f => f.__key !== file.__key)
|
|
@@ -274,7 +274,7 @@ export function getRenderer (getPlugin, expose) {
|
|
|
274
274
|
fileInput.value = ''
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
if (localFiles === void 0)
|
|
277
|
+
if (localFiles === void 0) return
|
|
278
278
|
|
|
279
279
|
localFiles.forEach(file => {
|
|
280
280
|
state.updateFileStatus(file, 'idle')
|
|
@@ -301,7 +301,7 @@ export function useVirtualScroll ({
|
|
|
301
301
|
scrollDetails,
|
|
302
302
|
Math.min(virtualScrollLength.value - 1, Math.max(0, parseInt(toIndex, 10) || 0)),
|
|
303
303
|
0,
|
|
304
|
-
scrollToEdges.indexOf(edge)
|
|
304
|
+
scrollToEdges.indexOf(edge) !== -1 ? edge : (prevToIndex !== -1 && toIndex > prevToIndex ? 'end' : 'start')
|
|
305
305
|
)
|
|
306
306
|
}
|
|
307
307
|
|
|
@@ -391,7 +391,7 @@ export function useVirtualScroll ({
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
function setVirtualScrollSliceRange (scrollEl, scrollDetails, toIndex, offset, align) {
|
|
394
|
-
const alignForce = typeof align === 'string' && align.indexOf('-force')
|
|
394
|
+
const alignForce = typeof align === 'string' && align.indexOf('-force') !== -1
|
|
395
395
|
const alignEnd = alignForce === true ? align.replace('-force', '') : align
|
|
396
396
|
const alignRange = alignEnd !== void 0 ? alignEnd : 'start'
|
|
397
397
|
|
|
@@ -710,7 +710,7 @@ export function useVirtualScroll ({
|
|
|
710
710
|
})
|
|
711
711
|
|
|
712
712
|
onActivated(() => {
|
|
713
|
-
if (shouldActivate !== true)
|
|
713
|
+
if (shouldActivate !== true) return
|
|
714
714
|
|
|
715
715
|
const scrollEl = getVirtualScrollTarget()
|
|
716
716
|
|
|
@@ -153,7 +153,11 @@ describe('use-model-toggle API', () => {
|
|
|
153
153
|
const fn = cy.stub()
|
|
154
154
|
cy.mount(WrapperOne, {
|
|
155
155
|
props: {
|
|
156
|
-
onHide: fn
|
|
156
|
+
onHide: fn,
|
|
157
|
+
// After the dialog has been closed, the hide event is fired only after transitionDuration.
|
|
158
|
+
// The default value for transitionDuration is 300ms. Hence, we cannot depend on the dialog closing
|
|
159
|
+
// to conclude that the event has been fired. So let's set it to 0 so that it fires immediately.
|
|
160
|
+
transitionDuration: 0
|
|
157
161
|
}
|
|
158
162
|
})
|
|
159
163
|
|
|
@@ -165,6 +169,9 @@ describe('use-model-toggle API', () => {
|
|
|
165
169
|
.then(() => {
|
|
166
170
|
expect(fn).not.to.be.called
|
|
167
171
|
})
|
|
172
|
+
|
|
173
|
+
// We are clicking x distance from the left to ensure it always clicks on the body
|
|
174
|
+
// For some reason it some times does not work without it
|
|
168
175
|
cy.get('body')
|
|
169
176
|
.click(499, 0)
|
|
170
177
|
cy.dataCy('menu')
|
|
@@ -174,11 +181,15 @@ describe('use-model-toggle API', () => {
|
|
|
174
181
|
})
|
|
175
182
|
})
|
|
176
183
|
|
|
177
|
-
it('should emit @hide event when component is triggered with the
|
|
184
|
+
it('should emit @hide event when component is triggered with the hide() method', () => {
|
|
178
185
|
const fn = cy.stub()
|
|
179
186
|
cy.mount(WrapperOne, {
|
|
180
187
|
props: {
|
|
181
|
-
onHide: fn
|
|
188
|
+
onHide: fn,
|
|
189
|
+
// After the dialog has been closed, the hide event is fired only after transitionDuration.
|
|
190
|
+
// The default value for transitionDuration is 300ms. Hence, we cannot depend on the dialog closing
|
|
191
|
+
// to conclude that the event has been fired. So let's set it to 0 so that it fires immediately.
|
|
192
|
+
transitionDuration: 0
|
|
182
193
|
}
|
|
183
194
|
})
|
|
184
195
|
|
|
@@ -199,6 +210,35 @@ describe('use-model-toggle API', () => {
|
|
|
199
210
|
expect(fn).to.be.called
|
|
200
211
|
})
|
|
201
212
|
})
|
|
213
|
+
|
|
214
|
+
it('should emit @hide event after transition duration', () => {
|
|
215
|
+
const fn = cy.stub()
|
|
216
|
+
cy.mount(WrapperOne, {
|
|
217
|
+
props: {
|
|
218
|
+
onHide: fn,
|
|
219
|
+
transitionDuration: 500
|
|
220
|
+
}
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
expect(fn).not.to.be.called
|
|
224
|
+
cy.dataCy('method-show')
|
|
225
|
+
.click({ force: true })
|
|
226
|
+
|
|
227
|
+
cy.dataCy('wrapper')
|
|
228
|
+
cy.dataCy('method-hide')
|
|
229
|
+
.click({ force: true })
|
|
230
|
+
|
|
231
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
232
|
+
cy.dataCy('menu')
|
|
233
|
+
.wait(300)
|
|
234
|
+
.then(() => {
|
|
235
|
+
expect(fn).not.to.be.called
|
|
236
|
+
})
|
|
237
|
+
.wait(500)
|
|
238
|
+
.then(() => {
|
|
239
|
+
expect(fn).to.be.called
|
|
240
|
+
})
|
|
241
|
+
})
|
|
202
242
|
})
|
|
203
243
|
|
|
204
244
|
describe('(event): before-hide', () => {
|
|
@@ -101,7 +101,7 @@ export default function ({
|
|
|
101
101
|
})
|
|
102
102
|
|
|
103
103
|
configureAnchorEl = function (context = props.contextMenu) {
|
|
104
|
-
if (props.noParentEvent === true || anchorEl.value === null)
|
|
104
|
+
if (props.noParentEvent === true || anchorEl.value === null) return
|
|
105
105
|
|
|
106
106
|
let evts
|
|
107
107
|
|
|
@@ -8,7 +8,7 @@ const isPlainText = /[a-z0-9_ -]$/i
|
|
|
8
8
|
export default function (onInput) {
|
|
9
9
|
return function onComposition (e) {
|
|
10
10
|
if (e.type === 'compositionend' || e.type === 'change') {
|
|
11
|
-
if (e.target.qComposing !== true)
|
|
11
|
+
if (e.target.qComposing !== true) return
|
|
12
12
|
e.target.qComposing = false
|
|
13
13
|
onInput(e)
|
|
14
14
|
}
|
|
@@ -162,7 +162,7 @@ export default function () {
|
|
|
162
162
|
function goToPanelByOffset (direction, startIndex = panelIndex.value) {
|
|
163
163
|
let index = startIndex + direction
|
|
164
164
|
|
|
165
|
-
while (index
|
|
165
|
+
while (index !== -1 && index < panels.length) {
|
|
166
166
|
const opt = panels[ index ]
|
|
167
167
|
|
|
168
168
|
if (
|