-
Notifications
You must be signed in to change notification settings - Fork 199
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
chore(react-componnets): 分析配置组件包初始化 #2751
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。 Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it. |
Size Change: -1.11 kB (-0.34%) Total Size: 322 kB
ℹ️ View Unchanged
|
|
||
let sheetInstance: SpreadSheet; | ||
|
||
function MainLayout() { | ||
const options: SheetComponentsProps['options'] = { |
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.
类型名一直是错的, 多了一个 s
, 和 SheetComponentOptions
保持一致
@@ -1,12 +1,11 @@ | |||
import { TOOLTIP_PREFIX_CLS } from '@antv/s2'; | |||
import { Menu } from 'antd'; | |||
import type { ItemType } from 'antd/lib/menu/hooks/useItems'; |
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.
新版本的 antd 可以通过 GetProp
工具体操取内部未导出的 props 了
@@ -79,8 +80,3 @@ export const TooltipOperator: React.FC<Required<TooltipOperatorProps>> = | |||
}); | |||
|
|||
TooltipOperator.displayName = 'TooltipOperator'; | |||
TooltipOperator.defaultProps = { |
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.
React 18.3.0 废弃了 defaultProps
|
||
const DEFAULT_PAGE_SIZE = 10; | ||
const DEFAULT_PAGE_NUMBER = 1; | ||
|
||
export const usePagination = (s2: SpreadSheet, props: SheetComponentsProps) => { | ||
export const usePagination = ( |
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.
ref: #1790,看看这个是不是可以顺带优化 |
可以, 后面分不同的 PR 优化吧, 这个 PR 只做初始化和代码格式化 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2751 +/- ##
==========================================
+ Coverage 75.77% 80.16% +4.39%
==========================================
Files 257 176 -81
Lines 11994 10210 -1784
Branches 2464 2311 -153
==========================================
- Hits 9088 8185 -903
+ Misses 1398 599 -799
+ Partials 1508 1426 -82 ☔ View full report in Codecov by Sentry. |
🎉 This PR is included in version @antv/s2-v2.0.0-next.24 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v2.0.0-next.23 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-vue-v2.0.0-next.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-components-v1.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
👀 PR includes
🔧 Chore
@antv/s2-react-componnets
初始化)📝 Description
确定的点:
后面可以做的 (待讨论的点):
SheetComponents
的 header (switcher/advanceSort) 配置, 只保留导出, 如果需要使用分析组件, 自行组合使用即可.该 PR 改动点:
prettier-plugin-packagejson
和prettier-plugin-organize-imports
插件, 自动移除未使用的导入 (全量格式化)🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge