Skip to content

Commit a572214

Browse files
authored
Merge pull request #110 from pexea12/add-show-footer
fix(footer): add custom props to show footer when images == 1
2 parents e77d3d3 + 1ced4b7 commit a572214

File tree

4 files changed

+248
-208
lines changed

4 files changed

+248
-208
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ How to use:
205205
<td>Next</td>
206206
<td>Text for the next thumb image button</td>
207207
</tr>
208+
<tr>
209+
<td>showFooterCount</td>
210+
<td>Boolean</td>
211+
<td>true</td>
212+
<td>Show footer count</td>
213+
</tr>
208214
</tbody>
209215
</table>
210216

package.json

+4-4
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": "7.1.3",
4+
"version": "7.2.0",
55
"author": "Nguyen P. Thien Dzung <[email protected]>",
66
"license": "MIT",
77
"main": "dist/vue-image-lightbox.min.js",
@@ -50,14 +50,14 @@
5050
"optimize-css-assets-webpack-plugin": "5.0.3",
5151
"rimraf": "^3.0.2",
5252
"style-loader": "^1.0.0",
53-
"terser-webpack-plugin": "^2.3.5",
53+
"terser-webpack-plugin": "^4.2.2",
5454
"url-loader": "^4.0.0",
5555
"vue": "^2.6.10",
5656
"vue-loader": "^15.9.1",
5757
"vue-template-compiler": "^2.6.10",
58-
"webpack": "4.43.0",
58+
"webpack": "4.44.2",
5959
"webpack-cli": "3.3.11",
60-
"webpack-dev-server": "3.10.3"
60+
"webpack-dev-server": "3.11.0"
6161
},
6262
"vetur": {
6363
"tags": "dist/vetur/tags.json",

src/components/LightBox.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@beforeLeave="disableImageTransition"
88
>
99
<div
10-
v-if="media && media.length > 0"
10+
v-if="media"
1111
v-show="lightBoxOn"
1212
ref="container"
1313
class="vue-lb-container"
@@ -75,8 +75,8 @@
7575
<div class="vue-lb-footer">
7676
<div class="vue-lb-footer-info" />
7777
<div
78-
v-if="media.length > 1"
7978
class="vue-lb-footer-count"
79+
v-show="showFooterCount"
8080
>
8181
<slot
8282
name="footer"
@@ -219,6 +219,11 @@ export default {
219219
default: true,
220220
},
221221
222+
showFooterCount: {
223+
type: Boolean,
224+
default: true,
225+
},
226+
222227
// Mode
223228
autoPlay: {
224229
type: Boolean,

0 commit comments

Comments
 (0)