File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/taro-ui/src/components/image-picker Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import classNames from 'classnames'
2
2
import PropTypes , { InferProps } from 'prop-types'
3
3
import React from 'react'
4
4
import { Image , View } from '@tarojs/components'
5
+ import { ITouchEvent } from '@tarojs/components/types/common'
5
6
import Taro from '@tarojs/taro'
6
7
import { AtImagePickerProps , File } from '../../../types/image-picker'
7
8
import { uuid } from '../../common/utils'
@@ -82,7 +83,9 @@ export default class AtImagePicker extends React.Component<AtImagePickerProps> {
82
83
this . props . onImageClick ( idx , this . props . files [ idx ] )
83
84
}
84
85
85
- private handleRemoveImg = ( idx : number ) : void => {
86
+ private handleRemoveImg = ( idx : number , event : ITouchEvent ) : void => {
87
+ event . stopPropagation ( )
88
+ event . preventDefault ( )
86
89
const { files = [ ] } = this . props
87
90
if ( ENV === Taro . ENV_TYPE . WEB ) {
88
91
window . URL . revokeObjectURL ( files [ idx ] . url )
You can’t perform that action at this time.
0 commit comments