rudimentary filter string for game list

This commit is contained in:
jmosrael@gmail.com
2024-05-18 14:13:38 -07:00
parent 401330d842
commit f0de240b8a
3 changed files with 40 additions and 15 deletions

View File

@@ -50,7 +50,7 @@ let count = 10
async function loadData() {
const response = await axios.post('/api/character', {
page: `${page.value-1}`,
page: `${page.value - 1}`,
count: `${count}`,
orderBy: 'id'
})
@@ -61,7 +61,7 @@ async function loadData() {
function setPage(targetPage: number) {
console.log(targetPage)
router.replace({query: {page: targetPage}})
router.replace({ query: { page: targetPage } })
}
watch(route, (newValue, oldValue) => {
@@ -70,8 +70,8 @@ watch(route, (newValue, oldValue) => {
})
onMounted(async () => {
if(!route.query.page){
router.replace({query: {page: 1}})
if (!route.query.page) {
router.replace({ query: { page: 1 } })
}
page.value = Number(route.query.page)
loadData()