Vuejs2 如何在vue select中设置阻止事件;
在带有“vue选择”的我的Laravel 5.8/vuejs 2.6应用程序中:“^2.6.4”IVuejs2 如何在vue select中设置阻止事件;,vuejs2,vue-select,Vuejs2,Vue Select,在带有“vue选择”的我的Laravel 5.8/vuejs 2.6应用程序中:“^2.6.4”I 选择选项时设置操作,但我有两个问题: 1) 似乎在打开的页面上触发了操作 2) 当我选择选项时,会触发两次操作。 3) 我试图设置。阻止: <v-select v-model="selection_forum_post_action" :options="forumPostActionValueArray" id="forum_post_action" nam
选择选项时设置操作,但我有两个问题: 1) 似乎在打开的页面上触发了操作 2) 当我选择选项时,会触发两次操作。 3) 我试图设置。阻止:
<v-select
v-model="selection_forum_post_action"
:options="forumPostActionValueArray"
id="forum_post_action"
name="forum_post_action"
class="form-control editable_field"
placeholder="Select action"
@change.prevent="forumPostActionSelected(nextThreadPost.id, nextThreadPost.body, nextThreadPost.creator_name)"
></v-select>
我尝试了几种变体,但都失败了。
请举例说明…我发现@input对我来说很有用:
<v-select
v-model="selection_forum_post_action"
:options="forumPostActionValueArray"
id="forum_post_action"
name="forum_post_action"
class="form-control editable_field"
placeholder="Select action"
@input="forumPostActionSelected(nextThreadPost.id, nextThreadPost.body, nextThreadPost.creator_name)"
></v-select>
<v-select
v-model="selection_forum_post_action"
:options="forumPostActionValueArray"
id="forum_post_action"
name="forum_post_action"
class="form-control editable_field"
placeholder="Select action"
@input="forumPostActionSelected(nextThreadPost.id, nextThreadPost.body, nextThreadPost.creator_name)"
></v-select>