新增 ImagePreview;Dialog国际化&单元测试#244
Merged
oasis-cloud merged 5 commits intojdf2e:mainfrom Aug 30, 2022
yangjinjun3:main
Merged
Conversation
irisSong
reviewed
Aug 29, 2022
| | videos | 预览的视频数组(视频自动放到图片之前、taro场景暂不支持) | Array<`Object`> | [] | ||
| | images | 预览图片数组 | { src: String }[] | [] | ||
| | autoplay | 自动轮播时长,0表示不会自动轮播 | Number、String | 3000 | | ||
| | init-no | 初始页码 | Number | 1 |
| | videos | Videos Array(Videos are before images, not support in taro) | Array<`Object`> | [] | ||
| | images | Images array | Array<`String`> | [] | ||
| | autoplay | Autoplay time, zero means not autoplay | Number、String | 3000 | | ||
| | init-no | Init no | Number | 1 |
| return ( | ||
| <> | ||
| <ImagePreview images={images} show={showPreview1} > | ||
| <Cell title="展示图片预览" isLink={true} > |
| }) | ||
| const [lastTouchEndTime, setLastTouchEndTime] = useState(0) // 用来辅助监听双击 | ||
|
|
||
| const any) => { |
Collaborator
There was a problem hiding this comment.
类型event: React.TouchEvent
| const [eleImg, setEleImg] = useState(null) | ||
| const [active, setActive] = useState(1) | ||
| const [maxNo, setMaxNo] = useState(1) | ||
| const [options, setOptions] = useState({ |
|
|
||
| // event.preventDefault(); | ||
|
|
||
| const store1 = store as any |
Collaborator
There was a problem hiding this comment.
已知类型,尽量不要any
interface IStore {
scale: number
moveable: boolean
oriDistance: number
originScale: number
}
const store1 = store as IStore
oasis-cloud
reviewed
Aug 29, 2022
| const nutImagePreview = useRef(null) | ||
|
|
||
| const [showPop, setShowPop] = useState(false) | ||
| const [eleImg, setEleImg] = useState(null) |
Collaborator
There was a problem hiding this comment.
eleImg 没有用到,是不是 setEleImg 也没什么用?
Collaborator
|
适当修正 any 的使用 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增 ImagePreview;
Dialog国际化&单元测试