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