@mythpe/quasar-ui-qui 0.3.19 → 0.3.20
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
CHANGED
|
@@ -49,6 +49,9 @@ interface P {
|
|
|
49
49
|
appendIconProps?: Props['appendIconProps'];
|
|
50
50
|
copy?: Props['copy'];
|
|
51
51
|
type?: Props['type'];
|
|
52
|
+
ltr?: Props['ltr'];
|
|
53
|
+
rtl?: Props['rtl'];
|
|
54
|
+
inputClass?: Props['ltr'];
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
const props = withDefaults(defineProps<P>(), {
|
|
@@ -82,7 +85,10 @@ const props = withDefaults(defineProps<P>(), {
|
|
|
82
85
|
appendIcon: undefined,
|
|
83
86
|
appendIconProps: undefined,
|
|
84
87
|
copy: undefined,
|
|
85
|
-
type: undefined
|
|
88
|
+
type: undefined,
|
|
89
|
+
ltr: undefined,
|
|
90
|
+
rtl: undefined,
|
|
91
|
+
inputClass: undefined
|
|
86
92
|
})
|
|
87
93
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
88
94
|
const { __, props: pluginOptions, formatMoney, copyText } = useMyth()
|
|
@@ -120,6 +126,16 @@ const sarValue = computed<string | null>(() => {
|
|
|
120
126
|
}
|
|
121
127
|
})
|
|
122
128
|
const computedViewModeValue = computed<any>(() => props.viewModeValue ?? value.value)
|
|
129
|
+
const computedInputClass = computed(() => {
|
|
130
|
+
const classes: any[] = [props.inputClass]
|
|
131
|
+
if (props.ltr) {
|
|
132
|
+
classes.push('ltr')
|
|
133
|
+
}
|
|
134
|
+
if (props.rtl) {
|
|
135
|
+
classes.push('rtl')
|
|
136
|
+
}
|
|
137
|
+
return classes
|
|
138
|
+
})
|
|
123
139
|
defineExpose<typeof scopes & { input: typeof input }>({ input, ...scopes })
|
|
124
140
|
defineOptions({
|
|
125
141
|
name: 'MInput',
|
|
@@ -187,6 +203,7 @@ defineOptions({
|
|
|
187
203
|
modelValue: value,
|
|
188
204
|
placeholder: getPlaceholder,
|
|
189
205
|
type,
|
|
206
|
+
inputClass: computedInputClass,
|
|
190
207
|
}"
|
|
191
208
|
v-on="listeners"
|
|
192
209
|
>
|
|
@@ -159,6 +159,14 @@ export interface MInputProps extends Omit<QInputProps, 'rules' | 'name' | 'model
|
|
|
159
159
|
* Default: false.
|
|
160
160
|
*/
|
|
161
161
|
copy?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Add ltr class to input-class
|
|
164
|
+
*/
|
|
165
|
+
ltr?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Add rtl class to input-class
|
|
168
|
+
*/
|
|
169
|
+
rtl?: boolean;
|
|
162
170
|
}
|
|
163
171
|
|
|
164
172
|
export type MInputSlots = QInputSlots & QFieldSlots & BaseInputsSlots
|