Skip to content

Commit 9f6f449

Browse files
committed
体調記録後に値をクリアし、コンポーネントを再レンダリングするようにkey属性を追加
1 parent dd38724 commit 9f6f449

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pages/center/_centerId/patient/_patientId.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
<li class="conditionItem">
137137
<InputNumberField
138138
id="temperature"
139+
:key="`temperature-${recordElementKey}`"
139140
v-model="inputTemperature"
140141
name="temperature"
141142
label="体温"
@@ -151,6 +152,7 @@
151152
<li class="conditionItem">
152153
<InputNumberField
153154
id="spo2"
155+
:key="`spo2-${recordElementKey}`"
154156
v-model="inputSpO2"
155157
name="spo2"
156158
label="酸素飽和度(SpO2)"
@@ -164,6 +166,7 @@
164166
<li class="conditionItem">
165167
<InputNumberField
166168
id="pulse"
169+
:key="`pulse-${recordElementKey}`"
167170
v-model="inputPulse"
168171
name="pulse"
169172
label="脈拍"
@@ -185,6 +188,7 @@
185188
class="symptomsItem"
186189
>
187190
<CheckboxField
191+
:key="`checkbox-${index}-${recordElementKey}`"
188192
v-model="inputSymptom[item.label]"
189193
:name="item.name"
190194
:label="item.label"
@@ -269,6 +273,7 @@ export default class PatientId extends Vue {
269273
isEditDisabled = true
270274
currentMemoValue = ''
271275
showModalRecord = false
276+
recordElementKey = 0
272277
showModalDownload = false
273278
zipPassword = ''
274279
zipPasswordReEnter = ''
@@ -429,6 +434,8 @@ export default class PatientId extends Vue {
429434
() => {
430435
this.formMessage = '体調記録を登録しました'
431436
this.createdStatus = true
437+
this.clearRecordValue()
438+
this.recordElementKey++
432439
},
433440
(error) => {
434441
this.loading = false

0 commit comments

Comments
 (0)