diff --git a/components/calcValues.vue b/components/calcValues.vue index 1aab197..ac898c3 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -15,6 +15,12 @@ const extra_section = use_extra_section() const total_length = use_total_length() const min_length = use_min_length() +if (!pillar_color.value) { + const r = Math.floor(Math.random() * predefPillarColors.length) + pillar_color.value = predefPillarColors[r] as ralTypes + lamelle_color.value = predefLamelleColors[r] as ralTypes +} + const parametric = reactive({ length: { min: min_length.value, @@ -130,7 +136,7 @@ watch(() => form_state, changeParametres, { deep: true }) const isModalOpen = useState('modal_open', () => false) const toggleModal = () => { isModalOpen.value = !isModalOpen.value - if(isModalOpen.value == true) { + if (isModalOpen.value == true) { document.body.classList.add('modal-opened') } else { document.body.classList.remove('modal-opened') @@ -187,7 +193,8 @@ const goal = (target: string, params: object) => {
- Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший размер, чтобы продолжить. + Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший + размер, чтобы продолжить.
Внимание! Дополнительная секция приводит к увеличению стоимости.
diff --git a/composables/useCalc.ts b/composables/useCalc.ts
index c8badf7..c11aef2 100644
--- a/composables/useCalc.ts
+++ b/composables/useCalc.ts
@@ -5,13 +5,13 @@ export const predefLamelleColors = ['3009', '9003', '6027', '5024', '9001', '101
const n = 2
const min = 1300
-const random_pair = Math.floor(Math.random() * predefPillarColors.length)
+
export const use_lamelle_height = () => useState