@mythpe/quasar-ui-qui 0.0.59 → 0.0.61
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/package.json +1 -1
- package/src/components/form/MBtn.vue +132 -110
- package/src/components/form/MCheckbox.vue +54 -16
- package/src/components/form/MColor.vue +26 -43
- package/src/components/form/MDate.vue +1 -1
- package/src/components/form/MEmail.vue +1 -3
- package/src/components/form/MField.vue +10 -8
- package/src/components/form/MFile.vue +2 -2
- package/src/components/form/MInput.vue +3 -3
- package/src/components/form/MInputLabel.vue +4 -1
- package/src/components/form/MOptions.vue +4 -1
- package/src/components/form/MPicker.vue +59 -61
- package/src/components/form/MRadio.vue +7 -4
- package/src/components/form/MSelect.vue +12 -12
- package/src/components/form/MToggle.vue +5 -4
- package/src/composable/useBindInput.ts +1 -1
- package/src/types/components.d.ts +3 -2
package/package.json
CHANGED
|
@@ -10,18 +10,40 @@
|
|
|
10
10
|
lang="ts"
|
|
11
11
|
setup
|
|
12
12
|
>
|
|
13
|
-
import type { ButtonLoadingOptions, MBtnProps
|
|
13
|
+
import type { ButtonLoadingOptions, MBtnProps } from '../../types'
|
|
14
14
|
import { computed } from 'vue'
|
|
15
|
-
import {
|
|
16
|
-
import type { QBtnProps } from 'quasar'
|
|
15
|
+
import { useMyth } from '../../composable'
|
|
17
16
|
|
|
17
|
+
type Props = {
|
|
18
|
+
label?: MBtnProps['label'];
|
|
19
|
+
ariaLabel?: MBtnProps['ariaLabel'];
|
|
20
|
+
loading?: MBtnProps['loading'];
|
|
21
|
+
nativeLabel?: MBtnProps['nativeLabel'];
|
|
22
|
+
}
|
|
18
23
|
const props = defineProps<Props>()
|
|
19
|
-
const { __, theme } = useMyth()
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
const { __, theme, props: pluginOptions } = useMyth()
|
|
25
|
+
const getLabel = computed<string | undefined>(() => {
|
|
26
|
+
if (props.nativeLabel === !0) {
|
|
27
|
+
return props.label
|
|
28
|
+
}
|
|
29
|
+
return props.label ? (__(props.label) ?? undefined) : undefined
|
|
30
|
+
})
|
|
31
|
+
const getAriaLabel = computed<string | undefined>(() => {
|
|
32
|
+
if (props.ariaLabel === !0 || (typeof props.ariaLabel === 'string' && !props.ariaLabel?.length)) {
|
|
33
|
+
if (props.label !== undefined) {
|
|
34
|
+
return __(props.label) || undefined
|
|
35
|
+
}
|
|
36
|
+
} else if (typeof props.ariaLabel === 'string' && props.ariaLabel?.length > 0) {
|
|
37
|
+
return __(props.ariaLabel) || undefined
|
|
38
|
+
}
|
|
39
|
+
return props.ariaLabel ? __(props.ariaLabel) : undefined
|
|
40
|
+
})
|
|
41
|
+
const hasLabel = computed<boolean>(() => !!getLabel.value)
|
|
42
|
+
|
|
43
|
+
const loadingOptions = computed(() => theme.value.buttonLoading as ButtonLoadingOptions)
|
|
44
|
+
const loadingSize = computed<string | undefined>(() => loadingOptions.value.size)
|
|
45
|
+
const loadingColor = computed<string | undefined>(() => loadingOptions.value.color)
|
|
46
|
+
|
|
25
47
|
defineOptions({
|
|
26
48
|
name: 'MBtn',
|
|
27
49
|
inheritAttrs: !1
|
|
@@ -31,161 +53,161 @@ defineOptions({
|
|
|
31
53
|
<template>
|
|
32
54
|
<q-btn
|
|
33
55
|
v-bind="{
|
|
34
|
-
|
|
56
|
+
...pluginOptions.btn,
|
|
57
|
+
ariaLabel: getAriaLabel,
|
|
35
58
|
...$attrs,
|
|
36
|
-
|
|
37
|
-
label: loading ? `${getLabel} ...` : getLabel,
|
|
59
|
+
label: loading && getLabel ? `${getLabel} ...` : getLabel,
|
|
38
60
|
}"
|
|
39
61
|
>
|
|
40
62
|
<template
|
|
41
|
-
v-if="!!
|
|
63
|
+
v-if="!!loadingOptions && !$slots.loading"
|
|
42
64
|
#loading
|
|
43
65
|
>
|
|
44
66
|
<q-spinner-audio
|
|
45
|
-
v-if="
|
|
46
|
-
:class="{'on-left':
|
|
47
|
-
:color="
|
|
48
|
-
:size="
|
|
67
|
+
v-if="loadingOptions.type === 'audio'"
|
|
68
|
+
:class="{'on-left': hasLabel}"
|
|
69
|
+
:color="loadingColor"
|
|
70
|
+
:size="loadingSize"
|
|
49
71
|
/>
|
|
50
72
|
<q-spinner-ball
|
|
51
|
-
v-if="
|
|
52
|
-
:class="{'on-left':
|
|
53
|
-
:color="
|
|
54
|
-
:size="
|
|
73
|
+
v-if="loadingOptions.type === 'ball'"
|
|
74
|
+
:class="{'on-left': hasLabel}"
|
|
75
|
+
:color="loadingColor"
|
|
76
|
+
:size="loadingSize"
|
|
55
77
|
/>
|
|
56
78
|
<q-spinner-bars
|
|
57
|
-
v-if="
|
|
58
|
-
:class="{'on-left':
|
|
59
|
-
:color="
|
|
60
|
-
:size="
|
|
79
|
+
v-if="loadingOptions.type === 'bars'"
|
|
80
|
+
:class="{'on-left': hasLabel}"
|
|
81
|
+
:color="loadingColor"
|
|
82
|
+
:size="loadingSize"
|
|
61
83
|
/>
|
|
62
84
|
<q-spinner-box
|
|
63
|
-
v-if="
|
|
64
|
-
:class="{'on-left':
|
|
65
|
-
:color="
|
|
66
|
-
:size="
|
|
85
|
+
v-if="loadingOptions.type === 'box'"
|
|
86
|
+
:class="{'on-left': hasLabel}"
|
|
87
|
+
:color="loadingColor"
|
|
88
|
+
:size="loadingSize"
|
|
67
89
|
/>
|
|
68
90
|
<q-spinner-clock
|
|
69
|
-
v-if="
|
|
70
|
-
:class="{'on-left':
|
|
71
|
-
:color="
|
|
72
|
-
:size="
|
|
91
|
+
v-if="loadingOptions.type === 'clock'"
|
|
92
|
+
:class="{'on-left': hasLabel}"
|
|
93
|
+
:color="loadingColor"
|
|
94
|
+
:size="loadingSize"
|
|
73
95
|
/>
|
|
74
96
|
<q-spinner-comment
|
|
75
|
-
v-if="
|
|
76
|
-
:class="{'on-left':
|
|
77
|
-
:color="
|
|
78
|
-
:size="
|
|
97
|
+
v-if="loadingOptions.type === 'comment'"
|
|
98
|
+
:class="{'on-left': hasLabel}"
|
|
99
|
+
:color="loadingColor"
|
|
100
|
+
:size="loadingSize"
|
|
79
101
|
/>
|
|
80
102
|
<q-spinner-cube
|
|
81
|
-
v-if="
|
|
82
|
-
:class="{'on-left':
|
|
83
|
-
:color="
|
|
84
|
-
:size="
|
|
103
|
+
v-if="loadingOptions.type === 'cube'"
|
|
104
|
+
:class="{'on-left': hasLabel}"
|
|
105
|
+
:color="loadingColor"
|
|
106
|
+
:size="loadingSize"
|
|
85
107
|
/>
|
|
86
108
|
<q-spinner-dots
|
|
87
|
-
v-if="
|
|
88
|
-
:class="{'on-left':
|
|
89
|
-
:color="
|
|
90
|
-
:size="
|
|
109
|
+
v-if="loadingOptions.type === 'dots'"
|
|
110
|
+
:class="{'on-left': hasLabel}"
|
|
111
|
+
:color="loadingColor"
|
|
112
|
+
:size="loadingSize"
|
|
91
113
|
/>
|
|
92
114
|
<q-spinner-facebook
|
|
93
|
-
v-if="
|
|
94
|
-
:class="{'on-left':
|
|
95
|
-
:color="
|
|
96
|
-
:size="
|
|
115
|
+
v-if="loadingOptions.type === 'facebook'"
|
|
116
|
+
:class="{'on-left': hasLabel}"
|
|
117
|
+
:color="loadingColor"
|
|
118
|
+
:size="loadingSize"
|
|
97
119
|
/>
|
|
98
120
|
<q-spinner-gears
|
|
99
|
-
v-if="
|
|
100
|
-
:class="{'on-left':
|
|
101
|
-
:color="
|
|
102
|
-
:size="
|
|
121
|
+
v-if="loadingOptions.type === 'gears'"
|
|
122
|
+
:class="{'on-left': hasLabel}"
|
|
123
|
+
:color="loadingColor"
|
|
124
|
+
:size="loadingSize"
|
|
103
125
|
/>
|
|
104
126
|
<q-spinner-grid
|
|
105
|
-
v-if="
|
|
106
|
-
:class="{'on-left':
|
|
107
|
-
:color="
|
|
108
|
-
:size="
|
|
127
|
+
v-if="loadingOptions.type === 'grid'"
|
|
128
|
+
:class="{'on-left': hasLabel}"
|
|
129
|
+
:color="loadingColor"
|
|
130
|
+
:size="loadingSize"
|
|
109
131
|
/>
|
|
110
132
|
<q-spinner-hearts
|
|
111
|
-
v-if="
|
|
112
|
-
:class="{'on-left':
|
|
113
|
-
:color="
|
|
114
|
-
:size="
|
|
133
|
+
v-if="loadingOptions.type === 'hearts'"
|
|
134
|
+
:class="{'on-left': hasLabel}"
|
|
135
|
+
:color="loadingColor"
|
|
136
|
+
:size="loadingSize"
|
|
115
137
|
/>
|
|
116
138
|
<q-spinner-hearts
|
|
117
|
-
v-if="
|
|
118
|
-
:class="{'on-left':
|
|
119
|
-
:color="
|
|
120
|
-
:size="
|
|
139
|
+
v-if="loadingOptions.type === 'hearts'"
|
|
140
|
+
:class="{'on-left': hasLabel}"
|
|
141
|
+
:color="loadingColor"
|
|
142
|
+
:size="loadingSize"
|
|
121
143
|
/>
|
|
122
144
|
<q-spinner-hourglass
|
|
123
|
-
v-if="
|
|
124
|
-
:class="{'on-left':
|
|
125
|
-
:color="
|
|
126
|
-
:size="
|
|
145
|
+
v-if="loadingOptions.type === 'hourglass'"
|
|
146
|
+
:class="{'on-left': hasLabel}"
|
|
147
|
+
:color="loadingColor"
|
|
148
|
+
:size="loadingSize"
|
|
127
149
|
/>
|
|
128
150
|
<q-spinner-infinity
|
|
129
|
-
v-if="
|
|
130
|
-
:class="{'on-left':
|
|
131
|
-
:color="
|
|
132
|
-
:size="
|
|
151
|
+
v-if="loadingOptions.type === 'infinity'"
|
|
152
|
+
:class="{'on-left': hasLabel}"
|
|
153
|
+
:color="loadingColor"
|
|
154
|
+
:size="loadingSize"
|
|
133
155
|
/>
|
|
134
156
|
<q-spinner-ios
|
|
135
|
-
v-if="
|
|
136
|
-
:class="{'on-left':
|
|
137
|
-
:color="
|
|
138
|
-
:size="
|
|
157
|
+
v-if="loadingOptions.type === 'ios'"
|
|
158
|
+
:class="{'on-left': hasLabel}"
|
|
159
|
+
:color="loadingColor"
|
|
160
|
+
:size="loadingSize"
|
|
139
161
|
/>
|
|
140
162
|
<q-spinner-orbit
|
|
141
|
-
v-if="
|
|
142
|
-
:class="{'on-left':
|
|
143
|
-
:color="
|
|
144
|
-
:size="
|
|
163
|
+
v-if="loadingOptions.type === 'orbit'"
|
|
164
|
+
:class="{'on-left': hasLabel}"
|
|
165
|
+
:color="loadingColor"
|
|
166
|
+
:size="loadingSize"
|
|
145
167
|
/>
|
|
146
168
|
<q-spinner-oval
|
|
147
|
-
v-if="
|
|
148
|
-
:class="{'on-left':
|
|
149
|
-
:color="
|
|
150
|
-
:size="
|
|
169
|
+
v-if="loadingOptions.type === 'oval'"
|
|
170
|
+
:class="{'on-left': hasLabel}"
|
|
171
|
+
:color="loadingColor"
|
|
172
|
+
:size="loadingSize"
|
|
151
173
|
/>
|
|
152
174
|
<q-spinner-pie
|
|
153
|
-
v-if="
|
|
154
|
-
:class="{'on-left':
|
|
155
|
-
:color="
|
|
156
|
-
:size="
|
|
175
|
+
v-if="loadingOptions.type === 'pie'"
|
|
176
|
+
:class="{'on-left': hasLabel}"
|
|
177
|
+
:color="loadingColor"
|
|
178
|
+
:size="loadingSize"
|
|
157
179
|
/>
|
|
158
180
|
<q-spinner-puff
|
|
159
|
-
v-if="
|
|
160
|
-
:class="{'on-left':
|
|
161
|
-
:color="
|
|
162
|
-
:size="
|
|
181
|
+
v-if="loadingOptions.type === 'puff'"
|
|
182
|
+
:class="{'on-left': hasLabel}"
|
|
183
|
+
:color="loadingColor"
|
|
184
|
+
:size="loadingSize"
|
|
163
185
|
/>
|
|
164
186
|
<q-spinner-radio
|
|
165
|
-
v-if="
|
|
166
|
-
:class="{'on-left':
|
|
167
|
-
:color="
|
|
168
|
-
:size="
|
|
187
|
+
v-if="loadingOptions.type === 'radio'"
|
|
188
|
+
:class="{'on-left': hasLabel}"
|
|
189
|
+
:color="loadingColor"
|
|
190
|
+
:size="loadingSize"
|
|
169
191
|
/>
|
|
170
192
|
<q-spinner-rings
|
|
171
|
-
v-if="
|
|
172
|
-
:class="{'on-left':
|
|
173
|
-
:color="
|
|
174
|
-
:size="
|
|
193
|
+
v-if="loadingOptions.type === 'rings'"
|
|
194
|
+
:class="{'on-left': hasLabel}"
|
|
195
|
+
:color="loadingColor"
|
|
196
|
+
:size="loadingSize"
|
|
175
197
|
/>
|
|
176
198
|
<q-spinner-tail
|
|
177
|
-
v-if="
|
|
178
|
-
:class="{'on-left':
|
|
179
|
-
:color="
|
|
180
|
-
:size="
|
|
199
|
+
v-if="loadingOptions.type === 'tail'"
|
|
200
|
+
:class="{'on-left': hasLabel}"
|
|
201
|
+
:color="loadingColor"
|
|
202
|
+
:size="loadingSize"
|
|
181
203
|
/>
|
|
182
204
|
<q-spinner
|
|
183
|
-
v-if="
|
|
184
|
-
:class="{'on-left':
|
|
185
|
-
:color="
|
|
186
|
-
:size="
|
|
205
|
+
v-if="loadingOptions.type === 'spinner'"
|
|
206
|
+
:class="{'on-left': hasLabel}"
|
|
207
|
+
:color="loadingColor"
|
|
208
|
+
:size="loadingSize"
|
|
187
209
|
/>
|
|
188
|
-
<template v-if="
|
|
210
|
+
<template v-if="loadingOptions.noLabel !== !1 && getLabel">
|
|
189
211
|
<span>{{ getLabel }}</span>
|
|
190
212
|
</template>
|
|
191
213
|
</template>
|
|
@@ -16,11 +16,34 @@ import { useBindInput, useMyth } from '../../composable'
|
|
|
16
16
|
import type { MCheckboxProps as Props } from '../../types'
|
|
17
17
|
import { QCheckbox, QField } from 'quasar'
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
type P = {
|
|
20
|
+
auto?: Props['auto'];
|
|
21
|
+
col?: Props['col'];
|
|
22
|
+
xs?: Props['xs'];
|
|
23
|
+
sm?: Props['sm'];
|
|
24
|
+
md?: Props['md'];
|
|
25
|
+
lg?: Props['lg'];
|
|
26
|
+
xl?: Props['xl'];
|
|
27
|
+
name: Props['name'];
|
|
28
|
+
label?: Props['label'];
|
|
29
|
+
caption?: Props['caption'];
|
|
30
|
+
hint?: Props['hint'];
|
|
31
|
+
help?: Props['help'];
|
|
32
|
+
val?: Props['val'];
|
|
33
|
+
required?: Props['required'];
|
|
34
|
+
rules?: Props['rules'];
|
|
35
|
+
trueValue?: Props['trueValue'];
|
|
36
|
+
falseValue?: Props['falseValue'];
|
|
37
|
+
checkedIcon?: Props['checkedIcon'];
|
|
38
|
+
rowProps?: Props['rowProps'];
|
|
39
|
+
colProps?: Props['colProps'];
|
|
40
|
+
viewMode?: Props['viewMode'];
|
|
41
|
+
fieldOptions?: Props['fieldOptions'];
|
|
42
|
+
autocomplete: Props['autocomplete'];
|
|
43
|
+
disable: Props['disable'];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const props = withDefaults(defineProps<P>(), {
|
|
24
47
|
auto: undefined,
|
|
25
48
|
col: undefined,
|
|
26
49
|
xs: undefined,
|
|
@@ -28,17 +51,28 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
28
51
|
md: undefined,
|
|
29
52
|
lg: undefined,
|
|
30
53
|
xl: undefined,
|
|
54
|
+
name: () => '',
|
|
55
|
+
label: undefined,
|
|
56
|
+
caption: undefined,
|
|
57
|
+
hint: undefined,
|
|
58
|
+
help: undefined,
|
|
59
|
+
val: undefined,
|
|
31
60
|
required: undefined,
|
|
61
|
+
rules: undefined,
|
|
62
|
+
trueValue: () => !0,
|
|
63
|
+
falseValue: () => !1,
|
|
64
|
+
checkedIcon: undefined,
|
|
65
|
+
rowProps: undefined,
|
|
66
|
+
colProps: undefined,
|
|
67
|
+
viewMode: () => !1,
|
|
68
|
+
fieldOptions: undefined,
|
|
32
69
|
autocomplete: undefined,
|
|
33
|
-
|
|
34
|
-
email: undefined,
|
|
35
|
-
float: undefined,
|
|
36
|
-
useChoice: undefined
|
|
70
|
+
disable: undefined
|
|
37
71
|
})
|
|
38
72
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
39
|
-
const { __ } = useMyth()
|
|
73
|
+
const { __, props: pluginOptions } = useMyth()
|
|
40
74
|
const helper = useBindInput<Props>(() => props, 'checkbox')
|
|
41
|
-
const { getLabel, inputRules, theme } = helper
|
|
75
|
+
const { getLabel, inputRules, theme, getAutocompleteAttribute, getProp } = helper
|
|
42
76
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
43
77
|
syncVModel: !0,
|
|
44
78
|
label: getLabel,
|
|
@@ -91,10 +125,11 @@ defineOptions({
|
|
|
91
125
|
<MCol v-bind="colProps">
|
|
92
126
|
<q-field
|
|
93
127
|
v-bind="{
|
|
94
|
-
|
|
128
|
+
...theme,
|
|
129
|
+
...pluginOptions.field,
|
|
95
130
|
error: !!errorMessage,
|
|
96
131
|
errorMessage,
|
|
97
|
-
hint: __(hint),
|
|
132
|
+
hint: hint ? __(hint) : hint,
|
|
98
133
|
borderless: !0,
|
|
99
134
|
outlined: !1,
|
|
100
135
|
stackLabel: !0
|
|
@@ -103,11 +138,14 @@ defineOptions({
|
|
|
103
138
|
<q-checkbox
|
|
104
139
|
ref="input"
|
|
105
140
|
v-bind="{
|
|
106
|
-
...$attrs,
|
|
107
141
|
...theme,
|
|
142
|
+
...pluginOptions.checkbox,
|
|
143
|
+
checkedIcon: getProp('checkedIcon'),
|
|
144
|
+
...$attrs,
|
|
108
145
|
modelValue: value,
|
|
109
|
-
disable: viewMode === !0 ?
|
|
110
|
-
|
|
146
|
+
disable: viewMode === !0 ? !0 : disable,
|
|
147
|
+
autocomplete: getAutocompleteAttribute,
|
|
148
|
+
label: undefined
|
|
111
149
|
}"
|
|
112
150
|
v-on="listeners"
|
|
113
151
|
>
|
|
@@ -16,54 +16,28 @@ import { useField } from 'vee-validate'
|
|
|
16
16
|
import { useBindInput } from '../../composable'
|
|
17
17
|
import type { QField, QInput } from 'quasar'
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
type P = {
|
|
20
|
+
name: Props['name'];
|
|
21
|
+
label?: Props['label'];
|
|
22
|
+
required?: Props['required'];
|
|
23
|
+
rules?: Props['rules'];
|
|
24
|
+
viewMode?: Props['viewMode'];
|
|
25
|
+
topLabel?: Props['topLabel'];
|
|
26
|
+
fieldOptions?: Props['fieldOptions'];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const props = withDefaults(defineProps<P>(), {
|
|
20
30
|
name: () => '',
|
|
21
|
-
|
|
22
|
-
reverseFillMask: undefined,
|
|
23
|
-
unmaskedValue: undefined,
|
|
24
|
-
error: undefined,
|
|
25
|
-
noErrorIcon: undefined,
|
|
26
|
-
reactiveRules: undefined,
|
|
27
|
-
lazyRules: undefined,
|
|
28
|
-
stackLabel: undefined,
|
|
29
|
-
hideHint: undefined,
|
|
30
|
-
dark: undefined,
|
|
31
|
-
loading: undefined,
|
|
32
|
-
clearable: undefined,
|
|
33
|
-
filled: undefined,
|
|
34
|
-
outlined: undefined,
|
|
35
|
-
borderless: undefined,
|
|
36
|
-
standout: undefined,
|
|
37
|
-
labelSlot: undefined,
|
|
38
|
-
bottomSlots: undefined,
|
|
39
|
-
hideBottomSpace: undefined,
|
|
40
|
-
counter: undefined,
|
|
41
|
-
rounded: undefined,
|
|
42
|
-
square: undefined,
|
|
43
|
-
dense: undefined,
|
|
44
|
-
itemAligned: undefined,
|
|
45
|
-
disable: undefined,
|
|
46
|
-
readonly: undefined,
|
|
47
|
-
autofocus: undefined,
|
|
48
|
-
autogrow: undefined,
|
|
49
|
-
viewMode: undefined,
|
|
50
|
-
auto: undefined,
|
|
51
|
-
col: undefined,
|
|
52
|
-
xs: undefined,
|
|
53
|
-
sm: undefined,
|
|
54
|
-
md: undefined,
|
|
55
|
-
lg: undefined,
|
|
56
|
-
xl: undefined,
|
|
31
|
+
label: undefined,
|
|
57
32
|
required: undefined,
|
|
58
|
-
|
|
33
|
+
rules: undefined,
|
|
34
|
+
viewMode: () => !1,
|
|
59
35
|
topLabel: undefined,
|
|
60
|
-
|
|
61
|
-
email: undefined,
|
|
62
|
-
float: undefined
|
|
36
|
+
fieldOptions: undefined
|
|
63
37
|
})
|
|
64
38
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
65
39
|
const helper = useBindInput<Props>(() => props, 'input')
|
|
66
|
-
const { getLabel, inputRules
|
|
40
|
+
const { getLabel, inputRules } = helper
|
|
67
41
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
68
42
|
syncVModel: !0,
|
|
69
43
|
label: getLabel,
|
|
@@ -88,7 +62,16 @@ defineOptions({
|
|
|
88
62
|
<template>
|
|
89
63
|
<MInput
|
|
90
64
|
ref="input"
|
|
91
|
-
v-bind="{
|
|
65
|
+
v-bind="{
|
|
66
|
+
...$attrs,
|
|
67
|
+
name,
|
|
68
|
+
label,
|
|
69
|
+
required,
|
|
70
|
+
topLabel,
|
|
71
|
+
viewMode,
|
|
72
|
+
rules: inputRules,
|
|
73
|
+
modelValue: value
|
|
74
|
+
}"
|
|
92
75
|
v-on="listeners"
|
|
93
76
|
>
|
|
94
77
|
<template #prepend>
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
import type { MInputProps as Props, MInputSlots } from '../../types'
|
|
14
14
|
import { useTemplateRef } from 'vue'
|
|
15
15
|
import MInput from './MInput.vue'
|
|
16
|
-
import { useMyth } from '../../composable'
|
|
17
16
|
|
|
18
|
-
const { props: pluginOptions } = useMyth()
|
|
19
17
|
const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
20
18
|
const input = useTemplateRef<InstanceType<typeof MInput>>('input')
|
|
21
19
|
defineExpose<{ input: typeof input }>({ input })
|
|
@@ -29,7 +27,7 @@ defineOptions({
|
|
|
29
27
|
<MInput
|
|
30
28
|
ref="input"
|
|
31
29
|
v-model="modelValue"
|
|
32
|
-
v-bind="{
|
|
30
|
+
v-bind="{...$attrs as any, type:'email',email:!0}"
|
|
33
31
|
>
|
|
34
32
|
<template
|
|
35
33
|
v-for="(_,slot) in $slots as Readonly<MInputSlots>"
|
|
@@ -59,10 +59,10 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
59
59
|
topLabel: undefined,
|
|
60
60
|
clearable: undefined
|
|
61
61
|
})
|
|
62
|
-
const { __ } = useMyth()
|
|
62
|
+
const { __, props: pluginOptions } = useMyth()
|
|
63
63
|
const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
64
64
|
const helper = useBindInput<P>(() => props, 'input')
|
|
65
|
-
const { hasTopLabel, getLabel, getPlaceholder, inputRules,
|
|
65
|
+
const { hasTopLabel, getLabel, getPlaceholder, inputRules, getAutocompleteAttribute, theme } = helper
|
|
66
66
|
const value = useFieldValue(() => props.name)
|
|
67
67
|
const errorMessage = useFieldError(() => props.name)
|
|
68
68
|
const input = useTemplateRef<InstanceType<typeof QField>>('input')
|
|
@@ -108,16 +108,18 @@ defineOptions({
|
|
|
108
108
|
<q-field
|
|
109
109
|
ref="input"
|
|
110
110
|
v-bind="{
|
|
111
|
+
...theme,
|
|
111
112
|
...$attrs,
|
|
112
|
-
...
|
|
113
|
+
...pluginOptions.field as any,
|
|
113
114
|
clearable: !1,
|
|
114
115
|
stackLabel: !0,
|
|
115
|
-
error
|
|
116
|
+
error: !!errorMessage,
|
|
116
117
|
errorMessage,
|
|
117
|
-
hint:__(hint),
|
|
118
|
-
label:hasTopLabel ? undefined : getLabel,
|
|
119
|
-
modelValue:value,
|
|
120
|
-
|
|
118
|
+
hint: hint ? __(hint) : hint,
|
|
119
|
+
label: hasTopLabel ? undefined : getLabel,
|
|
120
|
+
modelValue: value,
|
|
121
|
+
autocomplete: getAutocompleteAttribute,
|
|
122
|
+
placeholder: getPlaceholder
|
|
121
123
|
}"
|
|
122
124
|
>
|
|
123
125
|
<template
|
|
@@ -74,7 +74,7 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
74
74
|
fieldOptions: undefined
|
|
75
75
|
})
|
|
76
76
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
77
|
-
const { __ } = useMyth()
|
|
77
|
+
const { __, props: pluginOptions } = useMyth()
|
|
78
78
|
const helper = useBindInput<P>(() => props, 'file', () => ({ choose: !0 }))
|
|
79
79
|
const { hasTopLabel, getLabel, getPlaceholder, accepts, inputRules, attrs } = helper
|
|
80
80
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
@@ -165,7 +165,7 @@ defineOptions({
|
|
|
165
165
|
:model-value="value"
|
|
166
166
|
v-bind="{
|
|
167
167
|
...$attrs,
|
|
168
|
-
...
|
|
168
|
+
...pluginOptions.file as any,
|
|
169
169
|
...( viewMode ? { stackLabel: !0 } : {} )
|
|
170
170
|
}"
|
|
171
171
|
v-on="listeners"
|
|
@@ -70,7 +70,7 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
70
70
|
float: undefined
|
|
71
71
|
})
|
|
72
72
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
73
|
-
const { __ } = useMyth()
|
|
73
|
+
const { __, props: pluginOptions } = useMyth()
|
|
74
74
|
const helper = useBindInput<Props>(() => props, 'input')
|
|
75
75
|
const { theme, hasTopLabel, getLabel, getPlaceholder, getAutocompleteAttribute, inputRules } = helper
|
|
76
76
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
@@ -136,7 +136,7 @@ defineOptions({
|
|
|
136
136
|
v-bind="{
|
|
137
137
|
...$attrs,
|
|
138
138
|
...theme,
|
|
139
|
-
...( viewMode ? { stackLabel: !0 } :
|
|
139
|
+
...( viewMode ? { ...pluginOptions.field, stackLabel: !0 } : pluginOptions.input as any),
|
|
140
140
|
autocomplete: getAutocompleteAttribute,
|
|
141
141
|
clearable: viewMode ? !1 : clearable,
|
|
142
142
|
error: !!errorMessage,
|
|
@@ -144,7 +144,7 @@ defineOptions({
|
|
|
144
144
|
hint: __(hint),
|
|
145
145
|
label: hasTopLabel ? undefined : getLabel,
|
|
146
146
|
modelValue: value,
|
|
147
|
-
placeholder: getPlaceholder
|
|
147
|
+
placeholder: getPlaceholder,
|
|
148
148
|
}"
|
|
149
149
|
v-on="listeners"
|
|
150
150
|
>
|
|
@@ -15,7 +15,10 @@ import type { MInputLabelProps as Props } from '../../types'
|
|
|
15
15
|
import { useMyth } from '../../composable'
|
|
16
16
|
|
|
17
17
|
const { __ } = useMyth()
|
|
18
|
-
defineProps<Props>()
|
|
18
|
+
withDefaults(defineProps<Props>(), {
|
|
19
|
+
field: () => ({} as Props['field']),
|
|
20
|
+
label: undefined
|
|
21
|
+
})
|
|
19
22
|
defineOptions({
|
|
20
23
|
name: 'MInputLabel',
|
|
21
24
|
inheritAttrs: !1
|
|
@@ -181,7 +181,10 @@ defineOptions({
|
|
|
181
181
|
:model-value="value"
|
|
182
182
|
:options="options"
|
|
183
183
|
:type="viewMode ? undefined : type"
|
|
184
|
-
v-bind="{
|
|
184
|
+
v-bind="{
|
|
185
|
+
...$attrs,
|
|
186
|
+
...( viewMode ? { ...pluginProps.field, stackLabel: !0 } : pluginProps.options as any )
|
|
187
|
+
}"
|
|
185
188
|
v-on="listeners"
|
|
186
189
|
>
|
|
187
190
|
<template
|
|
@@ -18,38 +18,39 @@ import type { QFieldSlots } from 'quasar'
|
|
|
18
18
|
import { QDate, QField, QTime } from 'quasar'
|
|
19
19
|
|
|
20
20
|
const defSeparator = ' - '
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
disable
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
|
|
22
|
+
interface P {
|
|
23
|
+
name: Props['name'];
|
|
24
|
+
auto?: Props['auto'];
|
|
25
|
+
col?: Props['col'];
|
|
26
|
+
xs?: Props['xs'];
|
|
27
|
+
sm?: Props['sm'];
|
|
28
|
+
md?: Props['md'];
|
|
29
|
+
lg?: Props['lg'];
|
|
30
|
+
xl?: Props['xl'];
|
|
31
|
+
label?: Props['label'];
|
|
32
|
+
caption?: Props['caption'];
|
|
33
|
+
hint?: Props['hint'];
|
|
34
|
+
placeholder?: Props['placeholder'];
|
|
35
|
+
help?: Props['help'];
|
|
36
|
+
required?: Props['required'];
|
|
37
|
+
rules?: Props['rules'];
|
|
38
|
+
viewMode?: Props['viewMode'];
|
|
39
|
+
viewModeValue?: Props['viewModeValue'];
|
|
40
|
+
autocomplete?: Props['autocomplete'];
|
|
41
|
+
topLabel?: Props['topLabel'];
|
|
42
|
+
type?: Props['type'];
|
|
43
|
+
range?: Props['range'];
|
|
44
|
+
rangeSeparator?: Props['rangeSeparator'];
|
|
45
|
+
multiple?: Props['multiple'];
|
|
46
|
+
btnProps?: Props['btnProps'];
|
|
47
|
+
readonly?: Props['readonly'];
|
|
48
|
+
disable?: Props['disable'];
|
|
49
|
+
fieldOptions?: Props['fieldOptions'];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const props = withDefaults(defineProps<P>(), {
|
|
53
|
+
name: () => '',
|
|
53
54
|
auto: undefined,
|
|
54
55
|
col: undefined,
|
|
55
56
|
xs: undefined,
|
|
@@ -57,32 +58,31 @@ const props = withDefaults(defineProps<Omit<Props, 'prefix'>>(), {
|
|
|
57
58
|
md: undefined,
|
|
58
59
|
lg: undefined,
|
|
59
60
|
xl: undefined,
|
|
61
|
+
label: undefined,
|
|
62
|
+
caption: undefined,
|
|
63
|
+
hint: undefined,
|
|
64
|
+
placeholder: undefined,
|
|
65
|
+
help: undefined,
|
|
60
66
|
required: undefined,
|
|
67
|
+
rules: undefined,
|
|
68
|
+
viewMode: () => !1,
|
|
69
|
+
viewModeValue: undefined,
|
|
61
70
|
autocomplete: undefined,
|
|
62
71
|
topLabel: undefined,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
todayBtn: undefined,
|
|
72
|
-
minimal: undefined,
|
|
73
|
-
multiple: undefined,
|
|
74
|
-
range: undefined,
|
|
75
|
-
emitImmediately: undefined,
|
|
76
|
-
format24h: undefined,
|
|
77
|
-
withSeconds: undefined,
|
|
78
|
-
nowBtn: undefined,
|
|
79
|
-
useChoice: undefined
|
|
72
|
+
type: () => 'date',
|
|
73
|
+
range: () => !1,
|
|
74
|
+
rangeSeparator: () => ' - ',
|
|
75
|
+
multiple: () => !1,
|
|
76
|
+
btnProps: undefined,
|
|
77
|
+
readonly: undefined,
|
|
78
|
+
disable: undefined,
|
|
79
|
+
fieldOptions: undefined
|
|
80
80
|
})
|
|
81
81
|
|
|
82
82
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
83
83
|
const helper = useBindInput<Props>(() => props, 'picker', () => ({ choose: !0 }))
|
|
84
|
-
const { hasTopLabel, getLabel, getPlaceholder, inputRules, getAutocompleteAttribute, getProp } = helper
|
|
85
|
-
const { __, props: pluginOptions
|
|
84
|
+
const { theme, hasTopLabel, getLabel, getPlaceholder, inputRules, getAutocompleteAttribute, getProp } = helper
|
|
85
|
+
const { __, props: pluginOptions } = useMyth()
|
|
86
86
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
87
87
|
syncVModel: !0,
|
|
88
88
|
label: getLabel,
|
|
@@ -168,16 +168,16 @@ defineOptions({
|
|
|
168
168
|
<q-field
|
|
169
169
|
ref="input"
|
|
170
170
|
v-model="value"
|
|
171
|
-
:error="!!errorMessage"
|
|
172
|
-
:error-message="errorMessage"
|
|
173
|
-
:hint="__(hint)"
|
|
174
|
-
:label="hasTopLabel ? undefined : getLabel"
|
|
175
171
|
v-bind="{
|
|
176
172
|
...pluginOptions.input as any,
|
|
177
173
|
...pluginOptions.field as any,
|
|
178
|
-
...theme
|
|
174
|
+
...theme,
|
|
179
175
|
...$attrs,
|
|
180
|
-
|
|
176
|
+
error: !!errorMessage,
|
|
177
|
+
errorMessage,
|
|
178
|
+
hint: hint ? __(hint) : hint,
|
|
179
|
+
label: hasTopLabel ? undefined : getLabel,
|
|
180
|
+
autocomplete: getAutocompleteAttribute,
|
|
181
181
|
stackLabel: !0
|
|
182
182
|
}"
|
|
183
183
|
>
|
|
@@ -227,10 +227,9 @@ defineOptions({
|
|
|
227
227
|
ref="dateElm"
|
|
228
228
|
v-bind="{
|
|
229
229
|
...pluginOptions.date as any,
|
|
230
|
-
...props,
|
|
231
230
|
...$attrs,
|
|
232
231
|
todayBtn: getProp('todayBtn') === undefined ? !0 : getProp('todayBtn'),
|
|
233
|
-
mask:format,
|
|
232
|
+
mask: format,
|
|
234
233
|
multiple,
|
|
235
234
|
range,
|
|
236
235
|
modelValue: dateRef ?? null
|
|
@@ -258,10 +257,9 @@ defineOptions({
|
|
|
258
257
|
v-else
|
|
259
258
|
ref="timeElm"
|
|
260
259
|
v-bind="{
|
|
261
|
-
...$props,
|
|
262
260
|
...pluginOptions.time,
|
|
263
261
|
...$attrs,
|
|
264
|
-
mask:format,
|
|
262
|
+
mask: format,
|
|
265
263
|
nowBtn: getProp('nowBtn') === undefined? !0 : getProp('nowBtn'),
|
|
266
264
|
modelValue: dateRef ?? null
|
|
267
265
|
}"
|
|
@@ -38,6 +38,7 @@ type P = {
|
|
|
38
38
|
colProps?: Props['colProps'];
|
|
39
39
|
viewMode?: Props['viewMode'];
|
|
40
40
|
fieldOptions?: Props['fieldOptions'];
|
|
41
|
+
disable?: Props['disable'];
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const props = withDefaults(defineProps<P>(), {
|
|
@@ -61,11 +62,12 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
61
62
|
rowProps: undefined,
|
|
62
63
|
colProps: undefined,
|
|
63
64
|
viewMode: () => !1,
|
|
64
|
-
fieldOptions: undefined
|
|
65
|
+
fieldOptions: undefined,
|
|
66
|
+
disable: undefined
|
|
65
67
|
})
|
|
66
68
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
67
69
|
const helper = useBindInput<P>(() => props, 'radio')
|
|
68
|
-
const { getLabel, inputRules,
|
|
70
|
+
const { getLabel, inputRules, getProp, theme } = helper
|
|
69
71
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
70
72
|
syncVModel: !0,
|
|
71
73
|
label: getLabel,
|
|
@@ -121,6 +123,7 @@ defineOptions({
|
|
|
121
123
|
:error-message="errorMessage"
|
|
122
124
|
:hint="__(hint)"
|
|
123
125
|
v-bind="{
|
|
126
|
+
...theme,
|
|
124
127
|
...pluginOptions.input as any,
|
|
125
128
|
...pluginOptions.field,
|
|
126
129
|
...$attrs,
|
|
@@ -132,13 +135,13 @@ defineOptions({
|
|
|
132
135
|
<template #control>
|
|
133
136
|
<q-radio
|
|
134
137
|
ref="input"
|
|
135
|
-
:disable="viewMode"
|
|
136
138
|
:model-value="value"
|
|
137
139
|
:val="val"
|
|
138
140
|
v-bind="{
|
|
141
|
+
...theme,
|
|
139
142
|
...pluginOptions.radio,
|
|
140
143
|
...$attrs,
|
|
141
|
-
|
|
144
|
+
disable: viewMode ? !0 : disable,
|
|
142
145
|
checkedIcon: getProp('checkedIcon'),
|
|
143
146
|
label: undefined
|
|
144
147
|
}"
|
|
@@ -109,9 +109,9 @@ type Emits = {
|
|
|
109
109
|
}
|
|
110
110
|
const emit = defineEmits<Emits>()
|
|
111
111
|
|
|
112
|
-
const { __, props: pluginOptions
|
|
112
|
+
const { __, props: pluginOptions } = useMyth()
|
|
113
113
|
const helper = useBindInput<P & Props>(() => props, 'select', () => ({ choose: !0 }))
|
|
114
|
-
const {
|
|
114
|
+
const { theme, hasTopLabel, getLabel, getPlaceholder, getAutocompleteAttribute, inputRules, getProp } = helper
|
|
115
115
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
116
116
|
syncVModel: !0,
|
|
117
117
|
label: getLabel,
|
|
@@ -217,20 +217,19 @@ defineOptions({
|
|
|
217
217
|
ref="input"
|
|
218
218
|
v-bind="{
|
|
219
219
|
behavior: $q.platform.is.ios === !0 ? 'dialog' : behavior,
|
|
220
|
-
...
|
|
221
|
-
|
|
222
|
-
...( viewMode ? pluginOptions.field :
|
|
220
|
+
...theme,
|
|
221
|
+
...$attrs,
|
|
222
|
+
...( viewMode ? pluginOptions.field : pluginOptions.select as any ),
|
|
223
223
|
emitValue: emitValue,
|
|
224
224
|
error: !!errorMessage,
|
|
225
225
|
errorMessage,
|
|
226
226
|
hideSelected: hideSelected !== undefined ? hideSelected : search.length > 0,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
optionValue: optionValue,
|
|
227
|
+
optionLabel,
|
|
228
|
+
optionValue,
|
|
230
229
|
options: getOptions,
|
|
231
|
-
readonly
|
|
230
|
+
readonly,
|
|
232
231
|
...(viewMode ? { stackLabel: !0 } : { stackLabel: hasTopLabel ? !1 : (
|
|
233
|
-
theme.
|
|
232
|
+
theme.dense !== undefined ? theme.dense : getProp('dense')
|
|
234
233
|
) } ),
|
|
235
234
|
useChips: getProp('useChips') === !0 && !multiple ? !1 : getProp('useChips'),
|
|
236
235
|
multiple,
|
|
@@ -239,8 +238,9 @@ defineOptions({
|
|
|
239
238
|
useInput,
|
|
240
239
|
autocomplete: getAutocompleteAttribute,
|
|
241
240
|
clearable: viewMode ? !1 : clearable,
|
|
242
|
-
hint: __(hint),
|
|
241
|
+
hint: hint ? __(hint) : hint,
|
|
243
242
|
label: viewMode && hasTopLabel ? undefined : (loading ? undefined : getPlaceholder),
|
|
243
|
+
modelValue: value,
|
|
244
244
|
}"
|
|
245
245
|
v-on="listeners"
|
|
246
246
|
>
|
|
@@ -249,7 +249,7 @@ defineOptions({
|
|
|
249
249
|
#no-option
|
|
250
250
|
>
|
|
251
251
|
<slot name="no-option">
|
|
252
|
-
<q-item :dense="theme.
|
|
252
|
+
<q-item :dense="theme.dense !== undefined ? theme.dense : getProp('optionsDense')">
|
|
253
253
|
<q-item-section side>
|
|
254
254
|
<template v-if="loading">
|
|
255
255
|
<q-spinner color="primary" />
|
|
@@ -85,7 +85,7 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
85
85
|
})
|
|
86
86
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
87
87
|
const helper = useBindInput<P>(() => props, 'toggle', () => ({ choose: !0 }))
|
|
88
|
-
const { getLabel: toggleLabel, inputRules, getProp } = helper
|
|
88
|
+
const { getLabel: toggleLabel, inputRules, getProp, theme } = helper
|
|
89
89
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
90
90
|
syncVModel: !0,
|
|
91
91
|
label: toggleLabel,
|
|
@@ -96,7 +96,7 @@ const { value, errorMessage, handleChange } = inputScope
|
|
|
96
96
|
const listeners = {
|
|
97
97
|
'update:modelValue': (v: Props['modelValue']) => handleChange(v, !!errorMessage.value)
|
|
98
98
|
}
|
|
99
|
-
const { __, props: pluginOptions
|
|
99
|
+
const { __, props: pluginOptions } = useMyth()
|
|
100
100
|
const getLabel = computed<string | undefined>(() => {
|
|
101
101
|
const def = undefined
|
|
102
102
|
const v = value.value
|
|
@@ -169,7 +169,7 @@ defineOptions({
|
|
|
169
169
|
...$attrs,
|
|
170
170
|
borderless: !0,
|
|
171
171
|
outlined: !1,
|
|
172
|
-
dense: theme.
|
|
172
|
+
dense: theme.dense !== undefined ? theme.dense : getProp('dense')
|
|
173
173
|
}"
|
|
174
174
|
>
|
|
175
175
|
<q-toggle
|
|
@@ -181,8 +181,9 @@ defineOptions({
|
|
|
181
181
|
:true-value="trueValue"
|
|
182
182
|
v-bind="{
|
|
183
183
|
...pluginOptions.toggle,
|
|
184
|
+
...theme,
|
|
184
185
|
...$attrs,
|
|
185
|
-
dense: theme.
|
|
186
|
+
dense: theme.dense !== undefined ? theme.dense : getProp('dense'),
|
|
186
187
|
checkedIcon: getProp('checkedIcon'),
|
|
187
188
|
uncheckedIcon: getProp('uncheckedIcon'),
|
|
188
189
|
color: !!errorMessage ? 'negative' : getProp('color'),
|
|
@@ -25,7 +25,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
|
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
const themeStyle = computed(() => (key === 'btn' ? mTheme.value.buttons : mTheme.value.inputs) ?? {})
|
|
28
|
-
const theme = ref({})
|
|
28
|
+
const theme = ref<Record<string, any>>({})
|
|
29
29
|
for (const k in themeStyle.value) {
|
|
30
30
|
if (props[k] !== undefined) {
|
|
31
31
|
theme.value[k] = props[k]
|
|
@@ -76,7 +76,8 @@ export interface MTransitionsSlots {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export interface MBtnProps extends QBtnProps {
|
|
79
|
-
|
|
79
|
+
ariaLabel?: boolean | string | null | undefined;
|
|
80
|
+
nativeLabel?: boolean | undefined;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
export interface MBtnSlots extends QBtnSlots {
|
|
@@ -576,7 +577,7 @@ export interface BaseCheckboxProps extends Omit<BaseInputsProps, 'topLabel'> {
|
|
|
576
577
|
colProps?: Record<string, any>;
|
|
577
578
|
}
|
|
578
579
|
|
|
579
|
-
export interface MCheckboxProps extends Omit<QCheckboxProps, 'name' | 'modelValue' | 'label'
|
|
580
|
+
export interface MCheckboxProps extends BaseCheckboxProps, Omit<QCheckboxProps, 'name' | 'modelValue' | 'label'> {
|
|
580
581
|
//
|
|
581
582
|
}
|
|
582
583
|
|