@mythpe/quasar-ui-qui 0.0.19-dev → 0.0.19

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.
Files changed (82) hide show
  1. package/package.json +15 -6
  2. package/src/app-flag.d.ts +1 -0
  3. package/src/components/datatable/MDatatable.vue +2305 -0
  4. package/src/components/datatable/MDtAvatar.vue +49 -0
  5. package/src/components/datatable/MDtBtn.vue +153 -0
  6. package/src/components/datatable/MDtContextmenuItems.vue +55 -0
  7. package/src/components/datatable/index.ts +6 -0
  8. package/src/components/form/MAvatarViewer.vue +327 -0
  9. package/src/components/form/MAxios.vue +144 -0
  10. package/src/components/form/MBtn.vue +258 -91
  11. package/src/components/form/MCheckbox.vue +150 -0
  12. package/src/components/form/MCkeditor.vue +403 -0
  13. package/src/components/form/MColor.vue +122 -0
  14. package/src/components/form/MDate.vue +50 -0
  15. package/src/components/form/MEditor.vue +285 -0
  16. package/src/components/form/MEmail.vue +43 -0
  17. package/src/components/form/MField.vue +149 -0
  18. package/src/components/form/MFile.vue +216 -0
  19. package/src/components/form/MForm.vue +89 -0
  20. package/src/components/form/MHidden.vue +86 -0
  21. package/src/components/form/MHiddenInput.vue +58 -0
  22. package/src/components/form/MInput.vue +66 -66
  23. package/src/components/form/MInputFieldControl.vue +4 -1
  24. package/src/components/form/MInputLabel.vue +10 -3
  25. package/src/components/form/MMobile.vue +43 -0
  26. package/src/components/form/MOptions.vue +255 -0
  27. package/src/components/form/MOtp.vue +292 -0
  28. package/src/components/form/MPassword.vue +73 -0
  29. package/src/components/form/MPicker.vue +314 -0
  30. package/src/components/form/MRadio.vue +181 -0
  31. package/src/components/form/MSelect.vue +352 -0
  32. package/src/components/form/MTime.vue +48 -0
  33. package/src/components/form/MToggle.vue +211 -0
  34. package/src/components/form/MUploader.vue +511 -0
  35. package/src/components/form/index.ts +52 -1
  36. package/src/components/grid/MBlock.vue +30 -17
  37. package/src/components/grid/MCol.vue +2 -14
  38. package/src/components/grid/MColumn.vue +4 -1
  39. package/src/components/grid/MContainer.vue +21 -12
  40. package/src/components/grid/MHelpRow.vue +11 -9
  41. package/src/components/grid/MRow.vue +22 -9
  42. package/src/components/index.ts +4 -0
  43. package/src/components/modal/MDialog.vue +58 -0
  44. package/src/components/modal/MModalMenu.vue +62 -0
  45. package/src/components/modal/MTooltip.vue +39 -0
  46. package/src/components/modal/index.ts +5 -0
  47. package/src/components/parials/UploaderItem.vue +299 -0
  48. package/src/components/parials/index.ts +3 -0
  49. package/src/components/transition/MFadeTransition.vue +27 -0
  50. package/src/components/transition/MFadeXTransition.vue +26 -0
  51. package/src/components/transition/MTransition.vue +44 -0
  52. package/src/components/transition/index.ts +13 -0
  53. package/src/components/typography/index.ts +1 -0
  54. package/src/composable/index.ts +3 -1
  55. package/src/composable/{useHelpersMyth.ts → useBindInput.ts} +93 -62
  56. package/src/composable/useError.ts +12 -0
  57. package/src/composable/useMyth.ts +298 -3
  58. package/src/composable/useValue.ts +13 -0
  59. package/src/index.sass +8 -33
  60. package/src/index.ts +19 -0
  61. package/src/style/m-container.sass +13 -0
  62. package/src/style/main.sass +146 -0
  63. package/src/style/print.sass +14 -0
  64. package/src/style/transition.sass +40 -0
  65. package/src/types/api-helpers.d.ts +62 -0
  66. package/src/types/components.d.ts +976 -51
  67. package/src/types/index.d.ts +11 -62
  68. package/src/types/install-options.d.ts +19 -0
  69. package/src/types/lodash.d.ts +26 -0
  70. package/src/types/m-datatable.d.ts +316 -0
  71. package/src/types/m-geolocation.d.ts +16 -0
  72. package/src/types/m-helpers.d.ts +97 -0
  73. package/src/types/plugin-props-option.d.ts +305 -0
  74. package/src/types/quasar-helpers.d.ts +7 -0
  75. package/src/types/theme.d.ts +12 -0
  76. package/src/utils/Helpers.ts +293 -0
  77. package/src/utils/Str.ts +211 -0
  78. package/src/utils/index.ts +3 -0
  79. package/src/utils/myth.ts +96 -24
  80. package/src/utils/vee-rules.ts +32 -0
  81. package/src/utils/vue-plugin.ts +134 -3
  82. package/tsconfig.json +8 -11
