@mythpe/quasar-ui-qui 0.4.75 → 0.4.76
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 />
|