Skip to content

Commit 937df7d

Browse files
committed
fix hide bg option
1 parent 46d8769 commit 937df7d

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

dist/vue2-slideout-panel.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue2-slideout-panel v1.0.4 (https://github.com/officert/vue-slideout-panel)
2+
* vue2-slideout-panel v1.0.5 (https://github.com/officert/vue-slideout-panel)
33
* (c) 2018 Tim Officer
44
* Released under the MIT License.
55
*/
@@ -12089,6 +12089,11 @@ var vm = {
1208912089
return this.panels.filter(function (panel) {
1209012090
return panel.visible;
1209112091
}).length;
12092+
},
12093+
panelBgVisible: function panelBgVisible() {
12094+
return this.panels.filter(function (panel) {
12095+
return panel.hideBg;
12096+
}).length === 0;
1209212097
}
1209312098
},
1209412099
methods: {
@@ -12267,7 +12272,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
1226712272
attrs: {
1226812273
"name": "fadeIn"
1226912274
}
12270-
}, [(_vm.panelsVisible) ? _c('div', {
12275+
}, [(_vm.panelsVisible && _vm.panelBgVisible) ? _c('div', {
1227112276
staticClass: "slideout-panel-bg",
1227212277
on: {
1227312278
"click": _vm.onBgClicked

dist/vue2-slideout-panel.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs-src/components/Home/index.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
</template>
33

44
<script>
5-
import {
6-
vueSlideoutPanelService
7-
} from '../../../src/index';
8-
95
export default {
106
name: 'home',
117
data() {
@@ -34,7 +30,7 @@ export default {
3430
return;
3531
}
3632
37-
this.panel1Handle = vueSlideoutPanelService.show({
33+
this.panel1Handle = this.$showPanel({
3834
width: '700px',
3935
cssClass: 'panel-1-custom-class',
4036
component: 'panel-1',
@@ -50,7 +46,7 @@ export default {
5046
});
5147
},
5248
showPanel3() {
53-
const handle = vueSlideoutPanelService.show({
49+
const handle = this.$showPanel({
5450
width: 700,
5551
component: 'panel-3'
5652
});

docs-src/components/Panel1/index.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
</template>
33

44
<script>
5-
import {
6-
vueSlideoutPanelService
7-
} from '../../../src/index';
8-
95
export default {
106
name: 'panel-1',
117
props: {
@@ -24,7 +20,7 @@ export default {
2420
},
2521
methods: {
2622
showPanel2() {
27-
vueSlideoutPanelService.show({
23+
this.$showPanel({
2824
// openOn: 'left',
2925
component: 'panel-2',
3026
props: {

docs/docs.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue2-slideout-panel",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Lib for creating stackable panels using Vue JS",
55
"main": "dist/vue2-slideout-panel.js",
66
"scripts": {

src/components/SlideoutPanel/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const vm = {
2323
computed: {
2424
panelsVisible() {
2525
return this.panels.filter(panel => panel.visible).length;
26+
},
27+
panelBgVisible() {
28+
return this.panels.filter(panel => panel.hideBg).length === 0;
2629
}
2730
},
2831
methods: {

src/components/SlideoutPanel/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<transition name="fadeIn">
22
<div class="slideout-panel clearfix">
33
<transition name="fadeIn">
4-
<div class="slideout-panel-bg" v-on:click="onBgClicked" v-if="panelsVisible">
4+
<div class="slideout-panel-bg" v-on:click="onBgClicked" v-if="panelsVisible && panelBgVisible">
55
</div>
66
</transition>
77
<transition-group class="slideout-wrapper" tag="div" name="slideIn">

0 commit comments

Comments
 (0)