Fixed #4249 - Image: preview button is missing type="button" and submits forms by default

pull/4258/head
Tuğçe Küçükoğlu 2023-08-09 15:58:38 +03:00
parent b3afbb350b
commit 5ba60badc6
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<slot name="image" :onError="onError">
<img :style="imageStyle" :class="[cx('image'), imageClass]" @error="onError" v-bind="{ ...$attrs, ...ptm('image') }" />
</slot>
<button v-if="preview" ref="previewButton" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
<button v-if="preview" ref="previewButton" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
<slot name="indicatoricon">
<component :is="indicatorIcon ? 'i' : 'EyeIcon'" :class="cx('icon')" v-bind="ptm('icon')" />
</slot>