我有几个表单元素,我想要检索它并发布它。
我只会使用一个字段,我无法与v-model
<template>
<div class="col-lg-2">
<label for="fightDuration">{{ translations.fightDuration }}</label>
<i class="icon-help" data-popup="tooltip" title="" data-placement="right"
:data-original-title=translations.fightDurationTooltip></i>
<div class="input-group">
<input class="form-control fightDuration ui-timepicker-input"
id="fightDuration" name="fightDuration" type="text"
autocomplete="off"
v-model="info.fightDuration">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
</div>
<template>
<script>
export default {
data() {
return {
info: {
fightDuration: null,
... // more fields here
}
}
},
mounted: function () {
this.info.fightDuration = this.setting.fightDuration;
... // more fields here
}
当我在输入中更改fightDuration值时,字段值不会改变,为什么会发生?