@@ -0,0 +1,144 @@
1
+ <!--
2
+ - MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
3
+ - Email: mythpe@gmail.com
4
+ - Mobile: +966590470092
5
+ - Website: https://www.4myth.com
6
+ - Github: https://github.com/mythpe
7
+ -->
8
+
9
+ <script
10
+ lang="ts"
11
+ setup
12
+ >
13
+
14
+ import type { MAxiosProps as Props, MSelectModelEmit } from '../../types'
15
+ import type { QSelectSlots } from 'quasar'
16
+ import { computed, onMounted, toValue, useTemplateRef, watch } from 'vue'
17
+ import { useSetFieldValue } from 'vee-validate'
18
+ import MSelect from './MSelect.vue'
19
+ import { useMyth } from '../../composable'
20
+
21
+ type P = {
22
+ name: Props['name'];
23
+ label?: Props['label'];
24
+ placeholder?: Props['placeholder'];
25
+ viewMode?: Props['viewMode'];
26
+ viewModeValue?: Props['viewModeValue'];
27
+ service?: Props['service'];
28
+ guest?: Props['guest'];
29
+ requestWith?: Props['requestWith'];
30
+ params?: Props['params'];
31
+ lazy?: Props['lazy'];
32
+ useChoice?: Props['useChoice'];
33
+ }
34
+
35
+ const props = withDefaults(defineProps<P>(), {
36
+ name: () => '',
37
+ label: undefined,
38
+ placeholder: undefined,
39
+ viewMode: () => !1,
40
+ viewModeValue: undefined,
41
+ service: undefined,
42
+ guest: undefined,
43
+ requestWith: undefined,
44
+ params: () => () => ({}),
45
+ lazy: () => !1,
46
+ useChoice: undefined
47
+ })
48
+ const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
49
+ type Emits = {
50
+ (e: 'model', value: MSelectModelEmit): void;
51
+ }
52
+ const emit = defineEmits<Emits>()
53
+ const search = defineModel<string>('search', { required: !1, default: '' })
54
+ const setFieldValue = useSetFieldValue(() => props.name)
55
+ const { alertError, api } = useMyth()
56
+ const loading = defineModel<Props['loading']>('loading', { required: !1, default: !1 })
57
+ const items = defineModel<Props['items']>('items', { required: !1, default: [] })
58
+ const isGuest = computed(() => {
59
+ const v = toValue(props.guest)
60
+ return v !== undefined && v !== null && v !== !1
61
+ })
62
+ const prepare = async (fromWatch = !1) => {
63
+ if (!props.service || loading.value) {
64
+ return
65
+ }
66
+ const method = typeof props.service === 'string'
67
+ ? (isGuest.value ? api.value[props.service]?.staticIndex : api.value[props.service]?.index)
68
+ : props.service
69
+ if (!method) {
70
+ throw Error(`No service: ${props.service}`)
71
+ }
72
+ const params: any = {
73
+ requestWith: undefined,
74
+ search: search.value,
75
+ itemsPerPage: -1,
76
+ page: 1,
77
+ staticRequest: 1,
78
+ ...(toValue(props.params) || {})
79
+ }
80
+ if (props.requestWith) {
81
+ params.requestWith = toValue(props.requestWith)
82
+ }
83
+ loading.value = !0
84
+ items.value = []
85
+ method({ params })
86
+ .then(({ _data }: any) => {
87
+ items.value = _data || []
88
+ })
89
+ .catch((e: any) => {
90
+ alertError(e?.message || 'An error occurred')
91
+ })
92
+ .finally(() => {
93
+ loading.value = !1
94
+ if (fromWatch) {
95
+ if (modelValue.value !== null && modelValue.value !== undefined) {
96
+ setFieldValue(undefined)
97
+ }
98
+ }
99
+ })
100
+ }
101
+ const listeners = {
102
+ 'update:search': prepare,
103
+ model: (v: MSelectModelEmit) => emit('model', v)
104
+ }
105
+ onMounted(() => {
106
+ if (!props.lazy) {
107
+ prepare()
108
+ }
109
+ })
110
+ watch(props.params, () => prepare(!0), { deep: !0 })
111
+ const input = useTemplateRef<InstanceType<typeof MSelect>>('input')
112
+ defineExpose<{ input: typeof input }>({ input })
113
+ defineOptions({ name: 'MAxios', inheritAttrs: !1 })
114
+ </script>
115
+
116
+ <template>
117
+ <MSelect
118
+ ref="input"
119
+ v-model="modelValue"
120
+ v-model:loading="loading"
121
+ v-model:search="search"
122
+ :label="label"
123
+ :name="name"
124
+ :options="items"
125
+ :placeholder="placeholder"
126
+ :view-mode="viewMode"
127
+ :view-mode-value="viewModeValue"
128
+ axios-mode
129
+ no-filter
130
+ v-bind="$attrs"
131
+ v-on="listeners"
132
+ >
133
+ <template
134
+ v-for="(_,slot) in $slots as Readonly<QSelectSlots>"
135
+ :key="slot"
136
+ #[slot]="inputSlot"
137
+ >
138
+ <slot
139
+ :name="slot"
140
+ v-bind="inputSlot || {}"
141
+ />
142
+ </template>
143
+ </MSelect>
144
+ </template>
@@ -10,26 +10,166 @@
10
10
  lang="ts"
