Skip to content

Commit 0564635

Browse files
authored
Merge pull request #64 from mudin/master
closable option is added
2 parents 6691a49 + a157534 commit 0564635

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ How to use:
155155
<td>0</td>
156156
<td>Minimum length unto end to emit load more event</td>
157157
</tr>
158+
<tr>
159+
<td>closable</td>
160+
<td>Boolean</td>
161+
<td>true</td>
162+
<td>Display the close button at the right top corner or not. ESC clicking-close will also be disabled if closable is set to false.</td>
163+
</tr>
158164
<tr>
159165
<td>closeText</td>
160166
<td>String</td>

src/components/script.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export default {
2424
default: true,
2525
},
2626

27+
closable: {
28+
type: Boolean,
29+
default: true,
30+
},
31+
2732
startAt: {
2833
type: Number,
2934
default: 0,
@@ -216,6 +221,7 @@ export default {
216221
},
217222

218223
closeLightBox() {
224+
if(!this.closable) return;
219225
this.$set(this, 'lightBoxOn', false)
220226
},
221227

src/components/template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
type="button"
1313
:title="closeText"
1414
class="vue-lb-button-close"
15+
v-if="closable"
1516
>
1617
<slot name="close">
1718
<span>

0 commit comments

Comments
 (0)