add fills
This commit is contained in:
@@ -30,23 +30,26 @@ function toggleDark(event: MouseEvent) {
|
||||
isDark.value = !isDark.value
|
||||
return
|
||||
}
|
||||
document.startViewTransition(() => {
|
||||
isDark.value = !isDark.value
|
||||
}).ready.then(() => {
|
||||
document.documentElement.animate(
|
||||
{
|
||||
clipPath: [
|
||||
`circle(0px at ${x}px ${y}px)`,
|
||||
`circle(${radius}px at ${x}px ${y}px)`,
|
||||
],
|
||||
},
|
||||
{
|
||||
duration: 400,
|
||||
easing: "ease-in-out",
|
||||
pseudoElement: "::view-transition-new(root)",
|
||||
},
|
||||
)
|
||||
}).catch(() => {})
|
||||
document
|
||||
.startViewTransition(() => {
|
||||
isDark.value = !isDark.value
|
||||
})
|
||||
.ready.then(() => {
|
||||
document.documentElement.animate(
|
||||
{
|
||||
clipPath: [
|
||||
`circle(0px at ${x}px ${y}px)`,
|
||||
`circle(${radius}px at ${x}px ${y}px)`,
|
||||
],
|
||||
},
|
||||
{
|
||||
duration: 400,
|
||||
easing: "ease-in-out",
|
||||
pseudoElement: "::view-transition-new(root)",
|
||||
},
|
||||
)
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
// 从 store 中获取屏幕模式状态
|
||||
|
||||
@@ -73,7 +73,8 @@ const renderMermaid = async () => {
|
||||
renderSuccess.value = false
|
||||
|
||||
const errorDiv = document.createElement("div")
|
||||
errorDiv.style.cssText = "color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;"
|
||||
errorDiv.style.cssText =
|
||||
"color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;"
|
||||
const titleP = document.createElement("p")
|
||||
titleP.textContent = "Mermaid语法错误"
|
||||
const detailP = document.createElement("p")
|
||||
|
||||
Reference in New Issue
Block a user