feat:增加跳转按钮

This commit is contained in:
jiangrui
2025-03-11 21:57:45 +08:00
parent e6171fb34c
commit dca0f1f0c1
8 changed files with 89 additions and 12 deletions

View File

@@ -56,6 +56,7 @@
:is="userStore.displayStyle === 'table' ? ResourceTable : ResourceCard"
v-if="resourceStore.resources.length > 0"
@load-more="handleLoadMore"
@jump="handleJump"
@search-moviefor-tag="searchMovieforTag"
@save="handleSave"
/>
@@ -230,6 +231,10 @@ const handleLoadMore = (channelId: string) => {
resourceStore.searchResources("", true, channelId);
};
const handleJump = (resource: ResourceItem) => {
window.open(resource.cloudLinks[0], "_blank");
};
const searchMovieforTag = (tag: string) => {
router.push({ path: "/resource", query: { keyword: tag } });
};

View File

@@ -35,6 +35,7 @@
<ResourceCard
:current-channel-id="currentTab"
@save="handleSave"
@jump="handleJump"
@search-moviefor-tag="searchMovieforTag"
/>
</van-tab>
@@ -192,6 +193,10 @@ const handleSave = async (resource: ResourceItem) => {
}
};
const handleJump = (resource: ResourceItem) => {
window.open(resource.cloudLinks[0], "_blank");
};
const handleFolderSelect = (folders: Folder[] | null) => {
if (!currentResource.value) return;
currentFolderPath.value = folders;