File tree Expand file tree Collapse file tree 1 file changed +29
-12
lines changed
Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change 1919 rounded
2020 height =" 6"
2121 ></v-progress-linear >
22- <v-text-field
23- v-model =" search"
24- append-icon =" mdi-magnify"
25- label =" Search"
26- single-line
27- hide-details
28- @input =" filterSubdomains"
29- ></v-text-field >
22+ <v-row justify =" end" >
23+ <v-col cols =" 4" >
24+ <v-text-field
25+ v-model =" search"
26+ append-icon =" mdi-magnify"
27+ label =" Search"
28+ single-line
29+ hide-details
30+ placeholder =" Domain Name"
31+ @input =" searchSubdomains"
32+ ></v-text-field >
33+ </v-col >
34+ </v-row >
35+ <div class =" my-5" ></div >
3036 <v-pagination
3137 v-model =" pageNumber"
38+ class =" my-5"
3239 :length =" length"
3340 :total-visible =" 10"
3441 @input =" filterSubdomains"
4855 <dns-list-table :subdomains =" domain.subdomains" ></dns-list-table >
4956 </v-card >
5057 </div >
58+ <v-pagination
59+ v-model =" pageNumber"
60+ class =" my-5"
61+ :length =" length"
62+ :total-visible =" 10"
63+ @input =" filterSubdomains"
64+ ></v-pagination >
5165 <dns-new-dialog
5266 :is-open =" isOpenNewDialog"
5367 @close =" closeNewDialog"
@@ -139,17 +153,20 @@ export default {
139153 filterSubdomains () {
140154 let dns = this .dns
141155 const search = this .search .trim ()
142- const offset = this .limit * (this .pageNumber - 1 )
143- const limit = this .limit * this .pageNumber
144156 if (search !== ' ' ) {
145157 dns = this .dns .filter (function (subdomain ) {
146- const name = subdomain .name
147- return name .includes (search)
158+ return subdomain .name .includes (search)
148159 })
149160 }
161+ const offset = this .limit * (this .pageNumber - 1 )
162+ const limit = this .limit * this .pageNumber
150163 this .length = Math .ceil (dns .length / this .pageSize )
151164 this .subdomains = dns .slice (offset, limit)
152165 },
166+ searchSubdomains () {
167+ this .pageNumber = 1
168+ this .filterSubdomains ()
169+ },
153170 },
154171}
155172 </script >
You can’t perform that action at this time.
0 commit comments