@mythpe/quasar-ui-qui 0.4.75 → 0.4.77
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
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
import { useField, useFieldValue } from 'vee-validate'
|
|
14
14
|
import { computed, reactive, toValue, useTemplateRef } from 'vue'
|
|
15
|
-
import { QField, QInput, type QInputSlots } from 'quasar'
|
|
15
|
+
import { QField, QInput, type QInputSlots, useQuasar } from 'quasar'
|
|
16
16
|
import { useBindInput, useMyth } from '../../composable'
|
|
17
17
|
import type { MInputProps as Props } from '../../types'
|
|
18
18
|
import { MSarString } from '../sar'
|
|
@@ -57,6 +57,7 @@ interface P {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
const props = defineProps<P>()
|
|
60
|
+
const $q = useQuasar()
|
|
60
61
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
61
62
|
const { __, props: pluginOptions, formatMoney, copyText } = useMyth()
|
|
62
63
|
const helper = useBindInput<Props>(() => props, 'input')
|
|
@@ -118,7 +119,15 @@ const focus = () => {
|
|
|
118
119
|
const select = () => {
|
|
119
120
|
input?.value?.select?.()
|
|
120
121
|
}
|
|
121
|
-
|
|
122
|
+
const isRtl = computed<boolean>(() => {
|
|
123
|
+
if (props.rtl) {
|
|
124
|
+
return true
|
|
125
|
+
}
|
|
126
|
+
if (props.ltr) {
|
|
127
|
+
return false
|
|
128
|
+
}
|
|
129
|
+
return $q.lang.rtl
|
|
130
|
+
})
|
|
122
131
|
defineExpose<typeof scopes & { input: typeof input; focus:() => void; select: () => void; }>({ focus, select, input, ...scopes })
|
|
123
132
|
defineOptions({
|
|
124
133
|
name: 'MInput',
|
|
@@ -200,6 +209,12 @@ defineOptions({
|
|
|
200
209
|
v-bind="prependIconProps"
|
|
201
210
|
/>
|
|
202
211
|
</template>
|
|
212
|
+
<template
|
|
213
|
+
v-else-if="sar && !viewMode && !isRtl"
|
|
214
|
+
#prepend
|
|
215
|
+
>
|
|
216
|
+
<MSarIcon />
|
|
217
|
+
</template>
|
|
203
218
|
<template
|
|
204
219
|
v-if="!!appendIcon"
|
|
205
220
|
#append
|
|
@@ -210,7 +225,7 @@ defineOptions({
|
|
|
210
225
|
/>
|
|
211
226
|
</template>
|
|
212
227
|
<template
|
|
213
|
-
v-else-if="sar && !viewMode"
|
|
228
|
+
v-else-if="sar && !viewMode && isRtl"
|
|
214
229
|
#append
|
|
215
230
|
>
|
|
216
231
|
<MSarIcon />
|
|
@@ -275,8 +275,6 @@ export const useMyth = () => {
|
|
|
275
275
|
persistent: !0,
|
|
276
276
|
cancel: {
|
|
277
277
|
color: cancelProps.color || undefined,
|
|
278
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
279
|
-
// @ts-ignore
|
|
280
278
|
label: t(cancelProps?.label || 'labels.cancel'),
|
|
281
279
|
outline: !0,
|
|
282
280
|
...buttonsProps as any,
|
|
@@ -284,10 +282,9 @@ export const useMyth = () => {
|
|
|
284
282
|
},
|
|
285
283
|
ok: {
|
|
286
284
|
color: okProps.color || 'primary',
|
|
287
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
288
|
-
// @ts-ignore
|
|
289
285
|
label: t(okProps?.label || 'labels.confirm'),
|
|
290
286
|
outline: !1,
|
|
287
|
+
noCaps: !0,
|
|
291
288
|
...buttonsProps as any,
|
|
292
289
|
...okProps as any
|
|
293
290
|
},
|