diff --git a/public/word/~$同心育新农,山海携手促共富.docx b/public/word/~$同心育新农,山海携手促共富.docx new file mode 100644 index 0000000..ca3b011 Binary files /dev/null and b/public/word/~$同心育新农,山海携手促共富.docx differ diff --git a/public/word/~$师资助力乡村振兴新发展.docx b/public/word/~$师资助力乡村振兴新发展.docx new file mode 100644 index 0000000..ca3b011 Binary files /dev/null and b/public/word/~$师资助力乡村振兴新发展.docx differ diff --git a/public/word/~$浦江畔到雪域高原 沪青协作赋能果洛“土特产”出圈——对口支援新实践:从“输血”到“造血”的数智帮扶.docx b/public/word/~$浦江畔到雪域高原 沪青协作赋能果洛“土特产”出圈——对口支援新实践:从“输血”到“造血”的数智帮扶.docx new file mode 100644 index 0000000..ca3b011 Binary files /dev/null and b/public/word/~$浦江畔到雪域高原 沪青协作赋能果洛“土特产”出圈——对口支援新实践:从“输血”到“造血”的数智帮扶.docx differ diff --git a/public/word/~$融合育新苗 直播赋能助振兴 ——智慧商旅系学子赴浦江边检站开展助农直播实践.docx b/public/word/~$融合育新苗 直播赋能助振兴 ——智慧商旅系学子赴浦江边检站开展助农直播实践.docx new file mode 100644 index 0000000..ca3b011 Binary files /dev/null and b/public/word/~$融合育新苗 直播赋能助振兴 ——智慧商旅系学子赴浦江边检站开展助农直播实践.docx differ diff --git a/public/word/【10月16日】工作室活动情况记录.docx b/public/word/【10月16日】工作室活动情况记录.docx new file mode 100644 index 0000000..148c23d Binary files /dev/null and b/public/word/【10月16日】工作室活动情况记录.docx differ diff --git a/public/word/【10月18日】工作室活动情况记录.docx b/public/word/【10月18日】工作室活动情况记录.docx new file mode 100644 index 0000000..a2e4961 Binary files /dev/null and b/public/word/【10月18日】工作室活动情况记录.docx differ diff --git a/public/word/【10月8日】工作室活动情况记录.docx b/public/word/【10月8日】工作室活动情况记录.docx new file mode 100644 index 0000000..201c148 Binary files /dev/null and b/public/word/【10月8日】工作室活动情况记录.docx differ diff --git a/public/word/【11月14日】工作室活动情况记录.docx b/public/word/【11月14日】工作室活动情况记录.docx new file mode 100644 index 0000000..bacad43 Binary files /dev/null and b/public/word/【11月14日】工作室活动情况记录.docx differ diff --git a/public/word/【11月15日】工作室活动情况记录.docx b/public/word/【11月15日】工作室活动情况记录.docx new file mode 100644 index 0000000..3ecef83 Binary files /dev/null and b/public/word/【11月15日】工作室活动情况记录.docx differ diff --git a/public/word/【11月6日】工作室活动情况记录.docx b/public/word/【11月6日】工作室活动情况记录.docx new file mode 100644 index 0000000..2658a20 Binary files /dev/null and b/public/word/【11月6日】工作室活动情况记录.docx differ diff --git a/public/word/【7月2日】工作室活动情况记录.docx b/public/word/【7月2日】工作室活动情况记录.docx new file mode 100644 index 0000000..4fe14f7 Binary files /dev/null and b/public/word/【7月2日】工作室活动情况记录.docx differ diff --git a/public/word/与桂同心育新农,山海携手促共富.docx b/public/word/与桂同心育新农,山海携手促共富.docx new file mode 100644 index 0000000..e13c69c Binary files /dev/null and b/public/word/与桂同心育新农,山海携手促共富.docx differ diff --git a/public/word/产教融合育新苗 直播赋能助振兴 ——智慧商旅系学子赴浦江边检站开展助农直播实践.docx b/public/word/产教融合育新苗 直播赋能助振兴 ——智慧商旅系学子赴浦江边检站开展助农直播实践.docx new file mode 100644 index 0000000..1f145d1 Binary files /dev/null and b/public/word/产教融合育新苗 直播赋能助振兴 ——智慧商旅系学子赴浦江边检站开展助农直播实践.docx differ diff --git a/public/word/从黄浦江畔到雪域高原 沪青协作赋能果洛“土特产”出圈——对口支援新实践:从“输血”到“造血”的数智帮扶.docx b/public/word/从黄浦江畔到雪域高原 沪青协作赋能果洛“土特产”出圈——对口支援新实践:从“输血”到“造血”的数智帮扶.docx new file mode 100644 index 0000000..41a8e16 Binary files /dev/null and b/public/word/从黄浦江畔到雪域高原 沪青协作赋能果洛“土特产”出圈——对口支援新实践:从“输血”到“造血”的数智帮扶.docx differ diff --git a/public/word/南湖师资助力乡村振兴新发展.docx b/public/word/南湖师资助力乡村振兴新发展.docx new file mode 100644 index 0000000..a7dc815 Binary files /dev/null and b/public/word/南湖师资助力乡村振兴新发展.docx differ diff --git a/public/word/政校携手,口岸直播助侗乡——南湖学子浦江口岸助农实践出新彩.docx b/public/word/政校携手,口岸直播助侗乡——南湖学子浦江口岸助农实践出新彩.docx new file mode 100644 index 0000000..4330190 Binary files /dev/null and b/public/word/政校携手,口岸直播助侗乡——南湖学子浦江口岸助农实践出新彩.docx differ diff --git a/src/assets/images/content/图文.png b/src/assets/images/content/图文.png index 8f0a90d..79fe02e 100644 Binary files a/src/assets/images/content/图文.png and b/src/assets/images/content/图文.png differ diff --git a/src/assets/images/content/图文1.png b/src/assets/images/content/图文1.png new file mode 100644 index 0000000..8f0a90d Binary files /dev/null and b/src/assets/images/content/图文1.png differ diff --git a/src/assets/images/content/图文3.png b/src/assets/images/content/图文3.png new file mode 100644 index 0000000..4051053 Binary files /dev/null and b/src/assets/images/content/图文3.png differ diff --git a/src/assets/images/menu/曹君-未选中.png b/src/assets/images/menu/曹君-未选中.png index 4ccbae9..8896b3e 100644 Binary files a/src/assets/images/menu/曹君-未选中.png and b/src/assets/images/menu/曹君-未选中.png differ diff --git a/src/assets/images/publicity/01未选中.png b/src/assets/images/publicity/01未选中.png index b95c1be..151a695 100644 Binary files a/src/assets/images/publicity/01未选中.png and b/src/assets/images/publicity/01未选中.png differ diff --git a/src/assets/images/publicity/02未选中.png b/src/assets/images/publicity/02未选中.png index 03747a1..cf67200 100644 Binary files a/src/assets/images/publicity/02未选中.png and b/src/assets/images/publicity/02未选中.png differ diff --git a/src/assets/images/publicity/03未选中.png b/src/assets/images/publicity/03未选中.png index fe0dedb..7f4fd37 100644 Binary files a/src/assets/images/publicity/03未选中.png and b/src/assets/images/publicity/03未选中.png differ diff --git a/src/assets/images/publicity/04未选中.png b/src/assets/images/publicity/04未选中.png index dbe213e..6bf66c0 100644 Binary files a/src/assets/images/publicity/04未选中.png and b/src/assets/images/publicity/04未选中.png differ diff --git a/src/assets/images/publicity/数字人-头像框.png b/src/assets/images/publicity/数字人-头像框.png index 4c87ef9..0b8738c 100644 Binary files a/src/assets/images/publicity/数字人-头像框.png and b/src/assets/images/publicity/数字人-头像框.png differ diff --git a/src/assets/images/publicity/数字人-头像框_.png b/src/assets/images/publicity/数字人-头像框_.png new file mode 100644 index 0000000..4c87ef9 Binary files /dev/null and b/src/assets/images/publicity/数字人-头像框_.png differ diff --git a/src/assets/images/publicity/曹君名师数字人分身.png b/src/assets/images/publicity/曹君名师数字人分身.png index 0fcadf5..7c8d08d 100644 Binary files a/src/assets/images/publicity/曹君名师数字人分身.png and b/src/assets/images/publicity/曹君名师数字人分身.png differ diff --git a/src/components/ALERT_USAGE.md b/src/components/ALERT_USAGE.md new file mode 100644 index 0000000..37af859 --- /dev/null +++ b/src/components/ALERT_USAGE.md @@ -0,0 +1,147 @@ +# Alert 组件使用说明 + +## 简介 + +`Alert` 是一个通用的提示框组件,类似于 Ant Design 的 Alert,用于向用户显示重要的提示信息。 + +## 特性 + +- 🎨 支持 4 种类型:`warning`、`info`、`success`、`error` +- 🎭 可选显示/隐藏图标 +- ❌ 可选是否可关闭 +- 🎯 居中模态显示 +- ✨ 优雅的动画效果 + +## 基本用法 + +```tsx +import { Alert } from "@/components"; + +function MyComponent() { + const [showAlert, setShowAlert] = useState(false); + + return ( + setShowAlert(false)} + message="这是一条提示信息" + type="warning" + /> + ); +} +``` + +## API + +### Props + +| 参数 | 说明 | 类型 | 默认值 | 必填 | +| -------- | -------------- | --------------------------------------------- | ----------- | ---- | +| isOpen | 是否显示 Alert | `boolean` | - | ✅ | +| onClose | 关闭回调函数 | `() => void` | - | ✅ | +| message | 提示内容 | `string \| ReactNode` | - | ✅ | +| type | 提示类型 | `'warning' \| 'info' \| 'success' \| 'error'` | `'warning'` | ❌ | +| showIcon | 是否显示图标 | `boolean` | `true` | ❌ | +| closable | 是否可关闭 | `boolean` | `true` | ❌ | + +## 示例 + +### 警告提示 + +```tsx + setShowWarning(false)} + message="该名师工作室数字睿教正在筹划中" + type="warning" +/> +``` + +### 成功提示 + +```tsx + setShowSuccess(false)} + message="操作成功!" + type="success" +/> +``` + +### 错误提示 + +```tsx + setShowError(false)} + message="操作失败,请稍后重试" + type="error" +/> +``` + +### 信息提示 + +```tsx + setShowInfo(false)} + message="这是一条普通信息" + type="info" +/> +``` + +### 自定义内容 + +```tsx + setShowCustom(false)} + message={ +
+

