Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/S2Public

🎉 S2 2.0 版本开始内测啦 !!!#1933

Closed PinnedUnanswered
lijinke666 asked this question inQ&A
Nov 22, 2022· 9 comments· 7 replies
Discussion options

了解 2.0 版本新特性 -S2 2.0 表格看数新纪元roadmap

🏠 官网地址变化

原官网https://s2.antv.visionhttps://antv-s2.gitee.io 不再维护和使用,请使用最新的文档,确保您看到的不是过时的文档。

🏷️ npm dist-tag 变化

什么是dist-tag ?

S2 2.0 版本目前处于内测阶段, 部分 API 可能会根据合理性随时改动。

npmdist-tag 对应关系如下:

  • @antv/s2@next 对应2.x 版本
  • @antv/s2@latest 对应1.x 版本

📅 正式版本发布时间

目前next 会持续内测一段时间,https://s2.antv.antgroup.com 会作为相应的文档网站。

在此期间,会持续根据用户的反馈进行 Bug fix 和代码调整,在@antv/s2@next 版本稳定后,会发布正式版本,latest 将默认指向2.x 版本,去除next 标识。

🗓️ v1 版本维护期

目前v1 版本会继续维护,针对BUG 发布Patch 版本修复,但不再接收新的Feature RequestFeature Pull Request,欢迎Bug Fix Pull Request, 截止日期为2024 年年底。

📦 安装

PackageVersionSizeDownload
@antv/s2nextsizedownload
@antv/s2-reactnextsizedownload
@antv/s2-vuenextsizedownload
# 基础版本yarn add @antv/s2@next --save# React 版本yarn add @antv/s2-react@next antd @ant-design/icons --save# Vue3 版本yarn add @antv/s2-vue@next ant-design-vue@3.x --save

@antv/s2-react 支持 React 18 和 Ant Design 5.0

@antv/s2-react2.x 版本适配了React 18, 并兼容React 16 和 17, 分析组件升级到了antd@5.x.

Ant Design 多版本共存

对于项目使用的是antd@4.x, 或者所依赖的其他库依赖antd@4.x, 由于种种历史原因无法升级到antd@5.x 的情况,可以通过多版本共存 的方式来临时过渡。

// $ npm install --save antd-v5@npm:antd@5{"antd":"4.x","antd-v5":"npm:antd@5"}

通过 Webpack 内置插件NormalModuleReplacementPlugin 或者自定义 Webpack 插件 的方式指定@antv/s2-react 使用antd-v5, 无需做任何修改,项目中其他依赖将继续使用antd@4.x.

:::warning{title="注意"}
其他打包工具 (如Vite) 或者基于Webpack 封装的库或框架(如father,umi) 同理,请自行搜索,这里不再赘述。
需要注意的是:这种方式为临时过渡解决方案,从长远来看,Ant Design v4 版本已于 2023 年年底停止维护,建议尽快升级至antd@5.x.
:::

自定义 Webpack 插件参考:

classAntdV5AliasPlugin{apply(compiler){compiler.hooks.normalModuleFactory.tap("AntdV5AliasPlugin",(nmf)=>{nmf.hooks.beforeResolve.tapAsync("AntdV5AliasPlugin",(resolveData,callback)=>{if(resolveData.contextInfo?.issuer?.includes('node_modules/@antv/s2-react')){// 匹配:"antd" 和 "antd/es/locale/xxx"if(/antd(\/*)?/.test(resolveData.request)){// 替换为:"antd-v5" 和 "antd-v5/es/locale/xxx"resolveData.request=resolveData.request.replace(/antd(\/*)?/,'antd-v5$1')}}callback();});});}}

欢迎尝鲜, 有任何问题欢迎在讨论区或 issue 区留言评论.

You must be logged in to vote

Replies: 9 comments 7 replies

Comment options

希望能支持表头和表格内容自动换行的功能, 跪求~~~

You must be logged in to vote
2 replies
@wozien
Comment options

+1

@lijinke666
Comment options

lijinke666Nov 22, 2023
Maintainer Author

已支持#2383

Comment options

啥时候发布啊,现在用next版本没有文档不知道咋搞啊

You must be logged in to vote
1 reply
@LaraineR
Comment options

+1

Comment options

是推迟发布了吗,有没有进一步消息?

You must be logged in to vote
0 replies
Comment options

最近正好项目中需要,也遇到一些需求,发现2.0的版本更满足功能。想知道2.0版本什么时候发布,如果两个月内的话,我正好先试用next版本。

You must be logged in to vote
0 replies
Comment options

lijinke666
Feb 2, 2024
Maintainer Author

通告更新了, 相关疑惑请查看置顶消息.

You must be logged in to vote
0 replies
Comment options

想要使用s2-react2.x还要把antd到5.x啊 😧

You must be logged in to vote
2 replies
@lijinke666
Comment options

lijinke666Mar 19, 2024
Maintainer Author

是的

@zhangming9502
Comment options

+1

Comment options

升级2.0必须还要升级 antd 到 5.0 吗
Snipaste_2024-03-19_14-47-46

You must be logged in to vote
2 replies
@lijinke666
Comment options

lijinke666Mar 19, 2024
Maintainer Author

是的

@zhangming9502
Comment options

+1

Comment options

正式版本什么时候发布o

You must be logged in to vote
0 replies
Comment options

lijinke666
Dec 4, 2024
Maintainer Author

#2986

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
11 participants
@lijinke666@oliver34@wozien@iLoongDD@RJM1996@QJerryxjh@G0wtherZ@LaraineR@liqiuqiui@zhangming9502@z-h2o

[8]ページ先頭

©2009-2025 Movatter.jp