|
@@ -8,11 +8,10 @@
|
|
:rules="item.rules"
|
|
:rules="item.rules"
|
|
:disabled="item.disabled"
|
|
:disabled="item.disabled"
|
|
:style="{width: item.width}"
|
|
:style="{width: item.width}"
|
|
- color="primary"
|
|
|
|
|
|
+ :color="item.color || 'primary'"
|
|
:label="item.label"
|
|
:label="item.label"
|
|
:placeholder="item.placeholder || item.label"
|
|
:placeholder="item.placeholder || item.label"
|
|
:autofocus="item.autofocus"
|
|
:autofocus="item.autofocus"
|
|
- :focused="item.focused"
|
|
|
|
:required="item.required"
|
|
:required="item.required"
|
|
:class="item.class"
|
|
:class="item.class"
|
|
:suffix="item.suffix"
|
|
:suffix="item.suffix"
|
|
@@ -26,7 +25,6 @@
|
|
:hide-details="item.hideDetails || false"
|
|
:hide-details="item.hideDetails || false"
|
|
@wheel="$event => handleWheel($event, item)"
|
|
@wheel="$event => handleWheel($event, item)"
|
|
@update:modelValue="modelValueUpDate"
|
|
@update:modelValue="modelValueUpDate"
|
|
- @update:focused="focusedEvent"
|
|
|
|
@click:append="appendClick"
|
|
@click:append="appendClick"
|
|
@click:append-inner="appendInnerClick"
|
|
@click:append-inner="appendInnerClick"
|
|
@keyup.enter="handleKeyup"
|
|
@keyup.enter="handleKeyup"
|
|
@@ -39,7 +37,7 @@ import { defineEmits, ref, watch } from 'vue';
|
|
defineOptions({ name:'FormUI-v-text-field'})
|
|
defineOptions({ name:'FormUI-v-text-field'})
|
|
|
|
|
|
const props = defineProps({item: Object, modelValue: [String, Number]})
|
|
const props = defineProps({item: Object, modelValue: [String, Number]})
|
|
-const emit = defineEmits(['update:modelValue', 'change', 'appendClick', 'appendInnerClick', 'enter', 'focused'])
|
|
|
|
|
|
+const emit = defineEmits(['update:modelValue', 'change', 'appendClick', 'appendInnerClick', 'enter'])
|
|
const item = props.item
|
|
const item = props.item
|
|
const value = ref(props.modelValue)
|
|
const value = ref(props.modelValue)
|
|
const searchDebouncedTime = item?.searchDebouncedTime === 0 ? ref(0) : ref(500)
|
|
const searchDebouncedTime = item?.searchDebouncedTime === 0 ? ref(0) : ref(500)
|
|
@@ -69,10 +67,6 @@ const handleKeyup = () => {
|
|
emit('enter', value.value)
|
|
emit('enter', value.value)
|
|
}
|
|
}
|
|
|
|
|
|
-const focusedEvent = (focused) => { // Emitted when the input is focused or blurred
|
|
|
|
- emit('focused', focused, value.value)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const handleWheel = (event, item) => {
|
|
const handleWheel = (event, item) => {
|
|
if (item.type !== 'number') return
|
|
if (item.type !== 'number') return
|
|
event.preventDefault()
|
|
event.preventDefault()
|