-
Notifications
You must be signed in to change notification settings - Fork 91
feat: HTML2Canvas #243
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
base: master
Are you sure you want to change the base?
feat: HTML2Canvas #243
Conversation
✅ Deploy Preview for sustech-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
添加的依赖为: + "dom-to-image-more": "^3.5.0",
+ "qrcodejs2": "^0.0.2"稍晚一些我改一下ui组件以及看下能不能更新到其他的包 |
|
iPhone 上 Safari 不能使用 此外引入 Tailwind CSS 或者 UnoCSS 会不会让样式代码短一些 不嫌麻烦的话建议用 TypeScript 写? |
sghng
left a comment
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.
除此之外,tsconfig 里面也可以配置 globals
{
"compilerOptions": {
...
},
"globals": {
"browser": true
}
}
不太清楚配置了 tsconfig 之后还需不需要 eslint 里面再配置一次 globals
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.
ESLint 配置不需要手动加这么多 globals,只需要这样即可:
languageOptions: {
globals: {
...globals.browser,
},
},
需要安装 globals 作为依赖
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.
这个类型声明也是不需要的,都包含在 globals 这个包里面了
本PR实现了分享卡片功能的全面优化,主要包括:
原本采用 html2canvas,实际采用 dom-to-image-more
使用指南:
1.选择对应文字会在正上方显示 复制文字 和 分享 两个按钮。
2.点击复制复制文字,点击分享弹出卡片预览框
测试: Windows 10, MS Edge 与 Google Chrome