1616 :attach =" attach ? '#attach' : false"
1717 :focus-retain =" focusRetain"
1818 :focus-trap =" focusTrap"
19+ :drag =" drag"
20+ :fit-parent =" fitParent"
21+ :keep-changed-style =" keepChangedStyle"
22+ :resize =" resize"
23+ :resize-directions =" resizeDirections"
24+ :drag-selector =" allowDragSelector ? dragSelector : ''"
25+ :min-width =" minWidth"
26+ :max-width =" maxWidth"
27+ :min-height =" minHeight"
28+ :max-height =" maxHeight"
1929 @confirm =" showModal = false"
2030 @cancel =" showModal = false"
2131 >
2232 <template v-slot :title ># Hello, world!</template >
23- <p >
24- Lorem Ipsum is simply dummy text of the printing and typesetting industry.
25- </p >
33+ <p >Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p >
2634 </v-modal >
2735
28- <button class =" vfm-btn" @click =" showModal = true" >Open Modal</button >
36+ <div class =" flex space-x-2" >
37+ <v-button highlight @click =" showModal = true" >Open Modal</v-button >
38+ <v-button @click =" reset" >reset</v-button >
39+ </div >
2940
30- <h3 >Prop Options :</h3 >
41+ <h3 class = " py-2 " >Basic :</h3 >
3142
32- <div class =" grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 p-4 border rounded" >
43+ <div class =" grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-y- 4 p-4 border rounded select-none " >
3344 <label class =" flex items-center space-x-2" >
3445 <span >value:</span >
3546 <input v-model =" showModal" type =" checkbox" />
3849 <span >ssr:</span >
3950 <input v-model =" ssr" type =" checkbox" />
4051 </label >
41-
4252 <label class =" flex items-center space-x-2" >
4353 <span >lockScroll:</span >
4454 <input v-model =" lockScroll" type =" checkbox" />
101111 <span >focusTrap:</span >
102112 <input v-model =" focusTrap" type =" checkbox" />
103113 </label >
104- <button class =" vfm-btn" @click =" reset" >reset</button >
105114 </div >
106- <h4 >Attach area:</h4 >
107- <div id =" attach" class =" relative w-full h-64 mt-8 p-4 border rounded dark:bg-gray-700" >
108- <button class =" vfm-btn" @click =" openAttach" >
109- Attach to here and open modal
110- </button >
115+ <h3 class =" py-2" >Drag & Resize:</h3 >
116+ <div class =" grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 p-4 border rounded select-none" >
117+ <label class =" flex items-center space-x-2" >
118+ <span >drag:</span >
119+ <input v-model =" drag" type =" checkbox" />
120+ </label >
121+ <div class =" flex flex-col" >
122+ <label class =" flex items-center space-x-2" >
123+ <input v-model =" allowDragSelector" type =" checkbox" />
124+ <span >dragSelector:</span >
125+ </label >
126+ <label >
127+ <input
128+ v-model =" dragSelector"
129+ :disabled =" !allowDragSelector"
130+ class =" pl-2 dark:text-black rounded focus:outline-none"
131+ />
132+ </label >
133+ </div >
134+ <label class =" flex items-center space-x-2" >
135+ <span >fitParent:</span >
136+ <input v-model =" fitParent" type =" checkbox" />
137+ </label >
138+ <label class =" flex items-center space-x-2" >
139+ <span >keepChangedStyle:</span >
140+ <input v-model =" keepChangedStyle" type =" checkbox" />
141+ </label >
142+ <label class =" flex items-center space-x-2" >
143+ <span >resize:</span >
144+ <input v-model =" resize" type =" checkbox" />
145+ </label >
146+ <div class =" flex flex-col" >
147+ <span >resizeDirections:</span >
148+ <div class =" flex space-x-1" >
149+ <div v-for =" direction in ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']" :key =" direction" >
150+ <label >
151+ {{ direction }}:
152+ <input type =" checkbox" v-model =" resizeDirections" :value =" direction" />
153+ </label >
154+ </div >
155+ </div >
156+ </div >
157+ <label class =" flex items-center space-x-2" >
158+ <span >minWidth:</span >
159+ <input v-model.number =" minWidth" type =" number" class =" w-20 pl-2 dark:text-black rounded focus:outline-none" />
160+ </label >
161+ <label class =" flex items-center space-x-2" >
162+ <span >maxWidth:</span >
163+ <input v-model.number =" maxWidth" type =" number" class =" w-20 pl-2 dark:text-black rounded focus:outline-none" />
164+ </label >
165+ <label class =" flex items-center space-x-2" >
166+ <span >minHeight:</span >
167+ <input v-model.number =" minHeight" type =" number" class =" w-20 pl-2 dark:text-black rounded focus:outline-none" />
168+ </label >
169+ <label class =" flex items-center space-x-2" >
170+ <span >maxHeight:</span >
171+ <input v-model.number =" maxHeight" type =" number" class =" w-20 pl-2 dark:text-black rounded focus:outline-none" />
172+ </label >
173+ </div >
174+ <h3 class =" py-2" >Attach:</h3 >
175+ <div id =" attach" class =" relative w-full h-64 p-4 border rounded dark:bg-gray-900 overflow-hidden" >
176+ <v-button highlight @click =" openAttach" >Attach to here and open modal</v-button >
111177 <p >click will:</p >
112178 <ul >
113179 <li >set "attach" to "true"</li >
@@ -134,7 +200,18 @@ const initData = () => ({
134200 zIndex: 0 ,
135201 attach: false ,
136202 focusRetain: true ,
137- focusTrap: false
203+ focusTrap: false ,
204+ drag: false ,
205+ fitParent: true ,
206+ keepChangedStyle: false ,
207+ resize: false ,
208+ resizeDirections: [' t' , ' tr' , ' r' , ' br' , ' b' , ' bl' , ' l' , ' tl' ],
209+ allowDragSelector: false ,
210+ dragSelector: ' .modal__title' ,
211+ minWidth: 0 ,
212+ maxWidth: 2000 ,
213+ minHeight: 0 ,
214+ maxHeight: 2000
138215})
139216
140217export default {
0 commit comments