Skip to content

Commit f33628e

Browse files
authored
fix ppt preview in debug mode
1 parent e29e33e commit f33628e

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/components/OfficePreview/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ export default function OfficePreview(props) {
1313
{ () => {
1414
// return <iframe src={"//view.officeapps.live.com/op/view.aspx?src=" + window.location.protocol + "//" + window.location.host + props.place} >这是嵌入 <a target="_blank" href="https://office.com">Microsoft Office</a> 演示文稿,由 <a target="_blank" href="https://office.com/webapps">Office</a> 提供支持。</iframe>
1515
// 得出移动端和桌面端的链接
16-
if (props.place.startsWith("/") && config.baseUrl.endsWith("/")) {
17-
props.place = props.place.substr(1);
16+
let propsPlace = props.place;
17+
if (propsPlace.startsWith("/") && config.baseUrl.endsWith("/")) {
18+
propsPlace = propsPlace.substr(1);
1819
}
1920

20-
const targetUrl = config.baseUrl + props.place;
21+
const targetUrl = config.baseUrl + propsPlace;
2122

2223
const mobileOfficeUrl = "//view.officeapps.live.com/op/embed.aspx?src=" + window.location.protocol + "//" + window.location.host + targetUrl;
2324
const desktopOfficeUrl = "//view.officeapps.live.com/op/view.aspx?src=" + window.location.protocol + "//" + window.location.host + targetUrl;

src/css/custom.css

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,16 @@
7575
width: 100%;
7676
height: min(556.125px, calc(56.25vw + 17.375px));
7777
}
78-
}
78+
}
79+
80+
81+
/* 顶栏的头像 */
82+
.navbar__logo img {
83+
border-radius: 50%;
84+
transition: transform 0.5s; /* 添加过渡效果 */
85+
}
86+
87+
.navbar__logo img:hover {
88+
transform: rotate(360deg); /* 鼠标悬停时旋转 */
89+
}
90+

0 commit comments

Comments
 (0)