Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/ListTools.vue
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | export default { | ||||
currentSearch: '', | currentSearch: '', | ||||
hasMore: false, | hasMore: false, | ||||
page: 1 | page: 1 | ||||
} | } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
listSearch(name, url, params) { | listSearch(name, url, params) { | ||||
let loader | let loader | ||||
let get = {} | let get = params.get || {} | ||||
if (params) { | if (params) { | ||||
if (params.reset || params.init) { | if (params.reset || params.init) { | ||||
this[name] = [] | this[name] = [] | ||||
this.page = 0 | this.page = 0 | ||||
} | } | ||||
get.page = params.page || (this.page + 1) | get.page = params.page || (this.page + 1) | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |