Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui-react
比较版本
af73a7fc10d67a2c65186a404ef1086e13c01fc1...56a1ec838f55978481d84a7ca14c148fb16ca75b
N
nutui-react
项目概览
京东前端
/
nutui-react
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui-react
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
56a1ec838f55978481d84a7ca14c148fb16ca75b
选择Git版本
...
目标分支
af73a7fc10d67a2c65186a404ef1086e13c01fc1
选择Git版本
比较
Commits (8)
https://gitcode.net/jd/nutui-react/-/commit/8d3718c829e7892873aeb07fff6b0a26a2afaa48
feat: next 分支增加 GitHub Actions 检查 (#884)
2023-04-06T16:33:58+08:00
eiinu
44915689+eiinu@users.noreply.github.com
* feat: 更新 node 版本 增加 github action * fix: 移除 pnpm/setup * fix: update test.yaml * fix: remove build:taro:site
https://gitcode.net/jd/nutui-react/-/commit/0319411e47f3428fde88bbf569d7681cb0142703
chore: add merge-props utils
2023-04-07T18:29:54+08:00
oasis-cloud
suanbanren@foxmail.com
https://gitcode.net/jd/nutui-react/-/commit/f7c507237113afe3dd5f9575681f6d723fd5d263
chore: icons 版本
2023-04-10T10:40:01+08:00
oasis-cloud
suanbanren@foxmail.com
https://gitcode.net/jd/nutui-react/-/commit/b37700eb8fc625f20e228390b8bbed47672a1040
chore: 更新 reactRefresh,删除 pnpm-lock
2023-04-10T11:01:22+08:00
oasis-cloud
suanbanren@foxmail.com
https://gitcode.net/jd/nutui-react/-/commit/127853cc5d9639fc389e2a9e582fe7adc187fd7b
chore: github ci 需要使用 lock 文件
2023-04-10T15:00:18+08:00
oasis-cloud
suanbanren@foxmail.com
https://gitcode.net/jd/nutui-react/-/commit/b2f9fc01ac9e17eade53eceda15c93ec39f48427
chore: 提取 pxCheck 到 utils 中
2023-04-10T17:44:35+08:00
oasis-cloud
suanbanren@foxmail.com
https://gitcode.net/jd/nutui-react/-/commit/c81c79349a351427db448c911b086b602320fa96
chore: 语言切换逻辑修复
2023-04-10T18:59:48+08:00
oasis-cloud
suanbanren@foxmail.com
https://gitcode.net/jd/nutui-react/-/commit/56a1ec838f55978481d84a7ca14c148fb16ca75b
fix: 修复在 style 中设置 css 变量出现的类型错误 (#897)
2023-04-11T18:38:05+08:00
oasis-cloud
suanbanren@foxmail.com
展开全部
显示空白变更内容
内联
并排
Showing
23 changed file
with
2305 addition
and
14453 deletion
+2305
-14453
.github/workflows/test.yml
.github/workflows/test.yml
+57
-0
package.json
package.json
+3
-4
pnpm-lock.yaml
pnpm-lock.yaml
+2214
-2142
src/packages/barrage/barrage.taro.tsx
src/packages/barrage/barrage.taro.tsx
+3
-2
src/packages/calendaritem/calendaritem.taro.tsx
src/packages/calendaritem/calendaritem.taro.tsx
+1
-0
src/packages/dialog/DialogWrapper.taro.tsx
src/packages/dialog/DialogWrapper.taro.tsx
+2
-1
src/packages/dialog/dialog.taro.tsx
src/packages/dialog/dialog.taro.tsx
+1
-1
src/packages/elevator/elevator.taro.tsx
src/packages/elevator/elevator.taro.tsx
+1
-0
src/packages/infiniteloading/infiniteloading.taro.tsx
src/packages/infiniteloading/infiniteloading.taro.tsx
+2
-1
src/packages/virtuallist/virtuallist.taro.tsx
src/packages/virtuallist/virtuallist.taro.tsx
+1
-0
src/sites/mobile-taro/pnpm-lock.yaml
src/sites/mobile-taro/pnpm-lock.yaml
+0
-12292
src/sites/mobile/App.tsx
src/sites/mobile/App.tsx
+1
-1
src/utils/merge-props.ts
src/utils/merge-props.ts
+7
-0
src/utils/px-check.ts
src/utils/px-check.ts
+3
-0
src/utils/typings.ts
src/utils/typings.ts
+1
-1
vite.config.build.css.ts
vite.config.build.css.ts
+1
-1
vite.config.build.disperse.taro.ts
vite.config.build.disperse.taro.ts
+1
-1
vite.config.build.disperse.ts
vite.config.build.disperse.ts
+1
-1
vite.config.build.site.ts
vite.config.build.site.ts
+1
-1
vite.config.build.taro.ts
vite.config.build.taro.ts
+1
-1
vite.config.build.ts
vite.config.build.ts
+1
-1
vite.config.theme.ts
vite.config.theme.ts
+1
-1
vite.config.ts
vite.config.ts
+1
-1
未找到文件。
.github/workflows/test.yml
0 → 100644
浏览文件 @
56a1ec83
name
:
CI
on
:
push
:
branches
:
-
next
pull_request
:
branches
:
-
next
workflow_dispatch
:
jobs
:
test
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Install pnpm
run
:
corepack enable
-
uses
:
actions/setup-node@v2
with
:
node-version
:
'
16'
cache
:
'
pnpm'
-
name
:
Install dependencies
run
:
pnpm install
-
name
:
Run test cases
run
:
npm run test
build
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Install pnpm
run
:
corepack enable
-
uses
:
actions/setup-node@v2
with
:
node-version
:
'
16'
cache
:
'
pnpm'
-
name
:
Install dependencies
run
:
pnpm install
-
name
:
Build NutUI-React
run
:
npm run build
-
name
:
Build NutUI-React-Taro
run
:
npm run build:taro
-
name
:
Build NutUI-React Demo
run
:
npm run build:site
\ No newline at end of file
package.json
浏览文件 @
56a1ec83
...
@@ -91,8 +91,8 @@
...
@@ -91,8 +91,8 @@
"dependencies"
:
{
"dependencies"
:
{
"
@babel/runtime
"
:
"
^7.16.5
"
,
"
@babel/runtime
"
:
"
^7.16.5
"
,
"
@bem-react/classname
"
:
"
^1.5.10
"
,
"
@bem-react/classname
"
:
"
^1.5.10
"
,
"
@nutui/icons-react
"
:
"
0.0.1-beta.
5
"
,
"
@nutui/icons-react
"
:
"
0.0.1-beta.
7
"
,
"
@nutui/icons-react-taro
"
:
"
0.0.1-beta.
5
"
,
"
@nutui/icons-react-taro
"
:
"
0.0.1-beta.
7
"
,
"
@react-spring/web
"
:
"
~9.6.1
"
,
"
@react-spring/web
"
:
"
~9.6.1
"
,
"
@use-gesture/react
"
:
"
10.2.20
"
,
"
@use-gesture/react
"
:
"
10.2.20
"
,
"
async-validator
"
:
"
^4.2.5
"
,
"
async-validator
"
:
"
^4.2.5
"
,
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
"
@types/jest
"
:
"
^27.4.1
"
,
"
@types/jest
"
:
"
^27.4.1
"
,
"
@types/loadable__component
"
:
"
^5.13.3
"
,
"
@types/loadable__component
"
:
"
^5.13.3
"
,
"
@types/lodash.kebabcase
"
:
"
^4.1.6
"
,
"
@types/lodash.kebabcase
"
:
"
^4.1.6
"
,
"
@types/node
"
:
"
^1
5.3.1
"
,
"
@types/node
"
:
"
^1
6.14.0
"
,
"
@types/react
"
:
"
^18.0.17
"
,
"
@types/react
"
:
"
^18.0.17
"
,
"
@types/react-dom
"
:
"
^18.0.6
"
,
"
@types/react-dom
"
:
"
^18.0.6
"
,
"
@types/react-router-dom
"
:
"
^5.1.7
"
,
"
@types/react-router-dom
"
:
"
^5.1.7
"
,
...
@@ -141,7 +141,6 @@
...
@@ -141,7 +141,6 @@
"
@typescript-eslint/eslint-plugin
"
:
"
^4.24.0
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^4.24.0
"
,
"
@typescript-eslint/parser
"
:
"
^4.24.0
"
,
"
@typescript-eslint/parser
"
:
"
^4.24.0
"
,
"
@vitejs/plugin-react
"
:
"
^1.1.3
"
,
"
@vitejs/plugin-react
"
:
"
^1.1.3
"
,
"
@vitejs/plugin-react-refresh
"
:
"
^1.3.1
"
,
"
autoprefixer
"
:
"
^10.4.0
"
,
"
autoprefixer
"
:
"
^10.4.0
"
,
"
axios
"
:
"
^0.21.1
"
,
"
axios
"
:
"
^0.21.1
"
,
"
babel-plugin-react-scoped-css
"
:
"
^1.1.1
"
,
"
babel-plugin-react-scoped-css
"
:
"
^1.1.1
"
,
...
...
pnpm-lock.yaml
浏览文件 @
56a1ec83
此差异已折叠。
点击以展开。
src/packages/barrage/barrage.taro.tsx
浏览文件 @
56a1ec83
...
@@ -19,6 +19,7 @@ export interface BarrageProps {
...
@@ -19,6 +19,7 @@ export interface BarrageProps {
rows
:
number
rows
:
number
top
:
number
top
:
number
}
}
const
defaultProps
=
{
const
defaultProps
=
{
barrageList
:
[],
barrageList
:
[],
frequency
:
500
,
frequency
:
500
,
...
@@ -87,13 +88,13 @@ const InternalBarrage: ForwardRefRenderFunction<
...
@@ -87,13 +88,13 @@ const InternalBarrage: ForwardRefRenderFunction<
let
width
=
100
let
width
=
100
query
query
.
select
(
'
.nut-barrage__body
'
+
timeId
.
current
)
.
select
(
'
.nut-barrage__body
'
+
timeId
.
current
)
.
boundingClientRect
((
rec
)
=>
{
.
boundingClientRect
((
rec
:
any
)
=>
{
width
=
rec
.
width
||
300
width
=
rec
.
width
||
300
})
})
query
query
.
select
(
'
.nut-barrage__item
'
+
index
)
.
select
(
'
.nut-barrage__item
'
+
index
)
.
boundingClientRect
((
recs
)
=>
{
.
boundingClientRect
((
recs
:
any
)
=>
{
let
height
=
recs
.
height
let
height
=
recs
.
height
let
nodeTop
=
(
index
%
rows
)
*
(
height
+
top
)
+
20
+
'
px
'
let
nodeTop
=
(
index
%
rows
)
*
(
height
+
top
)
+
20
+
'
px
'
styleInfo
(
index
,
nodeTop
,
width
)
styleInfo
(
index
,
nodeTop
,
width
)
...
...
src/packages/calendaritem/calendaritem.taro.tsx
浏览文件 @
56a1ec83
...
@@ -855,6 +855,7 @@ export const CalendarItem = React.forwardRef<
...
@@ -855,6 +855,7 @@ export const CalendarItem = React.forwardRef<
<
ScrollView
<
ScrollView
scrollTop
=
{
scrollTop
}
scrollTop
=
{
scrollTop
}
scrollY
scrollY
type
=
"list"
scrollWithAnimation
=
{
scrollWithAnimation
}
scrollWithAnimation
=
{
scrollWithAnimation
}
className
=
"nut-calendar-content"
className
=
"nut-calendar-content"
onScroll
=
{
monthsViewScroll
}
onScroll
=
{
monthsViewScroll
}
...
...
src/packages/dialog/DialogWrapper.taro.tsx
浏览文件 @
56a1ec83
...
@@ -12,7 +12,8 @@ interface DialogWrapperProps {
...
@@ -12,7 +12,8 @@ interface DialogWrapperProps {
}
}
export
const
DialogWrapper
:
FunctionComponent
<
export
const
DialogWrapper
:
FunctionComponent
<
Partial
<
DialogWrapperProps
>
&
Omit
<
HTMLAttributes
<
HTMLDivElement
>
,
'
title
'
>
Partial
<
DialogWrapperProps
>
&
Omit
<
HTMLAttributes
<
HTMLDivElement
>
,
'
title
'
|
'
content
'
>
>
=
(
props
)
=>
{
>
=
(
props
)
=>
{
const
{
visible
,
lockScroll
}
=
props
const
{
visible
,
lockScroll
}
=
props
...
...
src/packages/dialog/dialog.taro.tsx
浏览文件 @
56a1ec83
...
@@ -24,7 +24,7 @@ const defaultProps = {
...
@@ -24,7 +24,7 @@ const defaultProps = {
export
const
BaseDialog
=
forwardRef
(
export
const
BaseDialog
=
forwardRef
(
(
(
props
:
Partial
<
BasicDialogProps
>
&
props
:
Partial
<
BasicDialogProps
>
&
Omit
<
React
.
HTMLAttributes
<
HTMLDivElement
>
,
'
title
'
>
,
Omit
<
React
.
HTMLAttributes
<
HTMLDivElement
>
,
'
title
'
|
'
content
'
>
,
ref
ref
)
=>
{
)
=>
{
const
{
locale
}
=
useConfig
()
const
{
locale
}
=
useConfig
()
...
...
src/packages/elevator/elevator.taro.tsx
浏览文件 @
56a1ec83
...
@@ -231,6 +231,7 @@ export const Elevator: FunctionComponent<
...
@@ -231,6 +231,7 @@ export const Elevator: FunctionComponent<
<
ScrollView
<
ScrollView
scrollTop
=
{
scrollTop
}
scrollTop
=
{
scrollTop
}
scrollY
scrollY
type
=
"list"
className
=
{
b
(
'
list__inner
'
)
}
className
=
{
b
(
'
list__inner
'
)
}
ref
=
{
listview
}
ref
=
{
listview
}
onScroll
=
{
listViewScroll
}
onScroll
=
{
listViewScroll
}
...
...
src/packages/infiniteloading/infiniteloading.taro.tsx
浏览文件 @
56a1ec83
...
@@ -103,7 +103,7 @@ export const Infiniteloading: FunctionComponent<
...
@@ -103,7 +103,7 @@ export const Infiniteloading: FunctionComponent<
const
getScrollHeight
=
()
=>
{
const
getScrollHeight
=
()
=>
{
const
parentElement
=
getParentElement
(
'
scroller
'
)
const
parentElement
=
getParentElement
(
'
scroller
'
)
parentElement
parentElement
.
boundingClientRect
((
rect
)
=>
{
.
boundingClientRect
((
rect
:
any
)
=>
{
scrollHeight
.
current
=
rect
.
height
scrollHeight
.
current
=
rect
.
height
})
})
.
exec
()
.
exec
()
...
@@ -197,6 +197,7 @@ export const Infiniteloading: FunctionComponent<
...
@@ -197,6 +197,7 @@ export const Infiniteloading: FunctionComponent<
className
=
{
classes
}
className
=
{
classes
}
scrollY
scrollY
id
=
"scroller"
id
=
"scroller"
type
=
"list"
style
=
{
{
height
:
'
100%
'
}
}
style
=
{
{
height
:
'
100%
'
}
}
onScroll
=
{
scrollAction
}
onScroll
=
{
scrollAction
}
onScrollToLower
=
{
lower
}
onScrollToLower
=
{
lower
}
...
...
src/packages/virtuallist/virtuallist.taro.tsx
浏览文件 @
56a1ec83
...
@@ -177,6 +177,7 @@ export const VirtualList: FunctionComponent<
...
@@ -177,6 +177,7 @@ export const VirtualList: FunctionComponent<
<
ScrollView
<
ScrollView
scrollTop
=
{
0
}
scrollTop
=
{
0
}
scrollY
scrollY
type
=
"list"
ref
=
{
scrollRef
}
ref
=
{
scrollRef
}
className
=
"nut-virtuallist"
className
=
"nut-virtuallist"
style
=
{
{
style
=
{
{
...
...
src/sites/mobile-taro/pnpm-lock.yaml
已删除
100644 → 0
浏览文件 @
af73a7fc
此差异已折叠。
点击以展开。
src/sites/mobile/App.tsx
浏览文件 @
56a1ec83
...
@@ -116,7 +116,7 @@ const WithNavRouter = (C: LoadableComponent<any>) => {
...
@@ -116,7 +116,7 @@ const WithNavRouter = (C: LoadableComponent<any>) => {
className
=
{
'
dark-model
'
}
className
=
{
'
dark-model
'
}
src
=
"https://img14.360buyimg.com/imagetools/jfs/t1/135168/8/21387/6193/625fa81aEe07cc347/55ad5bc2580c53a6.png"
src
=
"https://img14.360buyimg.com/imagetools/jfs/t1/135168/8/21387/6193/625fa81aEe07cc347/55ad5bc2580c53a6.png"
alt
=
""
alt
=
""
onClick
=
{
()
=>
handleSwitch
DarkModel
()
}
onClick
=
{
()
=>
handleSwitch
Locale
()
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/utils/merge-props.ts
0 → 100644
浏览文件 @
56a1ec83
export
function
mergeProps
<
T
,
U
>
(
defaultProps
:
T
,
props
:
U
):
{
[
Key
in
Extract
<
keyof
T
,
keyof
U
>
]:
U
[
Key
]
}
&
{
[
Key
in
Exclude
<
keyof
U
,
keyof
T
>
]?:
U
[
Key
]
}
{
return
{
...
defaultProps
,
...
props
}
}
src/utils/px-check.ts
0 → 100644
浏览文件 @
56a1ec83
export
const
pxCheck
=
(
value
:
string
|
number
):
string
=>
{
return
Number
.
isNaN
(
Number
(
value
))
?
String
(
value
)
:
`
${
value
}
px`
}
src/utils/typings.ts
浏览文件 @
56a1ec83
...
@@ -2,7 +2,7 @@ import type { CSSProperties, ReactNode } from 'react'
...
@@ -2,7 +2,7 @@ import type { CSSProperties, ReactNode } from 'react'
export
interface
BasicComponent
{
export
interface
BasicComponent
{
className
?:
string
className
?:
string
style
?:
CSSProperties
style
?:
CSSProperties
&
Record
<
`--
${
string
}
`
,
string
|
number
>
children
?:
ReactNode
children
?:
ReactNode
}
}
...
...
vite.config.build.css.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
const
atImport
=
require
(
'
postcss-import
'
)
const
atImport
=
require
(
'
postcss-import
'
)
...
...
vite.config.build.disperse.taro.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
import
path
from
'
path
'
import
path
from
'
path
'
import
config
from
'
./src/config.json
'
import
config
from
'
./src/config.json
'
...
...
vite.config.build.disperse.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
import
path
from
'
path
'
import
path
from
'
path
'
import
commonjs
from
'
@rollup/plugin-commonjs
'
import
commonjs
from
'
@rollup/plugin-commonjs
'
import
typescript
from
'
@rollup/plugin-typescript
'
import
typescript
from
'
@rollup/plugin-typescript
'
...
...
vite.config.build.site.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
const
atImport
=
require
(
'
postcss-import
'
)
const
atImport
=
require
(
'
postcss-import
'
)
...
...
vite.config.build.taro.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
import
autoprefixer
from
'
autoprefixer
'
import
autoprefixer
from
'
autoprefixer
'
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
...
...
vite.config.build.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
import
autoprefixer
from
'
autoprefixer
'
import
autoprefixer
from
'
autoprefixer
'
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
...
...
vite.config.theme.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
import
autoprefixer
from
'
autoprefixer
'
import
autoprefixer
from
'
autoprefixer
'
const
atImport
=
require
(
'
postcss-import
'
)
const
atImport
=
require
(
'
postcss-import
'
)
...
...
vite.config.ts
浏览文件 @
56a1ec83
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
'
vite
'
import
reactRefresh
from
'
@vitejs/plugin-react
-refresh
'
import
reactRefresh
from
'
@vitejs/plugin-react
'
const
atImport
=
require
(
'
postcss-import
'
)
const
atImport
=
require
(
'
postcss-import
'
)
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
...
...