mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
fix(ImagePreview): close event triggered twice (#5411)
This commit is contained in:
@@ -1,37 +1,25 @@
|
||||
<template>
|
||||
<demo-section>
|
||||
<demo-block :title="$t('basicUsage')">
|
||||
<van-button
|
||||
type="primary"
|
||||
@click="showImagePreview"
|
||||
>
|
||||
<van-button type="primary" @click="showImagePreview">
|
||||
{{ $t('button1') }}
|
||||
</van-button>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('button2')">
|
||||
<van-button
|
||||
type="primary"
|
||||
@click="showImagePreview(1)"
|
||||
>
|
||||
<van-button type="primary" @click="showImagePreview(1)">
|
||||
{{ $t('button2') }}
|
||||
</van-button>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('button3')">
|
||||
<van-button
|
||||
type="primary"
|
||||
@click="showImagePreview(0, 1000)"
|
||||
>
|
||||
<van-button type="primary" @click="showImagePreview(0, 3000)">
|
||||
{{ $t('button3') }}
|
||||
</van-button>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('componentCall')">
|
||||
<van-button
|
||||
type="primary"
|
||||
@click="componentCall"
|
||||
>
|
||||
<van-button type="primary" @click="componentCall">
|
||||
{{ $t('componentCall') }}
|
||||
</van-button>
|
||||
<van-image-preview
|
||||
@@ -112,7 +100,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "../../style/var";
|
||||
@import '../../style/var';
|
||||
|
||||
.demo-image-preview {
|
||||
background-color: @white;
|
||||
|
Reference in New Issue
Block a user