fix: unable to submit coordinate values (#878)
This commit is contained in:
1 parent
5f8f0469e0
commit
e7b281739b
2 files changed
+71
-64
No files matched your search
@@ -1,28 +1,30 @@
|
||||
<template>
|
||||
<v-text-field
|
||||
v-model="position"
|
||||
:label="`[ ${label} ]`"
|
||||
:suffix="suffix"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
:error="!validate"
|
||||
hide-details="auto"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
outlined
|
||||
reverse
|
||||
dense
|
||||
@blur="onBlur"
|
||||
@focus="!readonly ? $event.target.select() : {}">
|
||||
<template v-if="errorMsg.length" #append>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-icon color="error" v-bind="attrs" v-on="on">{{ mdiAlert }}</v-icon>
|
||||
</template>
|
||||
<span>{{ errorMsg.join(', ') }}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</v-text-field>
|
||||
<form @submit.prevent="submit">
|
||||
<v-text-field
|
||||
v-model="position"
|
||||
:label="`[ ${label} ]`"
|
||||
:suffix="suffix"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
:error="!validate"
|
||||
hide-details="auto"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
outlined
|
||||
reverse
|
||||
dense
|
||||
@blur="onBlur"
|
||||
@focus="!readonly ? $event.target.select() : {}">
|
||||
<template v-if="errorMsg.length" #append>
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-icon color="error" v-bind="attrs" v-on="on">{{ mdiAlert }}</v-icon>
|
||||
</template>
|
||||
<span>{{ errorMsg.join(', ') }}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -67,6 +69,10 @@ export default class MoveToInput extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
|
||||
submit(): void {
|
||||
this.$emit('submit')
|
||||
}
|
||||
|
||||
get validate(): boolean {
|
||||
const isValid =
|
||||
this.position !== '' &&
|
||||
|
||||
Reference in new issue
Block a user