feat: enhance modal functionality and integrate new components
- Added keyframes and animation for a smooth scale-in effect in the Tailwind configuration. - Updated Image component to improve quality handling and style definitions. - Introduced WordViewer and WordViewerModal components for document viewing capabilities. - Enhanced Modal component to support embedded mode with customizable position and dimensions. - Integrated IframeModal across various pages for user assistance and content display. - Updated Content and Menu pages to utilize new components and improve user interaction. - Added utility function to retrieve public paths for resources.
This commit is contained in:
1 parent
13dd84a8a7
commit
4ce7520066
44 files changed
+1209
-100
No files matched your search
@@ -39,3 +39,11 @@ export const getBackgroundImage = (path: string) => {
|
||||
const imageUrl = getStaticImage(path);
|
||||
return imageUrl ? `url(${imageUrl})` : "none";
|
||||
};
|
||||
|
||||
// 获取 public 文件夹中的资源路径(用于 Word 文档等)
|
||||
export const getPublicPath = (path: string) => {
|
||||
// 移除开头的斜杠(如果有)
|
||||
const cleanPath = path.startsWith("/") ? path.slice(1) : path;
|
||||
// 使用 Vite 的 BASE_URL 环境变量来处理基础路径
|
||||
return `${import.meta.env.BASE_URL}${cleanPath}`;
|
||||
};
|
||||
Reference in new issue
Block a user