fix: statusCard prevent event bubbling (#245)

This commit is contained in:
Chris 2022-11-30 14:35:12 +08:00 committed by GitHub
parent 4a96d2b45a
commit e76aac3b56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -31,7 +31,7 @@ async function vote(e: Event) {
<template>
<div flex flex-col w-full items-stretch gap-3>
<form v-if="!poll.voted && !poll.expired" flex flex-col gap-4 accent-primary @submit.prevent="vote">
<form v-if="!poll.voted && !poll.expired" flex flex-col gap-4 accent-primary @click.stop="noop" @submit.prevent="vote">
<label v-for="(option, index) of poll.options" :key="index" flex items-center gap-2 px-2>
<input name="choices" :value="index" :type="poll.multiple ? 'checkbox' : 'radio'">
{{ option.title }}

View file

@ -24,3 +24,5 @@ export function emojisArrayToObject(emojis: Emoji[]) {
return Object.fromEntries(emojis.map(i => [i.shortcode, i]))
}
export function noop() {}