Skip to content

【宠物挂件】 怎么改点击宠物跳转的地址 #2146

Answered by tangly1024
tangly1024 asked this question in Q&A
Discussion options

You must be logged in to vote

警告,这是未被配置支持的功能,通过修改源代码实现,可能会出现未知的编译错误。

修改/components/Live2D.js 文件的两行代码

修改位置1

第33行:

function handleClick() {
if (JSON.parse(siteConfig('WIDGET_PET_SWITCH_THEME'))) {
switchTheme()
}
}

修改为

 function handleClick() { 
    window.location.href = "https://blog.tangly1024.com";
 } 

修改位置2

第12行

const { theme, switchTheme } = useGlobal()

修改为:

  const { theme } = useGlobal()

Replies: 1 comment 1 reply

Comment options

tangly1024
Mar 6, 2024
Maintainer Author

You must be logged in to vote
1 reply
@darcyli
Comment options

Answer selected by tangly1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants