Skip to content

Commit 5609884

Browse files
committed
Resolve #162, add props.name check in formField(handleInput)
1 parent 75f1a44 commit 5609884

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/widgets/form-field.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const componentItem = computed(() => getFieldType(props.type));
3939
const parentForm = Form.getParentForm();
4040
4141
function handleInput(value: any) {
42-
if (input) input.setValue?.(value);
42+
if (input && props.name) input.setValue?.(value);
4343
emit('update:modelValue', value)
4444
}
4545

src/widgets/inputs/input-date/widget-calendar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div class="widget-calendar">
33
<div class="widget-calendar-navigation">
4-
<input-field v-model="month" type="select" :options="arrayMonths" placeholder="Month"/>
5-
<input-field v-model="year" type="select" :options="arrayYears" placeholder="Year"/>
4+
<form-field v-model="month" type="select" :options="arrayMonths" placeholder="Month"/>
5+
<form-field v-model="year" type="select" :options="arrayYears" placeholder="Year"/>
66
</div>
77
<div class="widget-calendar-board">
88
<div class="widget-calendar-board-header">
@@ -34,7 +34,7 @@
3434
</template>
3535

3636
<script setup lang="ts">
37-
import {InputField} from "../../../index";
37+
import {FormField} from "../../../index";
3838
import {computed, ref} from "vue";
3939
import STORE from "../../../config/store";
4040
import {IOptionRowWithLabel} from "../../../types";

0 commit comments

Comments
 (0)