-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support floating icon #267
Changes from 28 commits
843d3fe
ef39f5b
1c45294
1059efa
6ee0809
41072f3
bfccbad
f765ad5
326a9d1
6fa343a
4cc9214
85a8329
12588b4
b75d02a
0c8aba6
aeb949c
e51bc42
9650933
af0722e
afc8c12
21e59c0
bb11fdf
34eb1b5
a662975
a19d86e
de3cef3
7af11e4
8c83082
5b19353
df703aa
8fcb4ad
3d7af02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ yarn-error.log | |
package.json.lerna_backup | ||
lerna-debug.log | ||
.env | ||
.vscode | ||
.vscode | ||
.history |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
|
||
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion ESLint 规则禁用范围过大 建议只在必要的地方禁用特定规则,而不是完全禁用类型检查。这样可以保持更好的代码质量和类型安全性。 - /* eslint-disable @typescript-eslint/no-unsafe-assignment */
+ // 仅在确实需要的地方禁用特定规则
|
||
export const Logo = ({ style }: { style: any }) => ( | ||
<img | ||
alt="Logo" | ||
style={style} | ||
src="data:image/webp;base64,UklGRswEAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSCgDAAABoGTbtuq6OdLTNzPbxXCJoehehJlKbkKYmZMGMDPUmZmZOWaM3tN9axXuvVKaEBETEPXhvIhYdOw5Nz35xld//wf//f3Vm0/edO6xiyJi3jBmHsxFLD7poZ/9H39+6KRFEXODGZphLL/iN9WubbvUo/Spa8ed6m9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z5k66v9TsX4ZHJ5vxopXrXVhzZQUpWcle5eRr0hlxA/4qZCdCu7tBQ5hgNercW+3c8xj+8Y/zuF1X58pDYUF3k54O/II2gG8Dqeo/A55jNiCpze2OAuo27ogApJXra1b+faewFXX38yPcZcdAUmJbAX3uojPiByizCXOCi4wxWsVeiO7lp3pZm8f0ZyYUdSt4Zp0OC1vqmHm6T91y+5ksk6nQ1HLhk4+cITpVoLHyAFiOAJR65xrUvCXEZkm4vPDlcD+/++gTsKJ77gEkOU8XBObUsURriu7kcnYOLmxbgVkhgyFKQgHakg1e2tS8mJzSAA" | ||
/> | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 需要改进的几个关键点
建议按如下方式修改: - export const Logo = ({ style }: { style: any }) => (
+ import logoImage from './assets/logo.webp';
+
+ export const Logo = ({ style }: { style: React.CSSProperties }) => (
<img
alt="Logo"
style={style}
- src="data:image/webp;base64,UklGR..."
+ src={logoImage}
+ onError={(e) => {
+ e.currentTarget.style.display = 'none';
+ }}
/>
)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
新增 preact 依赖
新增了 preact 依赖用于实现浮动图标功能,版本选择合适。建议在 README 中说明使用 preact 的原因。