优化页面滚动事件

This commit is contained in:
icssoa
2025-08-11 23:48:02 +08:00
parent f2621341a4
commit 407c7b0521
8 changed files with 119 additions and 74 deletions

View File

@@ -17,6 +17,9 @@
:pt="{
indexBar: {
className: '!fixed'
},
itemHover: {
className: 'bg-gray-200'
}
}"
>
@@ -29,12 +32,16 @@
<script lang="ts" setup>
import { request } from "@/cool";
import DemoItem from "../components/item.uvue";
import { useListView, type ClListViewItem } from "@/uni_modules/cool-ui";
import { useListView, useUi, type ClListViewItem } from "@/uni_modules/cool-ui";
import { ref } from "vue";
const ui = useUi();
const data = ref<ClListViewItem[]>([]);
onReady(() => {
ui.showLoading();
request<UTSJSONObject[]>({
url: "https://unix.cool-js.com/data/pca_flat.json"
})
@@ -43,6 +50,9 @@ onReady(() => {
})
.catch((err) => {
console.error(err);
})
.finally(() => {
ui.hideLoading();
});
});
</script>