add pic preview in ticketnote
parent
ab52ffe7ae
commit
4d6eca0434
|
|
@ -3,6 +3,7 @@ import { Component, ReactNode } from 'react';
|
|||
import { TicketNote, StatusStr } from '@/pages/TicketDetail/TicketNote';
|
||||
import pt from '@/plain-text';
|
||||
import { timeFormat } from '@/utils';
|
||||
import Taro from '@tarojs/taro';
|
||||
import './NoteCard.scss';
|
||||
|
||||
interface NoteCardProps {
|
||||
|
|
@ -38,6 +39,13 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
|
|||
break;
|
||||
}
|
||||
|
||||
const showPicDetail = (url: string) => {
|
||||
Taro.previewImage({
|
||||
current: url,
|
||||
urls: [url],
|
||||
});
|
||||
};
|
||||
|
||||
const notePicRenderer = (
|
||||
<View>
|
||||
<View className='at-row' style={{ marginLeft: '30rpx' }}>
|
||||
|
|
@ -47,6 +55,7 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
|
|||
style='width: 160rpx; height: 160rpx;'
|
||||
src={url}
|
||||
mode='aspectFit'
|
||||
onClick={showPicDetail.bind(this, url)}
|
||||
/>
|
||||
</View>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Reference in New Issue