refactor(about): 移除未使用的vue-query相关代码
清理request.vue组件中注释掉的vue-query相关代码,这些代码未被实际使用且影响代码整洁性
This commit is contained in:
parent
a7795a9b98
commit
6d3c92b003
@ -37,8 +37,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getFooAPI, postFooAPI, IFooItem } from '@/service/index/foo'
|
import { getFooAPI, postFooAPI, IFooItem } from '@/service/index/foo'
|
||||||
import { findPetsByStatusQueryOptions } from '@/service/app'
|
// import { findPetsByStatusQueryOptions } from '@/service/app'
|
||||||
import { useQuery } from '@tanstack/vue-query'
|
// import { useQuery } from '@tanstack/vue-query'
|
||||||
|
|
||||||
const recommendUrl = ref('http://laf.run/signup?code=ohaOgIX')
|
const recommendUrl = ref('http://laf.run/signup?code=ohaOgIX')
|
||||||
|
|
||||||
@ -54,12 +54,12 @@ const { loading, error, data, run } = useRequest<IFooItem>(() => getFooAPI('菲
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 使用 vue-query 的 useQuery 来请求数据,只做参考,是否使用请根据实际情况而定
|
// 使用 vue-query 的 useQuery 来请求数据,只做参考,是否使用请根据实际情况而定
|
||||||
const {
|
// const {
|
||||||
data: data2,
|
// data: data2,
|
||||||
error: error2,
|
// error: error2,
|
||||||
isLoading: isLoading2,
|
// isLoading: isLoading2,
|
||||||
refetch,
|
// refetch,
|
||||||
} = useQuery(findPetsByStatusQueryOptions({ params: { status: ['available'] } }))
|
// } = useQuery(findPetsByStatusQueryOptions({ params: { status: ['available'] } }))
|
||||||
|
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
data.value = initialData
|
data.value = initialData
|
||||||
|
Loading…
x
Reference in New Issue
Block a user