quasar 2.11.2 → 2.11.4
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/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/mdi-v7.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-mdi-v7.umd.prod.js +2 -2
- 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 +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/eu.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/kk.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/mm.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sm.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
- package/dist/lang/uz-Latn.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +4 -0
- package/dist/quasar.esm.js +386 -179
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +4 -0
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +3 -1
- package/dist/quasar.umd.js +386 -179
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/web-types/web-types.json +1 -1
- package/package.json +8 -8
- package/src/components/ajax-bar/QAjaxBar.js +13 -5
- package/src/components/btn/QBtn.js +3 -2
- package/src/components/carousel/QCarousel.js +17 -10
- package/src/components/checkbox/use-checkbox.js +2 -0
- package/src/components/dialog/QDialog.js +8 -4
- package/src/components/drawer/QDrawer.js +8 -3
- package/src/components/img/QImg.js +25 -11
- package/src/components/input/QInput.js +14 -4
- package/src/components/layout/QLayout.js +5 -5
- package/src/components/menu/QMenu.js +1 -1
- package/src/components/pull-to-refresh/QPullToRefresh.js +5 -4
- package/src/components/radio/QRadio.js +2 -0
- package/src/components/resize-observer/QResizeObserver.js +9 -4
- package/src/components/scroll-area/QScrollArea.js +8 -8
- package/src/components/select/QSelect.js +19 -8
- package/src/components/slide-item/QSlideItem.js +4 -2
- package/src/components/slide-transition/QSlideTransition.js +17 -3
- package/src/components/tabs/QTabs.js +12 -5
- package/src/components/tooltip/QTooltip.js +1 -1
- package/src/composables/private/use-anchor.js +8 -3
- package/src/composables/private/use-field.js +10 -4
- package/src/composables/private/use-portal.js +3 -3
- package/src/composables/private/use-timeout.js +6 -3
- package/src/css/core/visibility.sass +2 -0
- package/src/directives/TouchHold.js +9 -4
- package/src/directives/TouchRepeat.js +10 -3
- package/src/lang.js +17 -11
- package/src/plugins/Loading.js +5 -5
- package/src/plugins/Meta.js +4 -2
- package/src/plugins/Notify.js +13 -3
- package/src/utils/debounce.js +9 -6
- package/src/utils/morph.js +7 -6
- package/src/utils/prevent-scroll.js +5 -6
- package/src/utils/private/click-outside.js +10 -3
- package/src/utils/private/global-dialog.js +1 -1
- package/src/utils/private/global-nodes.js +44 -13
- package/src/utils/private/position-engine.js +67 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quasar",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.4",
|
|
4
4
|
"description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
|
|
5
5
|
"main": "dist/quasar.cjs.prod.js",
|
|
6
6
|
"module": "dist/quasar.esm.prod.js",
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"homepage": "https://quasar.dev",
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@quasar/app-vite": "^1.1.3",
|
|
71
|
-
"@quasar/extras": "^1.15.
|
|
71
|
+
"@quasar/extras": "^1.15.9",
|
|
72
72
|
"@quasar/quasar-app-extension-testing-e2e-cypress": "^4.1.2",
|
|
73
73
|
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
74
74
|
"@rollup/plugin-replace": "^2.3.3",
|
|
75
|
-
"autoprefixer": "^10.4.
|
|
75
|
+
"autoprefixer": "^10.4.13",
|
|
76
76
|
"babel-preset-es2015-rollup": "^3.0.0",
|
|
77
77
|
"cli-highlight": "^2.1.11",
|
|
78
|
-
"cssnano": "^5.1.
|
|
78
|
+
"cssnano": "^5.1.14",
|
|
79
79
|
"diff": "^5.1.0",
|
|
80
80
|
"eslint": "^7.4.0",
|
|
81
81
|
"eslint-config-standard": "^17.0.0",
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"recast": "^0.18.5",
|
|
95
95
|
"rimraf": "^3.0.1",
|
|
96
96
|
"rollup": "^2.34.0",
|
|
97
|
-
"table": "^6.
|
|
97
|
+
"table": "^6.8.1",
|
|
98
98
|
"uglify-es": "^3.3.9",
|
|
99
|
-
"vue": "^3.2.
|
|
100
|
-
"vue-router": "^4.
|
|
101
|
-
"yargs": "^17.
|
|
99
|
+
"vue": "^3.2.45",
|
|
100
|
+
"vue-router": "^4.1.6",
|
|
101
|
+
"yargs": "^17.6.2"
|
|
102
102
|
},
|
|
103
103
|
"vetur": {
|
|
104
104
|
"tags": "dist/vetur/quasar-tags.json",
|
|
@@ -119,7 +119,7 @@ export default createComponent({
|
|
|
119
119
|
const onScreen = ref(false)
|
|
120
120
|
const animate = ref(true)
|
|
121
121
|
|
|
122
|
-
let sessions = 0, timer, speed
|
|
122
|
+
let sessions = 0, timer = null, speed
|
|
123
123
|
|
|
124
124
|
const classes = computed(() =>
|
|
125
125
|
`q-loading-bar q-loading-bar--${ props.position }`
|
|
@@ -171,19 +171,21 @@ export default createComponent({
|
|
|
171
171
|
if (oldSpeed === 0 && newSpeed > 0) {
|
|
172
172
|
planNextStep()
|
|
173
173
|
}
|
|
174
|
-
else if (oldSpeed > 0 && newSpeed <= 0) {
|
|
174
|
+
else if (timer !== null && oldSpeed > 0 && newSpeed <= 0) {
|
|
175
175
|
clearTimeout(timer)
|
|
176
|
+
timer = null
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
return sessions
|
|
179
180
|
}
|
|
180
181
|
|
|
181
|
-
clearTimeout(timer)
|
|
182
|
+
timer !== null && clearTimeout(timer)
|
|
182
183
|
emit('start')
|
|
183
184
|
|
|
184
185
|
progress.value = 0
|
|
185
186
|
|
|
186
187
|
timer = setTimeout(() => {
|
|
188
|
+
timer = null
|
|
187
189
|
animate.value = true
|
|
188
190
|
newSpeed > 0 && planNextStep()
|
|
189
191
|
}, onScreen.value === true ? 500 : 1)
|
|
@@ -210,13 +212,18 @@ export default createComponent({
|
|
|
210
212
|
return sessions
|
|
211
213
|
}
|
|
212
214
|
|
|
213
|
-
|
|
215
|
+
if (timer !== null) {
|
|
216
|
+
clearTimeout(timer)
|
|
217
|
+
timer = null
|
|
218
|
+
}
|
|
219
|
+
|
|
214
220
|
emit('stop')
|
|
215
221
|
|
|
216
222
|
const end = () => {
|
|
217
223
|
animate.value = true
|
|
218
224
|
progress.value = 100
|
|
219
225
|
timer = setTimeout(() => {
|
|
226
|
+
timer = null
|
|
220
227
|
onScreen.value = false
|
|
221
228
|
}, 1000)
|
|
222
229
|
}
|
|
@@ -234,6 +241,7 @@ export default createComponent({
|
|
|
234
241
|
function planNextStep () {
|
|
235
242
|
if (progress.value < 100) {
|
|
236
243
|
timer = setTimeout(() => {
|
|
244
|
+
timer = null
|
|
237
245
|
increment()
|
|
238
246
|
planNextStep()
|
|
239
247
|
}, speed)
|
|
@@ -254,7 +262,7 @@ export default createComponent({
|
|
|
254
262
|
})
|
|
255
263
|
|
|
256
264
|
onBeforeUnmount(() => {
|
|
257
|
-
clearTimeout(timer)
|
|
265
|
+
timer !== null && clearTimeout(timer)
|
|
258
266
|
hijacked === true && restoreAjax(start)
|
|
259
267
|
})
|
|
260
268
|
|
|
@@ -46,7 +46,7 @@ export default createComponent({
|
|
|
46
46
|
const rootRef = ref(null)
|
|
47
47
|
const blurTargetRef = ref(null)
|
|
48
48
|
|
|
49
|
-
let localTouchTargetEl = null, avoidMouseRipple, mouseTimer
|
|
49
|
+
let localTouchTargetEl = null, avoidMouseRipple, mouseTimer = null
|
|
50
50
|
|
|
51
51
|
const hasLabel = computed(() =>
|
|
52
52
|
props.label !== void 0 && props.label !== null && props.label !== ''
|
|
@@ -192,8 +192,9 @@ export default createComponent({
|
|
|
192
192
|
// avoid duplicated mousedown event
|
|
193
193
|
// triggering another early ripple
|
|
194
194
|
avoidMouseRipple = true
|
|
195
|
-
clearTimeout(mouseTimer)
|
|
195
|
+
mouseTimer !== null && clearTimeout(mouseTimer)
|
|
196
196
|
mouseTimer = setTimeout(() => {
|
|
197
|
+
mouseTimer = null
|
|
197
198
|
avoidMouseRipple = false
|
|
198
199
|
}, 200)
|
|
199
200
|
}
|
|
@@ -68,7 +68,7 @@ export default createComponent({
|
|
|
68
68
|
|
|
69
69
|
const isDark = useDark(props, $q)
|
|
70
70
|
|
|
71
|
-
let timer, panelsLen
|
|
71
|
+
let timer = null, panelsLen
|
|
72
72
|
|
|
73
73
|
const {
|
|
74
74
|
updatePanelsList, getPanelContent,
|
|
@@ -122,7 +122,6 @@ export default createComponent({
|
|
|
122
122
|
|
|
123
123
|
watch(() => props.modelValue, () => {
|
|
124
124
|
if (props.autoplay) {
|
|
125
|
-
clearInterval(timer)
|
|
126
125
|
startTimer()
|
|
127
126
|
}
|
|
128
127
|
})
|
|
@@ -131,20 +130,28 @@ export default createComponent({
|
|
|
131
130
|
if (val) {
|
|
132
131
|
startTimer()
|
|
133
132
|
}
|
|
134
|
-
else {
|
|
135
|
-
|
|
133
|
+
else if (timer !== null) {
|
|
134
|
+
clearTimeout(timer)
|
|
135
|
+
timer = null
|
|
136
136
|
}
|
|
137
137
|
})
|
|
138
138
|
|
|
139
139
|
function startTimer () {
|
|
140
140
|
const duration = isNumber(props.autoplay) === true
|
|
141
|
-
? props.autoplay
|
|
141
|
+
? Math.abs(props.autoplay)
|
|
142
142
|
: 5000
|
|
143
143
|
|
|
144
|
-
timer
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
timer !== null && clearTimeout(timer)
|
|
145
|
+
timer = setTimeout(() => {
|
|
146
|
+
timer = null
|
|
147
|
+
|
|
148
|
+
if (duration >= 0) {
|
|
149
|
+
nextPanel()
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
previousPanel()
|
|
153
|
+
}
|
|
154
|
+
}, duration)
|
|
148
155
|
}
|
|
149
156
|
|
|
150
157
|
onMounted(() => {
|
|
@@ -152,7 +159,7 @@ export default createComponent({
|
|
|
152
159
|
})
|
|
153
160
|
|
|
154
161
|
onBeforeUnmount(() => {
|
|
155
|
-
|
|
162
|
+
timer !== null && clearTimeout(timer)
|
|
156
163
|
})
|
|
157
164
|
|
|
158
165
|
function getNavigationContainer (type, mapping) {
|
|
@@ -112,6 +112,8 @@ export default function (type, getInner) {
|
|
|
112
112
|
const prop = { type: 'checkbox' }
|
|
113
113
|
|
|
114
114
|
props.name !== void 0 && Object.assign(prop, {
|
|
115
|
+
// see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
|
|
116
|
+
'.checked': isTrue.value,
|
|
115
117
|
'^checked': isTrue.value === true ? 'checked' : void 0,
|
|
116
118
|
name: props.name,
|
|
117
119
|
value: modelIsArray.value === true
|
|
@@ -84,7 +84,7 @@ export default createComponent({
|
|
|
84
84
|
const showing = ref(false)
|
|
85
85
|
const animating = ref(false)
|
|
86
86
|
|
|
87
|
-
let shakeTimeout, refocusTarget = null, isMaximized, avoidAutoClose
|
|
87
|
+
let shakeTimeout = null, refocusTarget = null, isMaximized, avoidAutoClose
|
|
88
88
|
|
|
89
89
|
const hideOnRouteChange = computed(() =>
|
|
90
90
|
props.persistent !== true
|
|
@@ -103,7 +103,7 @@ export default createComponent({
|
|
|
103
103
|
)
|
|
104
104
|
|
|
105
105
|
const { showPortal, hidePortal, portalIsAccessible, renderPortal } = usePortal(
|
|
106
|
-
vm, innerRef, renderPortalContent,
|
|
106
|
+
vm, innerRef, renderPortalContent, 'dialog'
|
|
107
107
|
)
|
|
108
108
|
|
|
109
109
|
const { hide } = useModelToggle({
|
|
@@ -266,8 +266,9 @@ export default createComponent({
|
|
|
266
266
|
if (node !== null) {
|
|
267
267
|
node.classList.remove('q-animate--scale')
|
|
268
268
|
node.classList.add('q-animate--scale')
|
|
269
|
-
clearTimeout(shakeTimeout)
|
|
269
|
+
shakeTimeout !== null && clearTimeout(shakeTimeout)
|
|
270
270
|
shakeTimeout = setTimeout(() => {
|
|
271
|
+
shakeTimeout = null
|
|
271
272
|
if (innerRef.value !== null) {
|
|
272
273
|
node.classList.remove('q-animate--scale')
|
|
273
274
|
// some platforms (like desktop Chrome)
|
|
@@ -291,7 +292,10 @@ export default createComponent({
|
|
|
291
292
|
}
|
|
292
293
|
|
|
293
294
|
function cleanup (hiding) {
|
|
294
|
-
|
|
295
|
+
if (shakeTimeout !== null) {
|
|
296
|
+
clearTimeout(shakeTimeout)
|
|
297
|
+
shakeTimeout = null
|
|
298
|
+
}
|
|
295
299
|
|
|
296
300
|
if (hiding === true || showing.value === true) {
|
|
297
301
|
updateMaximized(false)
|
|
@@ -83,7 +83,7 @@ export default createComponent({
|
|
|
83
83
|
return emptyRenderFn
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
let lastDesktopState, timerMini, layoutTotalWidthWatcher
|
|
86
|
+
let lastDesktopState, timerMini = null, layoutTotalWidthWatcher
|
|
87
87
|
|
|
88
88
|
const belowBreakpoint = ref(
|
|
89
89
|
props.behavior === 'mobile'
|
|
@@ -458,7 +458,7 @@ export default createComponent({
|
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
function animateMini () {
|
|
461
|
-
clearTimeout(timerMini)
|
|
461
|
+
timerMini !== null && clearTimeout(timerMini)
|
|
462
462
|
|
|
463
463
|
if (vm.proxy && vm.proxy.$el) {
|
|
464
464
|
// need to speed it up and apply it immediately,
|
|
@@ -468,6 +468,7 @@ export default createComponent({
|
|
|
468
468
|
|
|
469
469
|
flagMiniAnimate.value = true
|
|
470
470
|
timerMini = setTimeout(() => {
|
|
471
|
+
timerMini = null
|
|
471
472
|
flagMiniAnimate.value = false
|
|
472
473
|
if (vm && vm.proxy && vm.proxy.$el) {
|
|
473
474
|
vm.proxy.$el.classList.remove('q-drawer--mini-animate')
|
|
@@ -620,7 +621,11 @@ export default createComponent({
|
|
|
620
621
|
|
|
621
622
|
onBeforeUnmount(() => {
|
|
622
623
|
layoutTotalWidthWatcher !== void 0 && layoutTotalWidthWatcher()
|
|
623
|
-
|
|
624
|
+
|
|
625
|
+
if (timerMini !== null) {
|
|
626
|
+
clearTimeout(timerMini)
|
|
627
|
+
timerMini = null
|
|
628
|
+
}
|
|
624
629
|
|
|
625
630
|
showing.value === true && cleanup()
|
|
626
631
|
|
|
@@ -69,7 +69,7 @@ export default createComponent({
|
|
|
69
69
|
const naturalRatio = ref(props.initialRatio)
|
|
70
70
|
const ratioStyle = useRatio(props, naturalRatio)
|
|
71
71
|
|
|
72
|
-
let loadTimer
|
|
72
|
+
let loadTimer = null, isDestroyed = false
|
|
73
73
|
|
|
74
74
|
const images = [
|
|
75
75
|
ref(null),
|
|
@@ -120,7 +120,11 @@ export default createComponent({
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
function addImage (imgProps) {
|
|
123
|
-
|
|
123
|
+
if (loadTimer !== null) {
|
|
124
|
+
clearTimeout(loadTimer)
|
|
125
|
+
loadTimer = null
|
|
126
|
+
}
|
|
127
|
+
|
|
124
128
|
hasError.value = false
|
|
125
129
|
|
|
126
130
|
if (imgProps === null) {
|
|
@@ -135,10 +139,12 @@ export default createComponent({
|
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
function onLoad ({ target }) {
|
|
138
|
-
|
|
139
|
-
if (loadTimer === null) { return }
|
|
142
|
+
if (isDestroyed === true) { return }
|
|
140
143
|
|
|
141
|
-
|
|
144
|
+
if (loadTimer !== null) {
|
|
145
|
+
clearTimeout(loadTimer)
|
|
146
|
+
loadTimer = null
|
|
147
|
+
}
|
|
142
148
|
|
|
143
149
|
naturalRatio.value = target.naturalHeight === 0
|
|
144
150
|
? 0.5
|
|
@@ -149,21 +155,21 @@ export default createComponent({
|
|
|
149
155
|
|
|
150
156
|
function waitForCompleteness (target, count) {
|
|
151
157
|
// protect against running forever
|
|
152
|
-
if (
|
|
158
|
+
if (isDestroyed === true || count === 1000) { return }
|
|
153
159
|
|
|
154
160
|
if (target.complete === true) {
|
|
155
161
|
onReady(target)
|
|
156
162
|
}
|
|
157
163
|
else {
|
|
158
164
|
loadTimer = setTimeout(() => {
|
|
165
|
+
loadTimer = null
|
|
159
166
|
waitForCompleteness(target, count + 1)
|
|
160
167
|
}, 50)
|
|
161
168
|
}
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
function onReady (img) {
|
|
165
|
-
|
|
166
|
-
if (loadTimer === null) { return }
|
|
172
|
+
if (isDestroyed === true) { return }
|
|
167
173
|
|
|
168
174
|
position.value = position.value ^ 1
|
|
169
175
|
images[ position.value ].value = null
|
|
@@ -173,7 +179,11 @@ export default createComponent({
|
|
|
173
179
|
}
|
|
174
180
|
|
|
175
181
|
function onError (err) {
|
|
176
|
-
|
|
182
|
+
if (loadTimer !== null) {
|
|
183
|
+
clearTimeout(loadTimer)
|
|
184
|
+
loadTimer = null
|
|
185
|
+
}
|
|
186
|
+
|
|
177
187
|
isLoading.value = false
|
|
178
188
|
hasError.value = true
|
|
179
189
|
images[ position.value ].value = null
|
|
@@ -253,8 +263,12 @@ export default createComponent({
|
|
|
253
263
|
}
|
|
254
264
|
|
|
255
265
|
onBeforeUnmount(() => {
|
|
256
|
-
|
|
257
|
-
|
|
266
|
+
isDestroyed = true
|
|
267
|
+
|
|
268
|
+
if (loadTimer !== null) {
|
|
269
|
+
clearTimeout(loadTimer)
|
|
270
|
+
loadTimer = null
|
|
271
|
+
}
|
|
258
272
|
})
|
|
259
273
|
}
|
|
260
274
|
|
|
@@ -49,7 +49,7 @@ export default createComponent({
|
|
|
49
49
|
const { $q } = proxy
|
|
50
50
|
|
|
51
51
|
const temp = {}
|
|
52
|
-
let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer, emitValueFn
|
|
52
|
+
let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer = null, emitValueFn
|
|
53
53
|
|
|
54
54
|
const inputRef = ref(null)
|
|
55
55
|
const nameProp = useFormInputNameAttr(props)
|
|
@@ -261,6 +261,8 @@ export default createComponent({
|
|
|
261
261
|
|
|
262
262
|
function emitValue (val, stopWatcher) {
|
|
263
263
|
emitValueFn = () => {
|
|
264
|
+
emitTimer = null
|
|
265
|
+
|
|
264
266
|
if (
|
|
265
267
|
props.type !== 'number'
|
|
266
268
|
&& temp.hasOwnProperty('value') === true
|
|
@@ -288,7 +290,7 @@ export default createComponent({
|
|
|
288
290
|
}
|
|
289
291
|
|
|
290
292
|
if (props.debounce !== void 0) {
|
|
291
|
-
clearTimeout(emitTimer)
|
|
293
|
+
emitTimer !== null && clearTimeout(emitTimer)
|
|
292
294
|
temp.value = val
|
|
293
295
|
emitTimer = setTimeout(emitValueFn, props.debounce)
|
|
294
296
|
}
|
|
@@ -322,7 +324,11 @@ export default createComponent({
|
|
|
322
324
|
function onChange (e) {
|
|
323
325
|
onComposition(e)
|
|
324
326
|
|
|
325
|
-
|
|
327
|
+
if (emitTimer !== null) {
|
|
328
|
+
clearTimeout(emitTimer)
|
|
329
|
+
emitTimer = null
|
|
330
|
+
}
|
|
331
|
+
|
|
326
332
|
emitValueFn !== void 0 && emitValueFn()
|
|
327
333
|
|
|
328
334
|
emit('change', e.target.value)
|
|
@@ -331,7 +337,11 @@ export default createComponent({
|
|
|
331
337
|
function onFinishEditing (e) {
|
|
332
338
|
e !== void 0 && stop(e)
|
|
333
339
|
|
|
334
|
-
|
|
340
|
+
if (emitTimer !== null) {
|
|
341
|
+
clearTimeout(emitTimer)
|
|
342
|
+
emitTimer = null
|
|
343
|
+
}
|
|
344
|
+
|
|
335
345
|
emitValueFn !== void 0 && emitValueFn()
|
|
336
346
|
|
|
337
347
|
typedNumber = false
|
|
@@ -122,7 +122,7 @@ export default createComponent({
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
let
|
|
125
|
+
let animateTimer = null
|
|
126
126
|
|
|
127
127
|
const $layout = {
|
|
128
128
|
instances: {},
|
|
@@ -153,16 +153,16 @@ export default createComponent({
|
|
|
153
153
|
scroll,
|
|
154
154
|
|
|
155
155
|
animate () {
|
|
156
|
-
if (
|
|
157
|
-
clearTimeout(
|
|
156
|
+
if (animateTimer !== null) {
|
|
157
|
+
clearTimeout(animateTimer)
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
160
|
document.body.classList.add('q-body--layout-animate')
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
animateTimer = setTimeout(() => {
|
|
164
|
+
animateTimer = null
|
|
164
165
|
document.body.classList.remove('q-body--layout-animate')
|
|
165
|
-
timer = void 0
|
|
166
166
|
}, 155)
|
|
167
167
|
},
|
|
168
168
|
|
|
@@ -111,7 +111,7 @@ export default createComponent({
|
|
|
111
111
|
processOnMount: true
|
|
112
112
|
})
|
|
113
113
|
|
|
114
|
-
const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent)
|
|
114
|
+
const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, 'menu')
|
|
115
115
|
|
|
116
116
|
const clickOutsideProps = {
|
|
117
117
|
anchorEl,
|
|
@@ -137,6 +137,8 @@ export default createComponent({
|
|
|
137
137
|
})
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
let $el, localScrollTarget, timer = null
|
|
141
|
+
|
|
140
142
|
function animateTo ({ pos, ratio }, done) {
|
|
141
143
|
animating.value = true
|
|
142
144
|
pullPosition.value = pos
|
|
@@ -145,15 +147,14 @@ export default createComponent({
|
|
|
145
147
|
pullRatio.value = ratio
|
|
146
148
|
}
|
|
147
149
|
|
|
148
|
-
clearTimeout(timer)
|
|
150
|
+
timer !== null && clearTimeout(timer)
|
|
149
151
|
timer = setTimeout(() => {
|
|
152
|
+
timer = null
|
|
150
153
|
animating.value = false
|
|
151
154
|
done && done()
|
|
152
155
|
}, 300)
|
|
153
156
|
}
|
|
154
157
|
|
|
155
|
-
let $el, localScrollTarget, timer
|
|
156
|
-
|
|
157
158
|
function updateScrollTarget () {
|
|
158
159
|
localScrollTarget = getScrollTarget($el, props.scrollTarget)
|
|
159
160
|
}
|
|
@@ -166,7 +167,7 @@ export default createComponent({
|
|
|
166
167
|
})
|
|
167
168
|
|
|
168
169
|
onBeforeUnmount(() => {
|
|
169
|
-
clearTimeout(timer)
|
|
170
|
+
timer !== null && clearTimeout(timer)
|
|
170
171
|
})
|
|
171
172
|
|
|
172
173
|
// expose public methods
|
|
@@ -100,6 +100,8 @@ export default createComponent({
|
|
|
100
100
|
const prop = { type: 'radio' }
|
|
101
101
|
|
|
102
102
|
props.name !== void 0 && Object.assign(prop, {
|
|
103
|
+
// see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
|
|
104
|
+
'.checked': isTrue.value === true,
|
|
103
105
|
'^checked': isTrue.value === true ? 'checked' : void 0,
|
|
104
106
|
name: props.name,
|
|
105
107
|
value: props.val
|
|
@@ -40,8 +40,10 @@ export default createComponent({
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function emitEvent () {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
if (timer !== null) {
|
|
44
|
+
clearTimeout(timer)
|
|
45
|
+
timer = null
|
|
46
|
+
}
|
|
45
47
|
|
|
46
48
|
if (targetEl) {
|
|
47
49
|
const { offsetWidth: width, offsetHeight: height } = targetEl
|
|
@@ -75,7 +77,7 @@ export default createComponent({
|
|
|
75
77
|
onMounted(() => { init() })
|
|
76
78
|
|
|
77
79
|
onBeforeUnmount(() => {
|
|
78
|
-
clearTimeout(timer)
|
|
80
|
+
timer !== null && clearTimeout(timer)
|
|
79
81
|
|
|
80
82
|
if (observer !== void 0) {
|
|
81
83
|
if (observer.disconnect !== void 0) {
|
|
@@ -95,7 +97,10 @@ export default createComponent({
|
|
|
95
97
|
let curDocView
|
|
96
98
|
|
|
97
99
|
function cleanup () {
|
|
98
|
-
|
|
100
|
+
if (timer !== null) {
|
|
101
|
+
clearTimeout(timer)
|
|
102
|
+
timer = null
|
|
103
|
+
}
|
|
99
104
|
|
|
100
105
|
if (curDocView !== void 0) {
|
|
101
106
|
// iOS is fuzzy, need to check it first
|
|
@@ -88,7 +88,7 @@ export default createComponent({
|
|
|
88
88
|
|
|
89
89
|
const isDark = useDark(props, proxy.$q)
|
|
90
90
|
|
|
91
|
-
let timer, panRefPos
|
|
91
|
+
let timer = null, panRefPos
|
|
92
92
|
|
|
93
93
|
const targetRef = ref(null)
|
|
94
94
|
|
|
@@ -337,14 +337,14 @@ export default createComponent({
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
function startTimer () {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
340
|
+
tempShowing.value = true
|
|
341
|
+
|
|
342
|
+
timer !== null && clearTimeout(timer)
|
|
343
|
+
timer = setTimeout(() => {
|
|
344
|
+
timer = null
|
|
345
|
+
tempShowing.value = false
|
|
346
|
+
}, props.delay)
|
|
346
347
|
|
|
347
|
-
timer = setTimeout(() => { tempShowing.value = false }, props.delay)
|
|
348
348
|
props.onScroll !== void 0 && emitScroll()
|
|
349
349
|
}
|
|
350
350
|
|
|
@@ -143,8 +143,8 @@ export default createComponent({
|
|
|
143
143
|
const dialogFieldFocused = ref(false)
|
|
144
144
|
const innerLoadingIndicator = ref(false)
|
|
145
145
|
|
|
146
|
-
let inputTimer, innerValueCache,
|
|
147
|
-
hasDialog, userInputValue, filterId, defaultInputValue,
|
|
146
|
+
let inputTimer = null, innerValueCache,
|
|
147
|
+
hasDialog, userInputValue, filterId = null, defaultInputValue,
|
|
148
148
|
transitionShowComputed, searchBuffer, searchBufferExp
|
|
149
149
|
|
|
150
150
|
const inputRef = ref(null)
|
|
@@ -650,7 +650,12 @@ export default createComponent({
|
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
e.target.value = ''
|
|
653
|
-
|
|
653
|
+
|
|
654
|
+
if (inputTimer !== null) {
|
|
655
|
+
clearTimeout(inputTimer)
|
|
656
|
+
inputTimer = null
|
|
657
|
+
}
|
|
658
|
+
|
|
654
659
|
resetInputValue()
|
|
655
660
|
|
|
656
661
|
if (typeof value === 'string' && value.length > 0) {
|
|
@@ -1015,7 +1020,10 @@ export default createComponent({
|
|
|
1015
1020
|
}
|
|
1016
1021
|
|
|
1017
1022
|
function onInput (e) {
|
|
1018
|
-
|
|
1023
|
+
if (inputTimer !== null) {
|
|
1024
|
+
clearTimeout(inputTimer)
|
|
1025
|
+
inputTimer = null
|
|
1026
|
+
}
|
|
1019
1027
|
|
|
1020
1028
|
if (e && e.target && e.target.qComposing === true) {
|
|
1021
1029
|
return
|
|
@@ -1036,6 +1044,7 @@ export default createComponent({
|
|
|
1036
1044
|
|
|
1037
1045
|
if (props.onFilter !== void 0) {
|
|
1038
1046
|
inputTimer = setTimeout(() => {
|
|
1047
|
+
inputTimer = null
|
|
1039
1048
|
filter(inputValue.value)
|
|
1040
1049
|
}, props.inputDebounce)
|
|
1041
1050
|
}
|
|
@@ -1089,7 +1098,7 @@ export default createComponent({
|
|
|
1089
1098
|
menu.value === true && (menu.value = false)
|
|
1090
1099
|
}, 10)
|
|
1091
1100
|
|
|
1092
|
-
clearTimeout(filterId)
|
|
1101
|
+
filterId !== null && clearTimeout(filterId)
|
|
1093
1102
|
filterId = localFilterId
|
|
1094
1103
|
|
|
1095
1104
|
emit(
|
|
@@ -1281,8 +1290,10 @@ export default createComponent({
|
|
|
1281
1290
|
}
|
|
1282
1291
|
|
|
1283
1292
|
if (state.focused.value === false) {
|
|
1284
|
-
|
|
1285
|
-
|
|
1293
|
+
if (filterId !== null) {
|
|
1294
|
+
clearTimeout(filterId)
|
|
1295
|
+
filterId = null
|
|
1296
|
+
}
|
|
1286
1297
|
|
|
1287
1298
|
if (state.innerLoading.value === true) {
|
|
1288
1299
|
emit('filterAbort')
|
|
@@ -1403,7 +1414,7 @@ export default createComponent({
|
|
|
1403
1414
|
updatePreState()
|
|
1404
1415
|
|
|
1405
1416
|
onBeforeUnmount(() => {
|
|
1406
|
-
clearTimeout(inputTimer)
|
|
1417
|
+
inputTimer !== null && clearTimeout(inputTimer)
|
|
1407
1418
|
})
|
|
1408
1419
|
|
|
1409
1420
|
// expose public methods
|