From 6f4b3f07d4099aa6147e38b9ab6e27225395e717 Mon Sep 17 00:00:00 2001 From: chenxing Date: Tue, 13 Oct 2026 12:27:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=AF=BE=E8=A1=A8=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E4=BB=B6):=20SyllabusWidget=E6=94=B9=E7=89=88=E7=9B=B4?= =?UTF-8?q?=E5=90=83AcaSyllabu=20oapi=E7=BB=93=E6=9E=84=E2=80=94=E2=80=94?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=B8=8B=E6=8B=89=E5=88=87=E6=8D=A2=E5=99=A8?= =?UTF-8?q?Teleport=E8=BF=9B=E5=8D=A1=E5=A4=B4(=E9=80=9A=E7=94=A8header?= =?UTF-8?q?=E6=8F=92=E6=A7=BD=E8=83=BD=E5=8A=9B)=EF=BC=8C=E8=A1=8C=3DslotN?= =?UTF-8?q?o=E4=B8=AD=E6=96=87=E6=95=B0=E5=AD=97=E3=80=81=E5=88=97=3D?= =?UTF-8?q?=E5=91=A8=E4=B8=80~=E5=91=A8=E4=BA=94(=E5=91=A8=E6=9C=AB?= =?UTF-8?q?=E6=9C=89=E8=AF=BE=E6=89=8D=E8=BF=BD=E5=8A=A0)=E3=80=81?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=3D=E7=8F=AD=E7=BA=A7/=E7=A7=91?= =?UTF-8?q?=E7=9B=AE=EF=BC=9B=E7=A9=BA=E6=80=81=E6=8D=A2=E5=8E=9F=E7=89=88?= =?UTF-8?q?no-data-box.svg=E6=8F=92=E7=94=BB=EF=BC=9B=E5=8D=A1=E5=A4=B4?= =?UTF-8?q?=E9=92=89=E6=AD=BB#f7f8f9+overflow=20visible=E4=BE=9B=E6=B5=AE?= =?UTF-8?q?=E5=B1=82=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/image/no-data-box.svg | 79 +++++++ src/assets/styles/componets/_widget.scss | 21 +- src/components/widgets/SyllabusWidget.vue | 243 ++++++++++++++++------ src/views/index.vue | 20 +- 4 files changed, 289 insertions(+), 74 deletions(-) create mode 100644 src/assets/image/no-data-box.svg diff --git a/src/assets/image/no-data-box.svg b/src/assets/image/no-data-box.svg new file mode 100644 index 0000000..10a4241 --- /dev/null +++ b/src/assets/image/no-data-box.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/styles/componets/_widget.scss b/src/assets/styles/componets/_widget.scss index 999d33a..5622952 100644 --- a/src/assets/styles/componets/_widget.scss +++ b/src/assets/styles/componets/_widget.scss @@ -49,7 +49,9 @@ .widget-item { border-radius: 6px; background: rgba(255, 255, 255, 0.95); - overflow: hidden; + // 内置组件的浮层(如课表班级切换下拉)需溢出卡片,故不裁切; + // 卡片圆角由自身背景维持,疑似溢出子元素(iframe)自带底部圆角。 + overflow: visible; margin: 18px 14px 0 14px; &:first-child { margin-top: 0; @@ -71,17 +73,34 @@ justify-content: space-between; align-items: center; border-bottom: 1px solid #e9e9e9; + // 卡头浅灰底(原版观感;合成色曾随壁纸漂移,这里显式钉死) + background: #f7f8f9; + // .widget-item 已改 overflow:visible,卡头底色的顶部圆角需自补 + border-radius: 6px 6px 0 0; color: #344449; font-weight: 700; font-size: 16px; svg { cursor: pointer; } + // 右区:内置组件 header 控件挂载点 + 关闭按钮(.widget-app-header 是 space-between,右区整体靠右) + .widget-header-right { + display: flex; + align-items: center; + gap: 6px; + min-width: 0; + } + .widget-header-extra { + display: flex; + align-items: center; + } } iframe { width: 100%; display: block; min-height: 150px; + // .widget-item 已改为 overflow:visible,页面片段的底部圆角自行补齐 + border-radius: 0 0 6px 6px; } } diff --git a/src/components/widgets/SyllabusWidget.vue b/src/components/widgets/SyllabusWidget.vue index 16c3749..e2b5d36 100644 --- a/src/components/widgets/SyllabusWidget.vue +++ b/src/components/widgets/SyllabusWidget.vue @@ -8,80 +8,124 @@ :paragraph="{ rows: 4 }" animated /> -
- - - - - - - - - -
节{{ week.weekName }}
{{ row.label }} - -
-
-
暂无数据
+ + + +