fix(desktop): use onTouchStart instead onClick to entry list on touchable device

This commit is contained in:
DIYgod
2025-04-24 19:33:50 +08:00
parent 9648adb63c
commit 9da9dec7ec
2 changed files with 4 additions and 2 deletions
@@ -63,7 +63,7 @@ export const EntryItemWrapper: FC<
)
const navigate = useNavigateEntry()
const handleClick: React.MouseEventHandler<HTMLDivElement> = useCallback(
const handleClick = useCallback(
(e) => {
e.stopPropagation()
@@ -149,6 +149,7 @@ export const EntryItemWrapper: FC<
onMouseLeave={handleMouseEnter.cancel}
onDoubleClick={handleDoubleClick}
{...contextMenuProps}
onTouchStart={handleClick}
>
{children}
</div>
+2 -1
View File
@@ -12,7 +12,7 @@ import { analyzer } from "vite-bundle-analyzer"
import mkcert from "vite-plugin-mkcert"
import { VitePWA } from "vite-plugin-pwa"
import type { env as EnvType } from "../../packages/shared/src/env"
import type { env as EnvType } from "../../packages/shared/src/env.ssr"
import { viteRenderBaseConfig } from "./configs/vite.render.config"
import { createDependencyChunksPlugin } from "./plugins/vite/deps"
import { htmlInjectPlugin } from "./plugins/vite/html-inject"
@@ -104,6 +104,7 @@ export default ({ mode }) => {
},
},
server: {
host: true,
port: 2233,
watch: {
ignored: ["**/dist/**", "**/out/**", "**/public/**", ".git/**"],