Skip to content

Commit 0671ba0

Browse files
authored
Merge pull request #76 from pexea12/feat-alt
Feat alt for image
2 parents 0564635 + 98f77c3 commit 0671ba0

8 files changed

+1292
-855
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ The previous button on the thumbs list.
270270
#### nextThumb
271271
The next button on the thumbs list.
272272

273+
#### customCaption
274+
The caption of the current image.
275+
273276
### Events
274277

275278
- `onOpened(value)`: `true` to emit when the lightbox is opened and `false` when it is closed.
@@ -288,3 +291,6 @@ Most of the CSS belongs to [react-images](https://github.com/jossmac/react-image
288291
- [@jstr14](https://github.com/jstr14)
289292
- [@PedroBatista333](https://github.com/PedroBatista333)
290293
- [@vtalbot](https://github.com/vtalbot)
294+
- [@hasangilak](https://github.com/hasangilak)
295+
- [@neobutter](https://github.com/neobutter)
296+
- [@mudin](https://github.com/mudin)

build/webpack.base.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ module.exports = {
6767
{ from: 'src/vetur', to: 'vetur' }
6868
])
6969
],
70-
}
70+
}

build/webpack.prod.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ config.plugins = (config.plugins || []).concat([
2929
new UglifyJSPlugin({
3030
sourceMap: true,
3131
uglifyOptions: {
32+
warnings: false,
3233
compress: {
33-
warnings: false,
3434
drop_debugger: true,
3535
drop_console: true,
3636
global_defs: {

package.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-image-lightbox",
33
"description": "A Vue.js package to display an image gallery lightbox",
4-
"version": "6.3.1",
4+
"version": "6.4.0",
55
"author": "Nguyen Thien Dzung <[email protected]>",
66
"license": "MIT",
77
"main": "dist/vue-image-lightbox.min.js",
@@ -31,32 +31,32 @@
3131
},
3232
"homepage": "https://github.com/pexea12/vue-image-lightbox",
3333
"dependencies": {
34-
"@babel/runtime": "^7.4.3",
35-
"babel-loader": "^8.0.5",
34+
"@babel/runtime": "^7.5.5",
35+
"babel-loader": "^8.0.6",
3636
"hammerjs": "^2.0.8",
37-
"vue-lazyload": "^1.2.6"
37+
"vue-lazyload": "^1.3.2"
3838
},
3939
"devDependencies": {
40-
"@babel/core": "^7.4.3",
41-
"@babel/plugin-transform-runtime": "^7.4.3",
42-
"@babel/preset-env": "^7.4.3",
40+
"@babel/core": "^7.5.5",
41+
"@babel/plugin-transform-runtime": "^7.5.5",
42+
"@babel/preset-env": "^7.5.5",
4343
"copy-webpack-plugin": "^5.0.4",
44-
"css-loader": "2.1.1",
45-
"eslint": "5.16.0",
46-
"file-loader": "^1.1.11",
44+
"css-loader": "3.2.0",
45+
"eslint": "6.3.0",
46+
"file-loader": "^4.2.0",
4747
"html-webpack-plugin": "^3.2.0",
48-
"mini-css-extract-plugin": "^0.4.0",
49-
"optimize-css-assets-webpack-plugin": "5.0.1",
50-
"rimraf": "^2.6.2",
51-
"style-loader": "^0.21.0",
52-
"uglifyjs-webpack-plugin": "^1.2.5",
53-
"url-loader": "^1.0.1",
54-
"vue": "^2.5.22",
55-
"vue-loader": "^15.3.0",
56-
"vue-template-compiler": "^2.5.22",
57-
"webpack": "^4.16.5",
58-
"webpack-cli": "^3.0.8",
59-
"webpack-dev-server": "^3.1.11"
48+
"mini-css-extract-plugin": "^0.8.0",
49+
"optimize-css-assets-webpack-plugin": "5.0.3",
50+
"rimraf": "^3.0.0",
51+
"style-loader": "^1.0.0",
52+
"uglifyjs-webpack-plugin": "^2.2.0",
53+
"url-loader": "^2.1.0",
54+
"vue": "^2.6.10",
55+
"vue-loader": "^15.7.1",
56+
"vue-template-compiler": "^2.6.10",
57+
"webpack": "^4.39.3",
58+
"webpack-cli": "^3.3.7",
59+
"webpack-dev-server": "^3.8.0"
6060
},
6161
"vetur": {
6262
"tags": "dist/vetur/tags.json",

src/components/template.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
:src="images[select].src"
3838
:srcset="images[select].srcset || ''"
3939
class="vue-lb-modal-image"
40+
:alt="images[select].caption"
4041
>
4142
</transition>
4243

43-
<slot name="custom-caption">
44+
<slot name="customCaption">
4445
<div
4546
class="vue-lb-info"
4647
v-html="images[select].caption"
@@ -52,8 +53,8 @@
5253
<div class="vue-lb-footer-info"></div>
5354
<div class="vue-lb-footer-count">
5455
<slot name="footer"
55-
:current="select + 1"
56-
:total="images.length"
56+
:current="select + 1"
57+
:total="images.length"
5758
>
5859
{{ select + 1 }} / {{ images.length }}
5960
</slot>

src/vetur/attributes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@
6363
"description": "Text for the next thumb image button",
6464
"type": "string"
6565
}
66-
}
66+
}

src/vetur/tags.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
"subtags": [],
2222
"description": "LightBox component"
2323
}
24-
}
24+
}

0 commit comments

Comments
 (0)