PowerMeter admin view: make the linter happy
* do not combine v-if and v-for * add v-bind:key to for loop of HTTPS+JSON power meter value configs
This commit is contained in:
parent
9911dec279
commit
3fe39d722c
@ -42,8 +42,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CardElement v-if="powerMeterConfigList.source === 0"
|
||||
v-for="(mqtt, index) in powerMeterConfigList.mqtt.values"
|
||||
<!-- yarn linter wants us to not combine v-if with v-for, so we need to wrap the CardElements //-->
|
||||
<div v-if="powerMeterConfigList.source === 0">
|
||||
<CardElement
|
||||
v-for="(mqtt, index) in powerMeterConfigList.mqtt.values" v-bind:key="index"
|
||||
:text="$t('powermeteradmin.MqttValue', { valueNumber: index + 1})"
|
||||
textVariant="text-bg-primary"
|
||||
add-space>
|
||||
@ -81,6 +83,7 @@
|
||||
type="checkbox"
|
||||
wide />
|
||||
</CardElement>
|
||||
</div>
|
||||
|
||||
<CardElement v-if="(powerMeterConfigList.source === 1 || powerMeterConfigList.source === 2)"
|
||||
:text="$t('powermeteradmin.SDM')"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user