feat: auto start workers

This commit is contained in:
Rogee
2024-12-16 16:59:48 +08:00
parent 66d0cd507c
commit 71c285b892
10 changed files with 133 additions and 5 deletions

View File

@@ -13,7 +13,6 @@ export default defineComponent({
},
setup(props) {
return {
copyCode,
}
}
})

View File

@@ -3,8 +3,8 @@
<van-back-top bottom="80" />
<van-list style="padding-bottom: 3em" v-model:loading="loading" :finished="finished"
:finished-text="bought ? '您还没有购买' : '没有更多了'" offset="100" @load="loadData">
<van-list style="padding-bottom: 3em" v-model:loading="loading" error-text="请求失败点击重新加载" :finished="finished"
v-model:error="error" :finished-text="bought ? '您还没有购买' : '没有更多了'" offset="100" @load="loadData">
<list-item-card v-for="item in items" :key="item" :item="item" :bought="bought" />
</van-list>
</template>
@@ -20,6 +20,7 @@ export default defineComponent({
setup(props) {
const search = ref("");
const items = ref([]);
const error = ref(false)
const loading = ref(false);
const finished = ref(false);
const pageLimit = ref(10);
@@ -69,6 +70,7 @@ export default defineComponent({
})
.catch((err) => {
console.error("ERROR", err);
error.value = true
})
.finally(() => {
loading.value = false;