mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-30 03:10:16 +08:00
fix: 现在软件管理器滚到底部后应用列表不会透滚
This commit is contained in:
25
src/__tests__/unit/InstalledAppsModal.test.ts
Normal file
25
src/__tests__/unit/InstalledAppsModal.test.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { render, screen } from "@testing-library/vue";
|
||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
import InstalledAppsModal from "@/components/InstalledAppsModal.vue";
|
||||||
|
|
||||||
|
describe("InstalledAppsModal", () => {
|
||||||
|
it("keeps scroll chaining inside the modal list", () => {
|
||||||
|
const { container } = render(InstalledAppsModal, {
|
||||||
|
props: {
|
||||||
|
show: true,
|
||||||
|
apps: [],
|
||||||
|
loading: false,
|
||||||
|
error: "",
|
||||||
|
activeOrigin: "spark",
|
||||||
|
storeFilter: "both",
|
||||||
|
apmAvailable: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(screen.getByText("已安装应用")).toBeTruthy();
|
||||||
|
const scrollContainer = container.querySelector(".overflow-y-auto");
|
||||||
|
|
||||||
|
expect(scrollContainer?.className).toContain("overscroll-contain");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex-1 overflow-y-auto scrollbar-nowidth scrollbar-thumb-slate-200 dark:scrollbar-thumb-slate-700 p-6 space-y-4"
|
class="flex-1 overflow-y-auto overscroll-contain scrollbar-nowidth scrollbar-thumb-slate-200 dark:scrollbar-thumb-slate-700 p-6 space-y-4"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="loading"
|
v-if="loading"
|
||||||
|
|||||||
Reference in New Issue
Block a user