DialogContent 的 grid 用隐式 auto 轨道,轨道 min 受 grid item 的 min-width:auto 支配。传输/分享确认框里「被拦截文件清单」是不换行文本, 把 400px 弹窗(扣 p-6 后仅 350px 可用)的轨道顶到 386.8px, 内容整体从右边框外溢 11px。 - dialog.tsx 加 grid-cols-1,轨道只跟容器宽,24 个弹窗共用此修复 - SecuritySkipWarning 的文件名由 truncate 改 break-all:原截断把要警告 的文件名省略号掉了,用户看不清哪几个文件被拦 实测(重建 sfile-web 镜像后):轨道 350px、告警块右边缘 939 <= 弹窗 963、 清单横向溢出 0、4 条文件名完整可读;移动/分享/传输三个弹窗回归无溢出, 全屏预览弹窗的 flex 经 tailwind-merge 覆盖基类 grid,不受影响。
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is currently not compatible with SWC. See this issue for tracking the progress.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])