Skip to content

Commit

Permalink
fix(list): 修复 loading 可能失效的问题,修改按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
besscroft committed Jan 20, 2024
1 parent b60876d commit fdce525
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/admin/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ const tagTitleHandle = (type: string) => {
return photosList.find(item => type === item.url.replace('/', ''))?.title
}
onBeforeMount(async () => {
await dataHandle()
})
onBeforeMount(() => {
if (photosList) {
photosList?.forEach((photo: any) => {
Expand All @@ -187,6 +183,10 @@ onBeforeMount(() => {
}
})
onMounted(async () => {
await dataHandle()
})
definePageMeta({
layout: 'admin',
})
Expand All @@ -204,11 +204,11 @@ definePageMeta({
:value="item.value"
/>
</el-select>
<div i-carbon-rotate-360 cursor-pointer @click="dataHandle" />
<el-button round :loading="loading" @click="dataHandle"> 刷新 </el-button>
</div>
<el-table
:data="dataList"
v-loading="loading"
:data="dataList"
stripe
height="calc(100vh - 16rem)"
>
Expand Down

0 comments on commit fdce525

Please sign in to comment.