2.3.0升级问题及方案 #1779
xiaoyatong
started this conversation in
Show and tell
2.3.0升级问题及方案
#1779
Replies: 1 comment
-
你好,希望看看这个是 BUG 还是 FR: #1807 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(文档持续更新中)
当前项目为 2.2.0 版本,现升级到 2.3.0 版本,需关注几点:
1、类名修订,将
__
和--
统一简写为-
,除此之外,样式命名还是遵循nut-组件名-元素-状态
的规范。2、样式变量修订,对于通用部分做了规范命名。命名规则为
类型-属性-变体
,如color-primary
、font-size-base
、font-weight-bold
,color-title
、color-text
、color-text-help
、color-text-disabled
等。更多细节,可参看文件:https://github.com/jdf2e/nutui-react/blob/next/src/styles/variables.scss
同时,对于通用部分做了扩展,参看:
https://github.com/jdf2e/nutui-react/blob/next/src/styles/theme-default.scss
3、Icon 命名做了部分变更,目标是统一规范、去除一些。
可能你还会遇到一些其他问题,我们尝试给出一些修复方案:
修复报错,缺失icon:
⚠️ Warnings:
at HarmonyImportSpecifierDependency.getLinkingErrors (/Users/tongen/Documents/开源/UI-Demos/my-nutui-2.x/node_modules/.pnpm/webpack@5.89.0_@swc[email protected]/node_modules/webpack/lib/dependencies/HarmonyImportDependency.js:163:8)
ModuleDependencyWarning: export 'Left' (imported as 'Left') was not found in '@nutui/icons-react-taro'
主要是因为 icon 引起。在新的 icon 库中,部分名称进行了变更,使名称更规范化。
这是因为 CSS 变量做了规范,对应如下:
Beta Was this translation helpful? Give feedback.
All reactions