mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
feat(组件): 为应用详情模态框添加网站链接点击功能
This commit is contained in:
@@ -241,6 +241,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="displayApp?.website"
|
v-if="displayApp?.website"
|
||||||
class="flex items-center justify-between px-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-800 rounded px-1 -mx-1 transition-colors"
|
class="flex items-center justify-between px-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-800 rounded px-1 -mx-1 transition-colors"
|
||||||
|
@click.stop="openWebsite(displayApp.website)"
|
||||||
>
|
>
|
||||||
<span class="text-xs text-slate-400">网站</span>
|
<span class="text-xs text-slate-400">网站</span>
|
||||||
<span
|
<span
|
||||||
@@ -480,6 +481,12 @@ const closeMetaModal = () => {
|
|||||||
showMetaModal.value = false;
|
showMetaModal.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openWebsite = (url: string) => {
|
||||||
|
if (url) {
|
||||||
|
window.open(url, "_blank");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.app,
|
() => props.app,
|
||||||
(newApp: App | null) => {
|
(newApp: App | null) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user