zero input
This commit is contained in:
parent
2b16fb754f
commit
fb44be6804
|
@ -50,6 +50,9 @@ const form_refs = {
|
|||
}
|
||||
|
||||
const changeParametres = () => {
|
||||
if(form_state.total_length * 1000 < parametric.length.min) {
|
||||
return
|
||||
}
|
||||
const lamelles = Math.floor(form_state.height / parametric.height.step)
|
||||
|
||||
for (const key in form_state) {
|
||||
|
@ -99,12 +102,6 @@ const changeParametres = () => {
|
|||
if (form_state.extra_section && form_state.extra_section < parametric.length.min) {
|
||||
form_refs.total_length.value.setCustomValidity('Расчет невозможен')
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (form_state.total_length < parametric.total_length.min) {
|
||||
form_state.total_length = parametric.total_length.min
|
||||
form_state.length = parametric.length.min
|
||||
}
|
||||
}, 600)
|
||||
|
||||
total_length.value = form_state.total_length
|
||||
lamelles_count.value = lamelles
|
||||
|
@ -200,9 +197,10 @@ const plurals = {
|
|||
{{ section_count }}
|
||||
<Plural :n="section_count" :forms="plurals.section" /> по
|
||||
{{ form_state.length.toFixed(2) }}{{ '\xa0' }}мм<template v-if="form_state.extra_section">
|
||||
и 1 дополнительная секция длиной {{ form_state.extra_section.toFixed(2) }}{{ '\xa0' }}мм</template>.
|
||||
и 1 дополнительная секция длиной {{ form_state.extra_section.toFixed(2) }}{{ '\xa0'
|
||||
}}мм</template>.
|
||||
</p>
|
||||
<p>
|
||||
<p v-if="parametric.length.min <= form_state.total_length * 1000">
|
||||
Всего <template v-if="!form_state.remove_pillar">
|
||||
{{ section_count + ~~(!!form_state.extra_section) + 1 }}
|
||||
<Plural :forms="plurals.fence" :n="section_count + ~~(!!form_state.extra_section) + 1" />,
|
||||
|
|
|
@ -63,7 +63,7 @@ if (extra.value) {
|
|||
pillar_one_pos.value = (extra.value as number) * -0.5 - 0.015
|
||||
pillar_two_pos.value = (extra.value as number) * 0.5 + pillar_size + bSize - 0.01
|
||||
}
|
||||
watch([section_count, fence_section, extra_section], (s) => {
|
||||
watch([section_count, fence_section, extra_section], () => {
|
||||
extra.value = (extra_section.value && props.index == (section_count.value + 1)) ? extra_section.value * 0.001 : false
|
||||
if (extra_section && props.index == (section_count.value + 1)) {
|
||||
pillar_one_pos.value = (extra.value as number) * -0.5 - 0.015
|
||||
|
|
Loading…
Reference in New Issue