【发布时间】:2019-11-26 02:13:31
【问题描述】:
除了按回车键外,一切正常都需要帮助。 我有форму ввода v-checkbox
<v-expansion-panel>
<v-expansion-panel-header disable-icon-rotate @click="editingTarget" class="headerHeight">
<span class="title"> {{description.targets}}</span>
<template v-slot:actions>
<v-btn fab small>
<v-icon v-if="isEditing.target">mdi-close</v-icon>
<v-icon v-else>mdi-pencil</v-icon>
</v-btn>
</template>
</v-expansion-panel-header>
<p class="subtitle-1 px-6" style="opacity: 0.9" v-if="(profileDetails) && (!isEditing.target)">
{{profileDetails.target}}</p>
<v-expansion-panel-content
>
<v-row>
<v-col xs="12"
md="6"
lg="6"
v-for="(item, i) in valueCheckBox"
:key="i"
class="colCheckBox"
>
<div style="width: 250px">
<v-checkbox v-model="checkBox" :value="item.value">
<template v-slot:label>
<div class="check-box-custom">
<span class="font-weight-regular">{{item.value}}</span>
</div>
</template>
</v-checkbox>
</div>
</v-col>
</v-row>
<v-card-actions>
<div class="flex-grow-1"></div>
<v-btn
color="blue lighten-1"
@click="$emit('close-panel', []); save()"
>
Save
</v-btn>
</v-card-actions>
</v-expansion-panel-content>
</v-expansion-panel>
如果我在表单上输入任何信息我会成功但没有表单,我没有“输入”、“表单”
methods: {
...mapActions(['editAbout']),
save() {
this.isEditing.target = false
const target = this.checkBox.join(", ")
if (target !== profileDetails.target) {
const obj = {
name: 'target',
profileDet: {
id: profileDetails.id,
target: target
}
}
this.editAbout(obj)
}
},
什么只是没有尝试?!我想一切,但不知何故我不能 我只是无法将事件附加到回车键 求助!!!
【问题讨论】:
-
您的代码中没有键盘处理程序。 vuejs.org/v2/guide/events.html#Key-Modifiers
-
我知道他们不是他们不工作!所以我删除了它们并来这里寻求建议。
标签: javascript vue.js vuetify.js