quasar 1.17.3 → 1.17.7
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/LoadingBar.json +7 -0
- package/dist/api/QAjaxBar.json +13 -1
- package/dist/api/QTree.json +6 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/my.umd.min.js +6 -0
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/lang/zh-hant.umd.min.js +1 -1
- 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 +11 -3
- 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 +14 -4
- package/dist/quasar.rtl.min.css +1 -1
- package/dist/quasar.sass +9 -3
- package/dist/quasar.styl +9 -3
- package/dist/quasar.umd.js +173 -97
- package/dist/quasar.umd.min.js +2 -2
- package/dist/quasar.umd.modern.js +170 -91
- package/dist/quasar.umd.modern.min.js +2 -2
- package/dist/types/index.d.ts +15 -3
- package/dist/vetur/quasar-attributes.json +4 -0
- package/dist/vetur/quasar-tags.json +1 -0
- package/dist/web-types/web-types.json +11 -1
- package/lang/index.json +4 -0
- package/lang/my.js +96 -0
- package/package.json +1 -1
- package/src/components/ajax-bar/QAjaxBar.js +22 -11
- package/src/components/ajax-bar/QAjaxBar.json +16 -1
- package/src/components/date/QDate.js +6 -1
- package/src/components/dialog/QDialog.js +1 -1
- package/src/components/dialog-plugin/DialogPlugin.js +2 -2
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/field/QField.js +13 -3
- package/src/components/form/QForm.js +10 -1
- package/src/components/icon/QIcon.js +3 -3
- package/src/components/icon/QIcon.sass +2 -2
- package/src/components/icon/QIcon.styl +2 -2
- package/src/components/infinite-scroll/QInfiniteScroll.js +1 -1
- package/src/components/inner-loading/QInnerLoading.js +4 -2
- package/src/components/input/QInput.js +1 -1
- package/src/components/menu/QMenu.js +1 -1
- package/src/components/scroll-area/QScrollArea.js +20 -7
- package/src/components/select/QSelect.js +31 -26
- package/src/components/select/QSelect.sass +4 -0
- package/src/components/select/QSelect.styl +4 -0
- package/src/components/stepper/QStep.js +15 -12
- package/src/components/stepper/QStepper.sass +2 -0
- package/src/components/stepper/QStepper.styl +2 -0
- package/src/components/tabs/QTabs.js +9 -4
- package/src/components/tree/QTree.js +8 -1
- package/src/components/tree/QTree.json +7 -0
- package/src/mixins/attrs.js +2 -0
- package/src/mixins/virtual-scroll.js +11 -5
- package/src/plugins/LoadingBar.js +6 -5
- package/src/plugins/LoadingBar.json +8 -0
- package/src/plugins/Notify.js +1 -1
|
@@ -598,8 +598,12 @@ export default Vue.extend({
|
|
|
598
598
|
return this.innerOptionsValue.find(v => isDeepEqual(v, val)) !== void 0
|
|
599
599
|
},
|
|
600
600
|
|
|
601
|
-
__selectInputText () {
|
|
602
|
-
if (
|
|
601
|
+
__selectInputText (e) {
|
|
602
|
+
if (
|
|
603
|
+
this.useInput === true &&
|
|
604
|
+
this.$refs.target !== void 0 &&
|
|
605
|
+
(e === void 0 || (this.$refs.target === e.target && e.target.value === this.selectedString))
|
|
606
|
+
) {
|
|
603
607
|
this.$refs.target.select()
|
|
604
608
|
}
|
|
605
609
|
},
|
|
@@ -632,34 +636,34 @@ export default Vue.extend({
|
|
|
632
636
|
|
|
633
637
|
if (typeof value === 'string' && value.length > 0) {
|
|
634
638
|
const needle = value.toLocaleLowerCase()
|
|
639
|
+
const findFn = extractFn => {
|
|
640
|
+
const option = this.options.find(opt => extractFn(opt).toLocaleLowerCase() === needle)
|
|
635
641
|
|
|
636
|
-
|
|
637
|
-
|
|
642
|
+
if (option === void 0) {
|
|
643
|
+
return false
|
|
644
|
+
}
|
|
638
645
|
|
|
639
|
-
if (option !== void 0) {
|
|
640
646
|
if (this.innerValue.indexOf(option) === -1) {
|
|
641
647
|
this.toggleOption(option)
|
|
642
648
|
}
|
|
643
649
|
else {
|
|
644
650
|
this.hidePopup()
|
|
645
651
|
}
|
|
646
|
-
}
|
|
647
|
-
else {
|
|
648
|
-
fn = opt => this.getOptionLabel(opt).toLocaleLowerCase() === needle
|
|
649
|
-
option = this.options.find(fn)
|
|
650
652
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
this.hidePopup()
|
|
657
|
-
}
|
|
653
|
+
return true
|
|
654
|
+
}
|
|
655
|
+
const fillFn = afterFilter => {
|
|
656
|
+
if (findFn(this.getOptionValue) === true) {
|
|
657
|
+
return
|
|
658
658
|
}
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
if (findFn(this.getOptionLabel) === true || afterFilter === true) {
|
|
660
|
+
return
|
|
661
661
|
}
|
|
662
|
+
|
|
663
|
+
this.filter(value, true, () => fillFn(true))
|
|
662
664
|
}
|
|
665
|
+
|
|
666
|
+
fillFn()
|
|
663
667
|
}
|
|
664
668
|
else {
|
|
665
669
|
this.__clearValue(e)
|
|
@@ -942,14 +946,14 @@ export default Vue.extend({
|
|
|
942
946
|
child.push(this.__getInput(h, fromDialog, isTarget))
|
|
943
947
|
}
|
|
944
948
|
// there can be only one (when dialog is opened the control in dialog should be target)
|
|
945
|
-
else if (this.editable === true
|
|
949
|
+
else if (this.editable === true) {
|
|
946
950
|
child.push(
|
|
947
951
|
h('div', {
|
|
948
|
-
ref: 'target',
|
|
952
|
+
ref: isTarget === true ? 'target' : void 0,
|
|
949
953
|
key: 'd_t',
|
|
950
|
-
staticClass: '
|
|
954
|
+
staticClass: 'q-select__focus-target',
|
|
951
955
|
attrs: {
|
|
952
|
-
id: this.targetUid,
|
|
956
|
+
id: isTarget === true ? this.targetUid : void 0,
|
|
953
957
|
tabindex: this.tabindex,
|
|
954
958
|
...this.comboboxAttrs
|
|
955
959
|
},
|
|
@@ -961,10 +965,10 @@ export default Vue.extend({
|
|
|
961
965
|
})
|
|
962
966
|
)
|
|
963
967
|
|
|
964
|
-
if (typeof this.autocomplete === 'string' && this.autocomplete.length > 0) {
|
|
968
|
+
if (isTarget === true && typeof this.autocomplete === 'string' && this.autocomplete.length > 0) {
|
|
965
969
|
child.push(
|
|
966
970
|
h('input', {
|
|
967
|
-
staticClass: 'q-select__autocomplete-input
|
|
971
|
+
staticClass: 'q-select__autocomplete-input',
|
|
968
972
|
attrs: { autocomplete: this.autocomplete },
|
|
969
973
|
on: cache(this, 'autoinp', {
|
|
970
974
|
keyup: this.__onTargetAutocomplete
|
|
@@ -1063,7 +1067,7 @@ export default Vue.extend({
|
|
|
1063
1067
|
// required for Android in order to show ENTER key when in form
|
|
1064
1068
|
type: 'search',
|
|
1065
1069
|
...this.qAttrs,
|
|
1066
|
-
id: this.targetUid,
|
|
1070
|
+
id: isTarget === true ? this.targetUid : void 0,
|
|
1067
1071
|
maxlength: this.maxlength, // this is converted to prop by QField
|
|
1068
1072
|
tabindex: this.tabindex,
|
|
1069
1073
|
autocomplete: this.autocomplete,
|
|
@@ -1134,7 +1138,7 @@ export default Vue.extend({
|
|
|
1134
1138
|
}
|
|
1135
1139
|
},
|
|
1136
1140
|
|
|
1137
|
-
filter (val, keepClosed) {
|
|
1141
|
+
filter (val, keepClosed, afterUpdateFn) {
|
|
1138
1142
|
if (this.qListeners.filter === void 0 || (keepClosed !== true && this.focused !== true)) {
|
|
1139
1143
|
return
|
|
1140
1144
|
}
|
|
@@ -1191,6 +1195,7 @@ export default Vue.extend({
|
|
|
1191
1195
|
}
|
|
1192
1196
|
|
|
1193
1197
|
typeof afterFn === 'function' && this.$nextTick(() => { afterFn(this) })
|
|
1198
|
+
typeof afterUpdateFn === 'function' && this.$nextTick(() => { afterUpdateFn(this) })
|
|
1194
1199
|
})
|
|
1195
1200
|
}
|
|
1196
1201
|
},
|
|
@@ -62,21 +62,24 @@ export default Vue.extend({
|
|
|
62
62
|
computed: {
|
|
63
63
|
isActive () {
|
|
64
64
|
return this.stepper.value === this.name
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
onEvents () {
|
|
68
|
+
return this.isActive !== true ||
|
|
69
|
+
this.stepper.vertical !== true ||
|
|
70
|
+
(this.$q.platform.is.ios !== true && this.$q.platform.is.safari !== true && this.$q.platform.is.ie !== true)
|
|
71
|
+
? { ...this.qListeners }
|
|
72
|
+
: { ...this.qListeners, scroll: this.__keepScroll }
|
|
65
73
|
}
|
|
66
74
|
},
|
|
67
75
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
) {
|
|
74
|
-
this.$nextTick(() => {
|
|
75
|
-
if (this.$el !== void 0) {
|
|
76
|
-
this.$el.scrollTop = 0
|
|
77
|
-
}
|
|
78
|
-
})
|
|
76
|
+
methods: {
|
|
77
|
+
__keepScroll (ev) {
|
|
78
|
+
const { target } = ev
|
|
79
|
+
if (target.scrollTop > 0) {
|
|
80
|
+
target.scrollTop = 0
|
|
79
81
|
}
|
|
82
|
+
this.qListeners.scroll !== void 0 && this.qListeners.scroll(ev)
|
|
80
83
|
}
|
|
81
84
|
},
|
|
82
85
|
|
|
@@ -99,7 +102,7 @@ export default Vue.extend({
|
|
|
99
102
|
'div',
|
|
100
103
|
{
|
|
101
104
|
staticClass: 'q-stepper__step',
|
|
102
|
-
on:
|
|
105
|
+
on: this.onEvents
|
|
103
106
|
},
|
|
104
107
|
vertical === true
|
|
105
108
|
? [
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
line-height: 14px
|
|
14
14
|
|
|
15
15
|
&__dot
|
|
16
|
+
contain: layout
|
|
16
17
|
margin-right: 8px
|
|
17
18
|
font-size: 14px
|
|
18
19
|
width: 24px
|
|
@@ -136,6 +137,7 @@
|
|
|
136
137
|
.q-stepper__tab
|
|
137
138
|
overflow: hidden
|
|
138
139
|
.q-stepper__line
|
|
140
|
+
contain: layout
|
|
139
141
|
&:before, &:after
|
|
140
142
|
position: absolute
|
|
141
143
|
top: 50%
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
line-height: 14px
|
|
14
14
|
|
|
15
15
|
&__dot
|
|
16
|
+
contain: layout
|
|
16
17
|
margin-right: 8px
|
|
17
18
|
font-size: 14px
|
|
18
19
|
width: 24px
|
|
@@ -136,6 +137,7 @@
|
|
|
136
137
|
.q-stepper__tab
|
|
137
138
|
overflow: hidden
|
|
138
139
|
.q-stepper__line
|
|
140
|
+
contain: layout
|
|
139
141
|
&:before, &:after
|
|
140
142
|
position: absolute
|
|
141
143
|
top: 50%
|
|
@@ -590,10 +590,6 @@ export default Vue.extend({
|
|
|
590
590
|
}
|
|
591
591
|
},
|
|
592
592
|
|
|
593
|
-
activated () {
|
|
594
|
-
this.__recalculateScroll()
|
|
595
|
-
},
|
|
596
|
-
|
|
597
593
|
created () {
|
|
598
594
|
this.buffer = []
|
|
599
595
|
|
|
@@ -606,6 +602,15 @@ export default Vue.extend({
|
|
|
606
602
|
this.rtlHasScrollBug = rtlHasScrollBug()
|
|
607
603
|
},
|
|
608
604
|
|
|
605
|
+
activated () {
|
|
606
|
+
if (this.shouldActivate !== true) { return }
|
|
607
|
+
this.__recalculateScroll()
|
|
608
|
+
},
|
|
609
|
+
|
|
610
|
+
deactivated () {
|
|
611
|
+
this.shouldActivate = true
|
|
612
|
+
},
|
|
613
|
+
|
|
609
614
|
beforeDestroy () {
|
|
610
615
|
clearTimeout(this.bufferTimer)
|
|
611
616
|
clearTimeout(this.animateTimer)
|
|
@@ -53,6 +53,8 @@ export default Vue.extend({
|
|
|
53
53
|
expanded: Array, // sync
|
|
54
54
|
selected: {}, // sync
|
|
55
55
|
|
|
56
|
+
noSelectionUnset: Boolean,
|
|
57
|
+
|
|
56
58
|
defaultExpandAll: Boolean,
|
|
57
59
|
accordion: Boolean,
|
|
58
60
|
|
|
@@ -604,7 +606,12 @@ export default Vue.extend({
|
|
|
604
606
|
|
|
605
607
|
if (this.hasSelection) {
|
|
606
608
|
if (meta.selectable) {
|
|
607
|
-
|
|
609
|
+
if (this.noSelectionUnset === false) {
|
|
610
|
+
this.$emit('update:selected', meta.key !== this.selected ? meta.key : null)
|
|
611
|
+
}
|
|
612
|
+
else if (meta.key !== this.selected) {
|
|
613
|
+
this.$emit('update:selected', meta.key || null)
|
|
614
|
+
}
|
|
608
615
|
}
|
|
609
616
|
}
|
|
610
617
|
else {
|
|
@@ -108,6 +108,13 @@
|
|
|
108
108
|
"category": "state"
|
|
109
109
|
},
|
|
110
110
|
|
|
111
|
+
"no-selection-unset": {
|
|
112
|
+
"type": "Boolean",
|
|
113
|
+
"desc": "Do not allow un-selection when clicking currently selected node",
|
|
114
|
+
"category": "behavior",
|
|
115
|
+
"addedIn": "v1.17.5"
|
|
116
|
+
},
|
|
117
|
+
|
|
111
118
|
"default-expand-all": {
|
|
112
119
|
"type": "Boolean",
|
|
113
120
|
"desc": "Allow the tree to have all its branches expanded, when first rendered",
|
package/src/mixins/attrs.js
CHANGED
|
@@ -556,6 +556,9 @@ export default {
|
|
|
556
556
|
this.prevToIndex = -1
|
|
557
557
|
this.prevScrollStart = void 0
|
|
558
558
|
|
|
559
|
+
this.virtualScrollPaddingBefore = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, 0, this.virtualScrollSliceRange.from)
|
|
560
|
+
this.virtualScrollPaddingAfter = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, this.virtualScrollSliceRange.to, this.virtualScrollLength)
|
|
561
|
+
|
|
559
562
|
if (toIndex >= 0) {
|
|
560
563
|
this.__updateVirtualScrollSizes(this.virtualScrollSliceRange.from)
|
|
561
564
|
|
|
@@ -564,9 +567,6 @@ export default {
|
|
|
564
567
|
})
|
|
565
568
|
}
|
|
566
569
|
else {
|
|
567
|
-
this.virtualScrollPaddingBefore = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, 0, this.virtualScrollSliceRange.from)
|
|
568
|
-
this.virtualScrollPaddingAfter = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, this.virtualScrollSliceRange.to, this.virtualScrollLength)
|
|
569
|
-
|
|
570
570
|
this.__onVirtualScrollEvt()
|
|
571
571
|
}
|
|
572
572
|
},
|
|
@@ -596,9 +596,9 @@ export default {
|
|
|
596
596
|
? 1
|
|
597
597
|
: Math.ceil(scrollViewSize / this.virtualScrollItemSizeComputed)
|
|
598
598
|
const baseSize = Math.max(
|
|
599
|
-
|
|
599
|
+
1,
|
|
600
600
|
view,
|
|
601
|
-
Math.ceil(this.virtualScrollSliceSize / multiplier)
|
|
601
|
+
Math.ceil((this.virtualScrollSliceSize > 0 ? this.virtualScrollSliceSize : 10) / multiplier)
|
|
602
602
|
)
|
|
603
603
|
|
|
604
604
|
this.virtualScrollSliceSizeComputed = {
|
|
@@ -690,6 +690,8 @@ export default {
|
|
|
690
690
|
},
|
|
691
691
|
|
|
692
692
|
activated () {
|
|
693
|
+
if (this.shouldActivate !== true) { return }
|
|
694
|
+
|
|
693
695
|
const scrollEl = this.__getVirtualScrollTarget()
|
|
694
696
|
|
|
695
697
|
if (this.prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {
|
|
@@ -705,6 +707,10 @@ export default {
|
|
|
705
707
|
}
|
|
706
708
|
},
|
|
707
709
|
|
|
710
|
+
deactivated () {
|
|
711
|
+
this.shouldActivate = true
|
|
712
|
+
},
|
|
713
|
+
|
|
708
714
|
beforeMount () {
|
|
709
715
|
this.__onVirtualScrollEvt = debounce(this.__onVirtualScrollEvt, this.$q.platform.is.ios === true ? 120 : 35)
|
|
710
716
|
this.__setVirtualScrollSize()
|
|
@@ -12,8 +12,9 @@ export default {
|
|
|
12
12
|
setDefaults: noop,
|
|
13
13
|
|
|
14
14
|
install ({ $q, cfg }) {
|
|
15
|
+
$q.loadingBar = this
|
|
16
|
+
|
|
15
17
|
if (isSSR === true) {
|
|
16
|
-
$q.loadingBar = this
|
|
17
18
|
return
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -21,7 +22,7 @@ export default {
|
|
|
21
22
|
? { ...cfg.loadingBar }
|
|
22
23
|
: {}
|
|
23
24
|
|
|
24
|
-
const bar =
|
|
25
|
+
const bar = new Vue({
|
|
25
26
|
name: 'LoadingBar',
|
|
26
27
|
|
|
27
28
|
// hide App from Vue devtools
|
|
@@ -41,11 +42,11 @@ export default {
|
|
|
41
42
|
Object.assign(this, {
|
|
42
43
|
start: speed => {
|
|
43
44
|
bar.start(speed)
|
|
44
|
-
this.isActive = bar.isActive =
|
|
45
|
+
this.isActive = bar.isActive = true
|
|
45
46
|
},
|
|
46
47
|
stop: () => {
|
|
47
|
-
bar.stop()
|
|
48
|
-
this.isActive = bar.isActive =
|
|
48
|
+
const sessions = bar.stop()
|
|
49
|
+
this.isActive = bar.isActive = sessions > 0
|
|
49
50
|
},
|
|
50
51
|
increment: bar.increment,
|
|
51
52
|
setDefaults: opts => {
|
package/src/plugins/Notify.js
CHANGED
|
@@ -150,7 +150,7 @@ function addNotification (config, vm, originalApi) {
|
|
|
150
150
|
closeBtn && actions.push({
|
|
151
151
|
label: typeof closeBtn === 'string'
|
|
152
152
|
? closeBtn
|
|
153
|
-
:
|
|
153
|
+
: vm.$q.lang.label.close
|
|
154
154
|
})
|
|
155
155
|
|
|
156
156
|
notif.actions = actions.map(({ handler, noDismiss, style, class: klass, attrs, ...props }) => ({
|