Skip to content

Commit 8250345

Browse files
committed
refactor: BasicOptions component
1 parent a31a2eb commit 8250345

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

example/src/components/basic/BasicOptions.vue

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22
<div class="pb-8">
33
<v-modal
44
v-model="showModal"
5-
v-bind="props"
5+
:ssr="ssr"
6+
:lockScroll="lockScroll"
7+
:hideOverlay="hideOverlay"
8+
:clickToClose="clickToClose"
9+
:escToClose="escToClose"
10+
:preventClick="preventClick"
11+
:transition="transition ? 'vfm' : ''"
12+
:overlay-transition="overlayTransition ? 'vfm' : ''"
13+
:z-index-auto="zIndexAuto"
14+
:z-index-base="zIndexBase"
15+
:z-index="allowZIndex ? zIndexBase : false"
16+
:attach="attach ? '#attach' : false"
17+
:focus-retain="focusRetain"
18+
:focus-trap="focusTrap"
619
@confirm="showModal = false"
720
@cancel="showModal = false"
821
>
@@ -136,26 +149,6 @@ const initData = () => ({
136149
137150
export default {
138151
data: initData,
139-
computed: {
140-
props() {
141-
return {
142-
ssr: this.ssr,
143-
lockScroll: this.lockScroll,
144-
hideOverlay: this.hideOverlay,
145-
clickToClose: this.clickToClose,
146-
escToClose: this.escToClose,
147-
preventClick: this.preventClick,
148-
transition: this.transition ? 'vfm' : '',
149-
overlayTransition: this.overlayTransition ? 'vfm' : '',
150-
zIndexAuto: this.zIndexAuto,
151-
zIndexBase: this.zIndexBase,
152-
...(this.allowZIndex && { zIndex: this.zIndex }),
153-
attach: this.attach ? '#attach' : false,
154-
focusRetain: this.focusRetain,
155-
focusTrap: this.focusTrap
156-
}
157-
}
158-
},
159152
methods: {
160153
openAttach() {
161154
this.attach = '#attach'

0 commit comments

Comments
 (0)