images-viewer-js 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -48,18 +48,20 @@ const viewer4 = new ImagesViewer({
48
48
  {
49
49
  url: 'https://example.com/image1.jpg',
50
50
  title: 'Landscape Image',
51
+ // title: (currentImage, index) => {
52
+ // return `图片${index + 1}`;
53
+ // },
51
54
  thumbnail: 'https://example.com/thumb1.jpg',
52
- category: 'nature'
53
55
  },
54
56
  {
55
57
  url: 'https://example.com/image2.jpg',
56
58
  title: 'Architecture Image',
57
59
  thumbnail: 'https://example.com/thumb2.jpg',
58
- category: 'architecture'
59
60
  }
60
61
  ]
61
62
  });
62
63
  ```
64
+ ### images in `url`, `title`, `thumbnail` Support function format: (currentImage, index) => string
63
65
 
64
66
  ### npm
65
67
 
package/README.md CHANGED
@@ -48,18 +48,21 @@ const viewer4 = new ImagesViewer({
48
48
  {
49
49
  url: 'https://example.com/image1.jpg',
50
50
  title: '风景图片',
51
+ // title: (currentImage, index) => {
52
+ // return `图片${index + 1}`;
53
+ // },
51
54
  thumbnail: 'https://example.com/thumb1.jpg',
52
- category: 'nature'
53
55
  },
54
56
  {
55
57
  url: 'https://example.com/image2.jpg',
56
58
  title: '建筑图片',
57
59
  thumbnail: 'https://example.com/thumb2.jpg',
58
- category: 'architecture'
59
60
  }
60
61
  ]
61
62
  });
63
+
62
64
  ```
65
+ ### images中`url` `title` `thumbnail` 支持函数格式((currentImage,Index) => string)
63
66
 
64
67
  ### npm
65
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "images-viewer-js",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "images-viewer-js一个功能丰富的图片查看器,支持缩放、旋转、导航等操作。原生javascript实现。不局限于框架使用",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",