1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-28 20:10:22 +08:00

refactor: request error tip

This commit is contained in:
张传龙
2022-09-04 11:35:30 +08:00
parent 3a38adc71e
commit f1bc9edbac
14 changed files with 97 additions and 98 deletions

View File

@@ -93,7 +93,6 @@ async function handleQuery() {
} catch (error) {
tableData.value = []
pagination.itemCount = 0
$message.error(error.message)
} finally {
loading.value = false
}
@@ -103,7 +102,11 @@ function handleSearch() {
handleQuery()
}
async function handleReset() {
emit('update:queryItems', { ...initQuery })
const queryItems = { ...props.queryItems }
for (const key in queryItems) {
queryItems[key] = ''
}
emit('update:queryItems', { ...queryItems, ...initQuery })
await nextTick()
pagination.page = 1
handleQuery()