chore: 补齐 alova 实例,并添加动态域名切换

This commit is contained in:
feige996
2025-06-22 20:00:45 +08:00
committed by mogenle
parent f4f62b4f92
commit b5fd91913a
7 changed files with 211 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ import { useRequest } from 'alova/client'
import { foo } from '@/api/alova-foo'
const initialData = undefined
const { loading, data, send } = useRequest(foo, {
initialData,
immediate: true,
@@ -39,6 +40,10 @@ function reset() {
{{ JSON.stringify(data) }}
</view>
</block>
<view class="text-red">
{{ data?.id }}
</view>
</view>
<button class="my-6 w-200px text-red" :disabled="!data" @click="reset">
重置数据