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

@@ -50,9 +50,17 @@
<!-- 转存按钮 -->
<div class="info__action">
<van-button type="primary" size="mini" round @click="handleSave(item)">
<van-button type="primary" size="mini" round plain @click="handleJump(item)">
</van-button>
<van-button
v-if="item.isSupportSave"
type="primary"
size="mini"
round
@click="handleSave(item)"
>转存</van-button
>
</div>
</div>
</div>
@@ -74,6 +82,7 @@ const props = defineProps<{
// 事件定义
const emit = defineEmits<{
(e: "save", resource: ResourceItem): void;
(e: "jump", resource: ResourceItem): void;
(e: "searchMovieforTag", tag: string): void;
}>();
@@ -100,6 +109,9 @@ const handleSave = (resource: ResourceItem) => {
emit("save", resource);
};
const handleJump = (resource: ResourceItem) => {
emit("jump", resource);
};
const openUrl = (url: string) => {
window.open(url);
};