Skip to content

仿微信js-sdk wx.previewImage javascript实现,支持图片预览,滑动切换,双指缩放,图片缓存;Support for picture preview, slide switch, double finger zoom, picture caching

Notifications You must be signed in to change notification settings

Starry-voyage/previewImage-mobile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

previewImage-mobile

仿微信js-sdk wx.previewImage javascript实现,支持图片预览,滑动切换,双指缩放,图片缓存;

it's a plugin previewImage for mobile html5 which support for picture preview, slide switch, double finger zoom, picture caching

Usage

Import dist/previewImage.min.js to your project:

    <script src="dist/previewImage.min.js"></script>
    <script>
        var obj = {
                urls : ['1.png','2.png','3.png'],
                current : '1.png'
            };
      previewImage.start(obj);
    </script>

And you can import dist/md5.js to your project,if imported it is uesd to get the hash for md5(image.src) else the hash is image.src;

    <script src="dist/md5.js"></script>
    <script src="dist/previewImage.min.js"></script>
    <script>
        var obj = {
                urls : ['1.png','2.png','3.png'],
                current : '1.png'
            };
      previewImage.start(obj);
    </script>

Demo

Demo

About

仿微信js-sdk wx.previewImage javascript实现,支持图片预览,滑动切换,双指缩放,图片缓存;Support for picture preview, slide switch, double finger zoom, picture caching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.4%
  • HTML 7.6%