Skip to content

Commit c9dec68

Browse files
committed
bugfix handleLockScroll only when value is true
2 parents 8075b6c + 1de6793 commit c9dec68

File tree

11 files changed

+72
-21
lines changed

11 files changed

+72
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vue Final Modal
22

3-
<p align="center"><a href="https://hunterliu1003.github.io/vue-final-modal/" target="_blank" rel="noopener noreferrer"><img width="600" src="https://hunterliu1003.github.io/vue-final-modal/preview.png" alt="Vue Final Modal Logo"></a></p>
3+
<p align="center"><a href="https://hunterliu1003.github.io/vue-final-modal/" target="_blank" rel="noopener noreferrer"><img src="https://hunterliu1003.github.io/vue-final-modal/preview.png" alt="Vue Final Modal Logo"></a></p>
44

55
<p align="center">
66
<a href="https://npmcharts.com/compare/vue-final-modal?minimal=true"><img src="https://img.shields.io/npm/dm/vue-final-modal.svg?sanitize=true" alt="Downloads"></a>

dist/VueFinalModal.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/components/global/ShowCode.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template>
2+
<details>
3+
<summary class="outline-none">Show code</summary>
4+
<slot />
5+
</details>
6+
</template>

docs/content/en/examples/tailwind.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,39 @@ See [Tailwind Examples Source Code](https://github.com/hunterliu1003/vue-final-m
1212

1313
<tailwind-simple></tailwind-simple>
1414

15+
<show-code>
16+
17+
```vue
18+
<template>
19+
<div>
20+
<vue-final-modal
21+
v-model="showModal"
22+
classes="flex justify-center items-center"
23+
content-class="max-h-1/2 p-4 bg-white dark:bg-gray-900 border dark:border-gray-800 rounded overflow-auto"
24+
>
25+
<span class="text-2xl mb-2">Hello, world!</span>
26+
</vue-final-modal>
27+
<button @click="showModal = true">Simple</button>
28+
</div>
29+
</template>
30+
31+
<script>
32+
export default {
33+
data: () => ({
34+
showModal: false
35+
})
36+
}
37+
</script>
38+
39+
<style scoped>
40+
button {
41+
@apply mb-2 px-2 py-1 border rounded;
42+
}
43+
</style>
44+
```
45+
46+
</show-code>
47+
1548
## Set lockScroll to `false`
1649

1750
<tailwind-lock-scroll></tailwind-lock-scroll>
@@ -40,14 +73,10 @@ See [Tailwind Examples Source Code](https://github.com/hunterliu1003/vue-final-m
4073

4174
<tailwind-attach></tailwind-attach>
4275

43-
4476
## Custom vue-final-modal component
4577

46-
4778
TBD
4879

49-
5080
## Override style
5181

52-
5382
TBD

docs/tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
purge: {
3-
content: ['../example/src/components/**/*.vue']
3+
content: ['../example/src/components/**/*.vue', 'content/**/*.md']
44
},
55
theme: {
66
extend: {

example/src/components/basic/BasicOptions.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@
9494
<base-button @click="openAttach"
9595
>Attach to here and open modal</base-button
9696
>
97+
<p>click will:</p>
98+
<ul>
99+
<li>set "attach" to "true"</li>
100+
<li>set "lockScroll" to "false"</li>
101+
</ul>
97102
</div>
98103
</div>
99104
</template>
@@ -134,6 +139,7 @@ export default {
134139
openAttach() {
135140
this.attach = '#attach'
136141
this.showModal = true
142+
this.lockScroll = false
137143
}
138144
}
139145
}

example/src/components/tailwind/TailwindSimple.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
>
88
<span class="text-2xl mb-2">Hello, world!</span>
99
</vue-final-modal>
10-
<base-button @click="showModal = true">Simple</base-button>
10+
<button @click="showModal = true">Simple</button>
1111
</div>
1212
</template>
1313

@@ -18,3 +18,9 @@ export default {
1818
})
1919
}
2020
</script>
21+
22+
<style scoped>
23+
button {
24+
@apply mb-2 px-2 py-1 border rounded;
25+
}
26+
</style>

0 commit comments

Comments
 (0)