Skip to content

Commit

Permalink
fix(footer): add custom props to show footer when images == 1
Browse files Browse the repository at this point in the history
  • Loading branch information
pexea12 committed Oct 5, 2020
1 parent e77d3d3 commit 1ced4b7
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 208 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ How to use:
<td>Next</td>
<td>Text for the next thumb image button</td>
</tr>
<tr>
<td>showFooterCount</td>
<td>Boolean</td>
<td>true</td>
<td>Show footer count</td>
</tr>
</tbody>
</table>

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-image-lightbox",
"description": "A Vue.js package to display an image gallery lightbox",
"version": "7.1.3",
"version": "7.2.0",
"author": "Nguyen P. Thien Dzung <dzungnguyenvn@outlook.com>",
"license": "MIT",
"main": "dist/vue-image-lightbox.min.js",
Expand Down Expand Up @@ -50,14 +50,14 @@
"optimize-css-assets-webpack-plugin": "5.0.3",
"rimraf": "^3.0.2",
"style-loader": "^1.0.0",
"terser-webpack-plugin": "^2.3.5",
"terser-webpack-plugin": "^4.2.2",
"url-loader": "^4.0.0",
"vue": "^2.6.10",
"vue-loader": "^15.9.1",
"vue-template-compiler": "^2.6.10",
"webpack": "4.43.0",
"webpack": "4.44.2",
"webpack-cli": "3.3.11",
"webpack-dev-server": "3.10.3"
"webpack-dev-server": "3.11.0"
},
"vetur": {
"tags": "dist/vetur/tags.json",
Expand Down
9 changes: 7 additions & 2 deletions src/components/LightBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@beforeLeave="disableImageTransition"
>
<div
v-if="media && media.length > 0"
v-if="media"
v-show="lightBoxOn"
ref="container"
class="vue-lb-container"
Expand Down Expand Up @@ -75,8 +75,8 @@
<div class="vue-lb-footer">
<div class="vue-lb-footer-info" />
<div
v-if="media.length > 1"
class="vue-lb-footer-count"
v-show="showFooterCount"
>
<slot
name="footer"
Expand Down Expand Up @@ -219,6 +219,11 @@ export default {
default: true,
},
showFooterCount: {
type: Boolean,
default: true,
},
// Mode
autoPlay: {
type: Boolean,
Expand Down
Loading

0 comments on commit 1ced4b7

Please sign in to comment.