自定义标题

+

这是自定义的内容

+
+ } + type="info" +/> +``` + +### 不可关闭的提示 + +```tsx + {}} + message="这是一条不可关闭的提示" + type="info" + closable={false} +/> +``` + +### 无图标提示 + +```tsx + setShowNoIcon(false)} + message="这是一条没有图标的提示" + type="info" + showIcon={false} +/> +``` + +## 样式说明 + +每种类型都有对应的颜色主题: + +- **warning**: 黄色系(适用于警告信息) +- **info**: 蓝色系(适用于一般信息) +- **success**: 绿色系(适用于成功提示) +- **error**: 红色系(适用于错误提示) + +## 注意事项 + +1. Alert 组件会创建一个全屏半透明遮罩层 +2. 点击遮罩层可以关闭 Alert(当 `closable` 为 `true` 时) +3. Alert 的 z-index 为 50,确保在大多数元素之上 +4. 支持动画效果,通过 `animate-scale-in` 类实现 diff --git a/src/components/Alert.tsx b/src/components/Alert.tsx new file mode 100644 index 0000000..f50c752 --- /dev/null +++ b/src/components/Alert.tsx @@ -0,0 +1,152 @@ +import { ReactNode } from "react"; + +type AlertType = "warning" | "info" | "success" | "error"; + +interface AlertProps { + isOpen: boolean; + onClose: () => void; + message: string | ReactNode; + type?: AlertType; + showIcon?: boolean; + closable?: boolean; +} + +const alertStyles: Record< + AlertType, + { + bg: string; + border: string; + text: string; + icon: string; + } +> = { + warning: { + bg: "bg-yellow-50", + border: "border-yellow-400", + text: "text-yellow-800", + icon: "text-yellow-400", + }, + info: { + bg: "bg-blue-50", + border: "border-blue-400", + text: "text-blue-800", + icon: "text-blue-400", + }, + success: { + bg: "bg-green-50", + border: "border-green-400", + text: "text-green-800", + icon: "text-green-400", + }, + error: { + bg: "bg-red-50", + border: "border-red-400", + text: "text-red-800", + icon: "text-red-400", + }, +}; + +const icons = { + warning: ( + + + + ), + info: ( + + + + ), + success: ( + + + + ), + error: ( + + + + ), +}; + +export const Alert = ({ + isOpen, + onClose, + message, + type = "warning", + showIcon = true, + closable = true, +}: AlertProps) => { + if (!isOpen) return null; + + const styles = alertStyles[type]; + + return ( +
+ {/* 半透明背景 */} +
+ + {/* Alert 提示框 */} +
+
+ {/* 图标 */} + {showIcon && ( +
+
{icons[type]}
+
+ )} + + {/* 内容 */} +
+ {typeof message === "string" ? ( +

{message}

+ ) : ( + message + )} +
+ + {/* 关闭按钮 */} + {closable && ( + + )} +
+
+
+ ); +}; diff --git a/src/components/Image.tsx b/src/components/Image.tsx index 5556701..13f78b6 100644 --- a/src/components/Image.tsx +++ b/src/components/Image.tsx @@ -40,7 +40,7 @@ export default function Image({ onError, onClick, draggable = false, - quality = 80, + quality: _quality = 80, blur = false, button = false, }: ImageProps) { @@ -98,7 +98,7 @@ export default function Image({ } }, [loading, src]); - const imageStyle = { + const imageStyle: React.CSSProperties = { width: width, height: height, objectFit, @@ -110,7 +110,7 @@ export default function Image({ return (
void; children?: React.ReactNode; className?: string; + mode?: DisplayMode; + position?: EmbeddedPosition; + width?: string | number; + height?: string | number; + showMask?: boolean; } -export const Modal = ({ isOpen, onClose, children, className }: ModalProps) => { +export const Modal = ({ + isOpen, + onClose, + children, + className, + mode = "modal", + position = "bottom-right", + width, + height, + showMask = true, +}: ModalProps) => { if (!isOpen) return null; + // 嵌入式客服对话框模式 + if (mode === "embedded") { + const getPosition = () => { + switch (position) { + case "bottom-right": + return "bottom-6 right-6"; + case "bottom-left": + return "bottom-6 left-6"; + case "top-right": + return "top-6 right-6"; + case "top-left": + return "top-6 left-6"; + } + }; + + const defaultWidth = width || "400px"; + const defaultHeight = height || "600px"; + + return ( +
+ {/* 关闭/最小化按钮 */} + + + {/* 内容 */} +
{children}
+
+ ); + } + + // 传统弹窗模式 return (
{/* 背景遮罩 */} -
+ {showMask && ( +
+ )} {/* 弹窗内容 */}
{/* 关闭按钮 */}