11
11
  setup
12
12
  >
13
- import type { MBtnProps } from '../../types'
14
- import { useI18n } from 'vue-i18n'
13
+ import type { MBtnProps as Props } from '../../types'
15
14
  import { computed } from 'vue'
16
- import { extend } from 'quasar'
17
15
  import { myth } from '../../utils'
16
+ import { useBindInput, useMyth } from '../../composable'
17
+ import type { QBtnProps } from 'quasar'
18
18
 
19
- const props = defineProps<MBtnProps>()
20
- const options = computed(() => myth.options.value.btn ?? {})
21
- const { t, te } = useI18n({ useScope: 'global' })
22
- const getLabel = computed(() => {
23
- if (props.label !== undefined) {
24
- if (te(`attributes.${props.label}`)) {
25
- return t(`attributes.${props.label}`)
26
- }
27
- if (te(`${props.label}`)) {
28
- return t(`${props.label}`)
29
- }
30
- }
31
- return props.label
19
+ const props = withDefaults(defineProps<Props>(), {
20
+ /**
21
+ * Size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl)
22
+ */
23
+ size: undefined,
24
+ /**
25
+ * 1) Define the button native type attribute (submit, reset, button) or 2) render component with <a> tag so you can access events even if disable or 3) Use 'href' prop and specify 'type' as a media tag
26
+ * Default value: 'button'
27
+ */
28
+ type: undefined,
29
+ /**
30
+ * Equivalent to Vue Router <router-link> 'to' property; Superseded by 'href' prop if used
31
+ */
32
+ to: undefined,
33
+ /**
34
+ * Equivalent to Vue Router <router-link> 'replace' property; Superseded by 'href' prop if used
35
+ */
36
+ replace: undefined,
37
+ /**
38
+ * Native <a> link href attribute; Has priority over the 'to' and 'replace' props
39
+ */
40
+ href: undefined,
41
+ /**
42
+ * Native <a> link target attribute; Use it only with 'to' or 'href' props
43
+ */
44
+ target: undefined,
45
+ /**
46
+ * The text that will be shown on the button
47
+ */
48
+ label: undefined,
49
+ /**
50
+ * Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (Str) is used as value then no icon is rendered (but screen real estate will still be used for it)
51
+ */
52
+ icon: undefined,
53
+ /**
54
+ * Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (Str) is used as value then no icon is rendered (but screen real estate will still be used for it)
55
+ */
56
+ iconRight: undefined,
57
+ /**
58
+ * Use 'outline' design
59
+ */
60
+ outline: undefined,
61
+ /**
62
+ * Use 'flat' design
63
+ */
64
+ flat: undefined,
65
+ /**
66
+ * Remove shadow
67
+ */
68
+ unelevated: undefined,
69
+ /**
70
+ * Applies a more prominent border-radius for a squared shape button
71
+ */
72
+ rounded: undefined,
73
+ /**
74
+ * Use 'push' design
75
+ */
76
+ push: undefined,
77
+ /**
78
+ * Removes border-radius so borders are squared
79
+ */
80
+ square: undefined,
81
+ /**
82
+ * Applies a glossy effect
83
+ */
84
+ glossy: undefined,
85
+ /**
86
+ * Makes button size and shape to fit a Floating Action Button
87
+ */
88
+ fab: undefined,
89
+ /**
90
+ * Makes button size and shape to fit a small Floating Action Button
91
+ */
92
+ fabMini: undefined,
93
+ /**
94
+ * Apply custom padding (vertical [horizontal]); Size in CSS units, including unit name or standard size name (none|xs|sm|md|lg|xl); Also removes the min width and height when set
95
+ */
96
+ padding: undefined,
97
+ /**
98
+ * Color name for component from the Quasar Color Palette
99
+ */
100
+ color: 'primary',
101
+ /**
102
+ * Overrides text color (if needed); Color name from the Quasar Color Palette
103
+ */
104
+ textColor: undefined,
105
+ /**
106
+ * Avoid turning label text into caps (which happens by default)
107
+ */
108
+ noCaps: undefined,
109
+ /**
110
+ * Avoid label text wrapping
111
+ */
112
+ noWrap: undefined,
113
+ /**
114
+ * Dense mode; occupies less space
115
+ */
116
+ dense: undefined,
117
+ /**
118
+ * Configure material ripple (disable it by setting it to 'false' or supply a config object)
119
+ * Default value: true
120
+ */
121
+ ripple: undefined,
122
+ /**
123
+ * Tabindex HTML attribute value
124
+ */
125
+ tabindex: undefined,
126
+ /**
127
+ * Label or content alignment
128
+ * Default value: 'center'
129
+ */
130
+ align: undefined,
131
+ /**
132
+ * Stack icon and label vertically instead of on same line (like it is by default)
133
+ */
134
+ stack: undefined,
135
+ /**
136
+ * When used on flexbox parent, button will stretch to parent's height
137
+ */
138
+ stretch: undefined,
139
+ /**
140
+ * Put button into loading state (displays a QSpinner -- can be overridden by using a 'loading' slot)
141
+ * Default value: null
142
+ */
143
+ loading: undefined,
144
+ /**
145
+ * Put component in disabled mode
146
+ */
147
+ disable: undefined,
148
+ /**
149
+ * Makes a circle shaped button
150
+ */
151
+ round: undefined,
152
+ /**
153
+ * Percentage (0.0 < x < 100.0); To be used along 'loading' prop; Display a progress bar on the background
154
+ */
155
+ percentage: undefined,
156
+ /**
157
+ * Progress bar on the background should have dark color; To be used along with 'percentage' and 'loading' props
158
+ */
159
+ darkPercentage: undefined,
160
+ /**
161
+ * Emitted when the component is clicked
162
+ * @param evt JS event object; If you are using route navigation ('to'/'replace' props) and you want to cancel navigation then call evt.preventDefault() synchronously in your event handler
163
+ * @param go Available ONLY if you are using route navigation ('to'/'replace' props); When you need to control the time at which the component should trigger the route navigation then call evt.preventDefault() synchronously and then call this function at your convenience; Useful if you have async work to be done before the actual route navigation or if you want to redirect somewhere else
164
+ */
165
+ onClick: undefined
32
166
  })
167
+ const { __ } = useMyth()
168
+ const btnLoading = computed(() => myth.btnLoading.value)
169
+ const getLabel = computed<string | undefined>(() => props.label ? (__(props.label) ?? undefined) : undefined)
170
+ const getSize = computed<string>(() => myth.btnLoading.value?.size || '20px')
171
+ const getColor = computed<string | undefined>(() => myth.btnLoading.value?.color || undefined)
172
+ const { attrs } = useBindInput<QBtnProps & { name: string }>(() => props, 'btn')
33
173
  defineOptions({
34
174
  name: 'MBtn',
35
175
  inheritAttrs: !1
@@ -37,130 +177,157 @@ defineOptions({
37
177
  </script>
38
178
 
39
179
  <template>
40
- <q-btn v-bind="extend(!0,{...$attrs},options.props,{...$props},{label: getLabel})">
180
+ <q-btn v-bind="{...$props,...attrs,label:loading?`${getLabel} ...`:getLabel}">
41
181
  <template
42
- v-if="!!options.loading && !$slots.loading"
182
+ v-if="!!btnLoading && !$slots.loading"
43
183
  #loading
44
184
  >
45
185
  <q-spinner-audio
46
- v-if="options.loading.type === 'audio'"
47
- :color="options.loading.color"
48
- :size="options.loading.size"
49
- class="on-left"
186
+ v-if="btnLoading.type === 'audio'"
187
+ :class="{'on-left': !!getLabel}"
188
+ :color="getColor"
189
+ :size="getSize"
50
190
  />
51
191
  <q-spinner-ball
52
- v-if="options.loading.type === 'ball'"
53
- :color="options.loading.color"
54
- :size="options.loading.size"
55
- class="on-left"
192
+ v-if="btnLoading.type === 'ball'"
193
+ :class="{'on-left': !!getLabel}"
194
+ :color="getColor"
195
+ :size="getSize"
56
196
  />
57
197
  <q-spinner-bars
58
- v-if="options.loading.type === 'bars'"
59
- :color="options.loading.color"
60
- class="on-left"
198
+ v-if="btnLoading.type === 'bars'"
199
+ :class="{'on-left': !!getLabel}"
200
+ :color="getColor"
201
+ :size="getSize"
61
202
  />
62
203
  <q-spinner-box
63
- v-if="options.loading.type === 'box'"
64
- :color="options.loading.color"
65
- class="on-left"
204
+ v-if="btnLoading.type === 'box'"
205
+ :class="{'on-left': !!getLabel}"
206
+ :color="getColor"
207
+ :size="getSize"
66
208
  />
67
209
  <q-spinner-clock
68
- v-if="options.loading.type === 'clock'"
69
- :color="options.loading.color"
70
- class="on-left"
210
+ v-if="btnLoading.type === 'clock'"
211
+ :class="{'on-left': !!getLabel}"
212
+ :color="getColor"
213
+ :size="getSize"
71
214
  />
72
215
  <q-spinner-comment
73
- v-if="options.loading.type === 'comment'"
74
- :color="options.loading.color"
75
- class="on-left"
216
+ v-if="btnLoading.type === 'comment'"
217
+ :class="{'on-left': !!getLabel}"
218
+ :color="getColor"
219
+ :size="getSize"
76
220
  />
77
221
  <q-spinner-cube
78
- v-if="options.loading.type === 'cube'"
79
- :color="options.loading.color"
80
- class="on-left"
222
+ v-if="btnLoading.type === 'cube'"
223
+ :class="{'on-left': !!getLabel}"
224
+ :color="getColor"
225
+ :size="getSize"
81
226
  />
82
227
  <q-spinner-dots
83
- v-if="options.loading.type === 'dots'"
84
- :color="options.loading.color"
85
- class="on-left"
228
+ v-if="btnLoading.type === 'dots'"
229
+ :class="{'on-left': !!getLabel}"
230
+ :color="getColor"
231
+ :size="getSize"
86
232
  />
87
233
  <q-spinner-facebook
88
- v-if="options.loading.type === 'facebook'"
89
- :color="options.loading.color"
90
- class="on-left"
234
+ v-if="btnLoading.type === 'facebook'"
235
+ :class="{'on-left': !!getLabel}"
236
+ :color="getColor"
237
+ :size="getSize"
91
238
  />
92
239
  <q-spinner-gears
93
- v-if="options.loading.type === 'gears'"
94
- :color="options.loading.color"
95
- class="on-left"
240
+ v-if="btnLoading.type === 'gears'"
241
+ :class="{'on-left': !!getLabel}"
242
+ :color="getColor"
243
+ :size="getSize"
96
244
  />
97
245
  <q-spinner-grid
98
- v-if="options.loading.type === 'grid'"
99
- :color="options.loading.color"
100
- class="on-left"
246
+ v-if="btnLoading.type === 'grid'"
247
+ :class="{'on-left': !!getLabel}"
248
+ :color="getColor"
249
+ :size="getSize"
101
250
  />
102
251
  <q-spinner-hearts
103
- v-if="options.loading.type === 'hearts'"
104
- :color="options.loading.color"
105
- class="on-left"
252
+ v-if="btnLoading.type === 'hearts'"
253
+ :class="{'on-left': !!getLabel}"
254
+ :color="getColor"
255
+ :size="getSize"
106
256
  />
107
257
  <q-spinner-hearts
108
- v-if="options.loading.type === 'hearts'"
109
- :color="options.loading.color"
110
- class="on-left"
258
+ v-if="btnLoading.type === 'hearts'"
259
+ :class="{'on-left': !!getLabel}"
260
+ :color="getColor"
261
+ :size="getSize"
111
262
  />
112
263
  <q-spinner-hourglass
113
- v-if="options.loading.type === 'hourglass'"
114
- :color="options.loading.color"
115
- class="on-left"
264
+ v-if="btnLoading.type === 'hourglass'"
265
+ :class="{'on-left': !!getLabel}"
266
+ :color="getColor"
267
+ :size="getSize"
116
268
  />
117
269
  <q-spinner-infinity
118
- v-if="options.loading.type === 'infinity'"
119
- :color="options.loading.color"
120
- class="on-left"
270
+ v-if="btnLoading.type === 'infinity'"
271
+ :class="{'on-left': !!getLabel}"
272
+ :color="getColor"
273
+ :size="getSize"
121
274
  />
122
275
  <q-spinner-ios
123
- v-if="options.loading.type === 'ios'"
124
- :color="options.loading.color"
125
- class="on-left"
276
+ v-if="btnLoading.type === 'ios'"
277
+ :class="{'on-left': !!getLabel}"
278
+ :color="getColor"
279
+ :size="getSize"
126
280
  />
127
281
  <q-spinner-orbit
128
- v-if="options.loading.type === 'orbit'"
129
- :color="options.loading.color"
130
- class="on-left"
282
+ v-if="btnLoading.type === 'orbit'"
283
+ :class="{'on-left': !!getLabel}"
284
+ :color="getColor"
285
+ :size="getSize"
131
286
  />
132
287
  <q-spinner-oval
133
- v-if="options.loading.type === 'oval'"
134
- :color="options.loading.color"
135
- class="on-left"
288
+ v-if="btnLoading.type === 'oval'"
289
+ :class="{'on-left': !!getLabel}"
290
+ :color="getColor"
291
+ :size="getSize"
136
292
  />
137
293
  <q-spinner-pie
138
- v-if="options.loading.type === 'pie'"
139
- :color="options.loading.color"
140
- class="on-left"
294
+ v-if="btnLoading.type === 'pie'"
295
+ :class="{'on-left': !!getLabel}"
296
+ :color="getColor"
297
+ :size="getSize"
141
298
  />
142
299
  <q-spinner-puff
143
- v-if="options.loading.type === 'puff'"
144
- :color="options.loading.color"
145
- class="on-left"
300
+ v-if="btnLoading.type === 'puff'"
301
+ :class="{'on-left': !!getLabel}"
302
+ :color="getColor"
303
+ :size="getSize"
146
304
  />
147
305
  <q-spinner-radio
148
- v-if="options.loading.type === 'radio'"
149
- :color="options.loading.color"
150
- class="on-left"
306
+ v-if="btnLoading.type === 'radio'"
307
+ :class="{'on-left': !!getLabel}"
308
+ :color="getColor"
309
+ :size="getSize"
151
310
  />
152
311
  <q-spinner-rings
153
- v-if="options.loading.type === 'rings'"
154
- :color="options.loading.color"
155
- class="on-left"
312
+ v-if="btnLoading.type === 'rings'"
313
+ :class="{'on-left': !!getLabel}"
314
+ :color="getColor"
315
+ :size="getSize"
156
316
  />
157
317
  <q-spinner-tail
158
- v-if="options.loading.type === 'tail'"
159
- :color="options.loading.color"
160
- class="on-left"
318
+ v-if="btnLoading.type === 'tail'"
319
+ :class="{'on-left': !!getLabel}"
320
+ :color="getColor"
321
+ :size="getSize"
161
322
  />
162
- <template v-if="options.loading.label === !0">
163
- {{ getLabel }}
323
+ <q-spinner
324
+ v-if="btnLoading.type === 'spinner'"
325
+ :class="{'on-left': !!getLabel}"
326
+ :color="getColor"
327
+ :size="getSize"
328
+ />
329
+ <template v-if="btnLoading.noLabel !== !1 && getLabel">
330
+ <span>{{ getLabel }}</span>
164
331
  </template>
165
332
  </template>
166
333
  <template