@mythpe/quasar-ui-qui 0.0.92 → 0.0.94
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/MCheckbox.vue +2 -2
- package/src/components/form/MEditor.vue +2 -2
- package/src/components/form/MField.vue +4 -4
- package/src/components/form/MFile.vue +2 -2
- package/src/components/form/MHidden.vue +6 -8
- package/src/components/form/MHiddenInput.vue +5 -4
- package/src/components/form/MInput.vue +3 -3
- package/src/components/form/MOptions.vue +2 -2
- package/src/components/form/MPicker.vue +3 -3
- package/src/components/form/MRadio.vue +1 -1
- package/src/components/form/MSelect.vue +3 -3
- package/src/components/form/MToggle.vue +4 -4
- package/src/types/components.d.ts +1 -1
package/package.json
CHANGED
|
@@ -127,7 +127,7 @@ defineOptions({
|
|
|
127
127
|
v-bind="{
|
|
128
128
|
error: !!errorMessage,
|
|
129
129
|
errorMessage,
|
|
130
|
-
hint: hint ? __(hint) :
|
|
130
|
+
hint: hint ? __(hint) : undefined,
|
|
131
131
|
dense: !0,
|
|
132
132
|
borderless: !0,
|
|
133
133
|
outlined: !1,
|
|
@@ -143,7 +143,7 @@ defineOptions({
|
|
|
143
143
|
...$attrs,
|
|
144
144
|
modelValue: value,
|
|
145
145
|
disable: viewMode === !0 ? !0 : disable,
|
|
146
|
-
autocomplete: getAutocompleteAttribute,
|
|
146
|
+
autocomplete: getAutocompleteAttribute || undefined,
|
|
147
147
|
label: undefined
|
|
148
148
|
}"
|
|
149
149
|
v-on="listeners"
|
|
@@ -248,10 +248,10 @@ defineOptions({
|
|
|
248
248
|
ref="input"
|
|
249
249
|
:_definitions="{..._definitions,...pluginOptions.editor?.definitions}"
|
|
250
250
|
:fonts="fonts || _fonts"
|
|
251
|
-
:label="hasTopLabel ? undefined : getLabel"
|
|
251
|
+
:label="hasTopLabel ? undefined : (getLabel || undefined)"
|
|
252
252
|
:min-height="minHeight"
|
|
253
253
|
:model-value="value || ''"
|
|
254
|
-
:placeholder="getPlaceholder"
|
|
254
|
+
:placeholder="getPlaceholder || undefined"
|
|
255
255
|
:toolbar="toolbar || _toolbar"
|
|
256
256
|
v-bind="{
|
|
257
257
|
...pluginOptions.editor as any,
|
|
@@ -115,11 +115,11 @@ defineOptions({
|
|
|
115
115
|
stackLabel: !0,
|
|
116
116
|
error: !!errorMessage,
|
|
117
117
|
errorMessage,
|
|
118
|
-
hint: hint ? __(hint) :
|
|
119
|
-
label: hasTopLabel ? undefined : getLabel,
|
|
118
|
+
hint: hint ? __(hint) : undefined,
|
|
119
|
+
label: hasTopLabel ? undefined : (getLabel || undefined),
|
|
120
120
|
modelValue: value,
|
|
121
|
-
autocomplete: getAutocompleteAttribute,
|
|
122
|
-
placeholder: getPlaceholder
|
|
121
|
+
autocomplete: getAutocompleteAttribute || undefined,
|
|
122
|
+
placeholder: getPlaceholder || undefined
|
|
123
123
|
}"
|
|
124
124
|
>
|
|
125
125
|
<template
|
|
@@ -160,8 +160,8 @@ defineOptions({
|
|
|
160
160
|
:accept="accepts.join(',')"
|
|
161
161
|
:error="!!errorMessage"
|
|
162
162
|
:error-message="errorMessage"
|
|
163
|
-
:hint="__(hint)"
|
|
164
|
-
:label="hasTopLabel ? (viewMode ? undefined : getPlaceholder) : getLabel"
|
|
163
|
+
:hint="hint ? __(hint) : undefined"
|
|
164
|
+
:label="hasTopLabel ? (viewMode ? undefined : (getPlaceholder || undefined)) : (getLabel || undefined)"
|
|
165
165
|
:model-value="value"
|
|
166
166
|
v-bind="{
|
|
167
167
|
...$attrs,
|
|
@@ -18,6 +18,7 @@ import { useBindInput } from '../../composable'
|
|
|
18
18
|
|
|
19
19
|
type P = {
|
|
20
20
|
name: Props['name'];
|
|
21
|
+
type?: Props['type'];
|
|
21
22
|
auto?: Props['auto'];
|
|
22
23
|
col?: Props['col'];
|
|
23
24
|
xs?: Props['xs'];
|
|
@@ -32,7 +33,8 @@ type P = {
|
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
const props = withDefaults(defineProps<P>(), {
|
|
35
|
-
name:
|
|
36
|
+
name: '',
|
|
37
|
+
type: 'text',
|
|
36
38
|
auto: undefined,
|
|
37
39
|
col: undefined,
|
|
38
40
|
xs: undefined,
|
|
@@ -41,9 +43,9 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
41
43
|
lg: undefined,
|
|
42
44
|
xl: undefined,
|
|
43
45
|
rules: undefined,
|
|
44
|
-
required:
|
|
46
|
+
required: !1,
|
|
45
47
|
fieldOptions: undefined,
|
|
46
|
-
viewMode:
|
|
48
|
+
viewMode: !1
|
|
47
49
|
})
|
|
48
50
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
49
51
|
const helper = useBindInput<P>(() => props, 'input')
|
|
@@ -79,11 +81,7 @@ defineOptions({
|
|
|
79
81
|
>
|
|
80
82
|
<MHiddenInput
|
|
81
83
|
v-model="value"
|
|
82
|
-
|
|
83
|
-
:name="name"
|
|
84
|
-
:required="required"
|
|
85
|
-
:rules="rules"
|
|
86
|
-
v-bind="$attrs"
|
|
84
|
+
v-bind="{ ...$attrs, type, name, required, rules, fieldOptions }"
|
|
87
85
|
/>
|
|
88
86
|
<slot />
|
|
89
87
|
</MCol>
|
|
@@ -18,15 +18,17 @@ import { useBindInput } from '../../composable'
|
|
|
18
18
|
|
|
19
19
|
type P = {
|
|
20
20
|
name: Props['name'];
|
|
21
|
+
type?: Props['type'];
|
|
21
22
|
rules?: Props['rules'];
|
|
22
23
|
required?: Props['required'];
|
|
23
24
|
fieldOptions?: Props['modelValue'];
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
const props = withDefaults(defineProps<P>(), {
|
|
27
|
-
name:
|
|
28
|
+
name: '',
|
|
29
|
+
type: 'text',
|
|
28
30
|
rules: undefined,
|
|
29
|
-
required:
|
|
31
|
+
required: !1,
|
|
30
32
|
fieldOptions: undefined
|
|
31
33
|
})
|
|
32
34
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
@@ -53,7 +55,6 @@ defineOptions({
|
|
|
53
55
|
<template>
|
|
54
56
|
<input
|
|
55
57
|
v-model="value"
|
|
56
|
-
|
|
57
|
-
v-bind="{...$attrs,type: 'hidden',hidden: !0 }"
|
|
58
|
+
v-bind="{ ...$attrs, type: 'text', hidden: !0, name }"
|
|
58
59
|
>
|
|
59
60
|
</template>
|
|
@@ -137,12 +137,12 @@ defineOptions({
|
|
|
137
137
|
...$attrs,
|
|
138
138
|
...theme,
|
|
139
139
|
...( viewMode ? { ...pluginOptions.field, stackLabel: !0 } : pluginOptions.input as any),
|
|
140
|
-
autocomplete: getAutocompleteAttribute,
|
|
140
|
+
autocomplete: getAutocompleteAttribute || undefined,
|
|
141
141
|
clearable: viewMode ? !1 : clearable,
|
|
142
142
|
error: !!errorMessage,
|
|
143
143
|
errorMessage,
|
|
144
|
-
hint: __(hint),
|
|
145
|
-
label: hasTopLabel ? undefined : getLabel,
|
|
144
|
+
hint: hint ? __(hint) || undefined,
|
|
145
|
+
label: hasTopLabel ? undefined : ( getLabel || undefined),
|
|
146
146
|
modelValue: value,
|
|
147
147
|
placeholder: getPlaceholder,
|
|
148
148
|
}"
|
|
@@ -175,9 +175,9 @@ defineOptions({
|
|
|
175
175
|
:color="!!errorMessage ? 'negative' : getProp('color')"
|
|
176
176
|
:error="viewMode ? !!errorMessage : undefined"
|
|
177
177
|
:error-message="viewMode ? errorMessage : undefined"
|
|
178
|
-
:hint="viewMode ? __(hint) : undefined"
|
|
178
|
+
:hint="viewMode ? ( hint ? __(hint) : undefined ) : undefined"
|
|
179
179
|
:keep-color="!!errorMessage ? !0 : getProp('keepColor')"
|
|
180
|
-
:label="getLabel"
|
|
180
|
+
:label="getLabel || undefined"
|
|
181
181
|
:model-value="value"
|
|
182
182
|
:options="options"
|
|
183
183
|
:type="viewMode ? undefined : type"
|
|
@@ -178,9 +178,9 @@ defineOptions({
|
|
|
178
178
|
...$attrs,
|
|
179
179
|
error: !!errorMessage,
|
|
180
180
|
errorMessage,
|
|
181
|
-
hint: hint ? __(hint) :
|
|
182
|
-
label: hasTopLabel ? undefined : getLabel,
|
|
183
|
-
autocomplete: getAutocompleteAttribute,
|
|
181
|
+
hint: hint ? __(hint) : undefined,
|
|
182
|
+
label: hasTopLabel ? undefined : ( getLabel || undefined),
|
|
183
|
+
autocomplete: getAutocompleteAttribute || undefined,
|
|
184
184
|
stackLabel: !0
|
|
185
185
|
}"
|
|
186
186
|
>
|
|
@@ -220,7 +220,7 @@ defineOptions({
|
|
|
220
220
|
...theme,
|
|
221
221
|
...$attrs,
|
|
222
222
|
...( viewMode ? pluginOptions.field : pluginOptions.select as any ),
|
|
223
|
-
emitValue
|
|
223
|
+
emitValue,
|
|
224
224
|
error: !!errorMessage,
|
|
225
225
|
errorMessage,
|
|
226
226
|
hideSelected: hideSelected !== undefined ? hideSelected : search.length > 0,
|
|
@@ -236,9 +236,9 @@ defineOptions({
|
|
|
236
236
|
mapOptions,
|
|
237
237
|
loading,
|
|
238
238
|
useInput,
|
|
239
|
-
autocomplete: getAutocompleteAttribute,
|
|
239
|
+
autocomplete: getAutocompleteAttribute || undefined,
|
|
240
240
|
clearable: viewMode ? !1 : clearable,
|
|
241
|
-
hint: hint ? __(hint) :
|
|
241
|
+
hint: hint ? __(hint) : undefined,
|
|
242
242
|
label: viewMode && hasTopLabel ? undefined : (loading ? undefined : getPlaceholder),
|
|
243
243
|
modelValue: value,
|
|
244
244
|
}"
|
|
@@ -160,10 +160,10 @@ defineOptions({
|
|
|
160
160
|
/>
|
|
161
161
|
<MCol v-bind="colProps">
|
|
162
162
|
<q-field
|
|
163
|
-
:error="!!errorMessage"
|
|
164
|
-
:error-message="errorMessage"
|
|
165
|
-
:hint="__(hint)"
|
|
166
163
|
v-bind="{
|
|
164
|
+
error: !!errorMessage,
|
|
165
|
+
errorMessage,
|
|
166
|
+
hint: hint ? __(hint) : undefined,
|
|
167
167
|
...pluginOptions.input as any,
|
|
168
168
|
...pluginOptions.field,
|
|
169
169
|
...$attrs,
|
|
@@ -176,7 +176,7 @@ defineOptions({
|
|
|
176
176
|
:disable="viewMode"
|
|
177
177
|
:false-value="falseValue"
|
|
178
178
|
:indeterminate-value="indeterminateValue"
|
|
179
|
-
:label="getLabel"
|
|
179
|
+
:label="getLabel || undefined"
|
|
180
180
|
:model-value="value"
|
|
181
181
|
:true-value="trueValue"
|
|
182
182
|
v-bind="{
|
|
@@ -448,7 +448,7 @@ export type MHiddenInputSlots = {
|
|
|
448
448
|
[key: string]: () => VNode[]
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
export type MHiddenInputProps = Pick<BaseInputFormProps, 'rules' | 'required'> & {
|
|
451
|
+
export type MHiddenInputProps = Pick<BaseInputFormProps, 'rules' | 'required'> & Pick<QInputProps, 'type'> & {
|
|
452
452
|
/**
|
|
453
453
|
* Input name.
|
|
454
454
|
*/
|