...
 
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
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
此差异已折叠。
......@@ -19,6 +19,7 @@ export interface BarrageProps {
rows: number
top: number
}
const defaultProps = {
barrageList: [],
frequency: 500,
......@@ -87,13 +88,13 @@ const InternalBarrage: ForwardRefRenderFunction<
let width = 100
query
.select('.nut-barrage__body' + timeId.current)
.boundingClientRect((rec) => {
.boundingClientRect((rec: any) => {
width = rec.width || 300
})
query
.select('.nut-barrage__item' + index)
.boundingClientRect((recs) => {
.boundingClientRect((recs: any) => {
let height = recs.height
let nodeTop = (index % rows) * (height + top) + 20 + 'px'
styleInfo(index, nodeTop, width)
......
......@@ -855,6 +855,7 @@ export const CalendarItem = React.forwardRef<
<ScrollView
scrollTop={scrollTop}
scrollY
type="list"
scrollWithAnimation={scrollWithAnimation}
className="nut-calendar-content"
onScroll={monthsViewScroll}
......
......@@ -12,7 +12,8 @@ interface DialogWrapperProps {
}
export const DialogWrapper: FunctionComponent<
Partial<DialogWrapperProps> & Omit<HTMLAttributes<HTMLDivElement>, 'title'>
Partial<DialogWrapperProps> &
Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'content'>
> = (props) => {
const { visible, lockScroll } = props
......
......@@ -24,7 +24,7 @@ const defaultProps = {
export const BaseDialog = forwardRef(
(
props: Partial<BasicDialogProps> &
Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>,
Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'content'>,
ref
) => {
const { locale } = useConfig()
......
......@@ -231,6 +231,7 @@ export const Elevator: FunctionComponent<
<ScrollView
scrollTop={scrollTop}
scrollY
type="list"
className={b('list__inner')}
ref={listview}
onScroll={listViewScroll}
......
......@@ -103,7 +103,7 @@ export const Infiniteloading: FunctionComponent<
const getScrollHeight = () => {
const parentElement = getParentElement('scroller')
parentElement
.boundingClientRect((rect) => {
.boundingClientRect((rect: any) => {
scrollHeight.current = rect.height
})
.exec()
......@@ -197,6 +197,7 @@ export const Infiniteloading: FunctionComponent<
className={classes}
scrollY
id="scroller"
type="list"
style={{ height: '100%' }}
onScroll={scrollAction}
onScrollToLower={lower}
......
......@@ -177,6 +177,7 @@ export const VirtualList: FunctionComponent<
<ScrollView
scrollTop={0}
scrollY
type="list"
ref={scrollRef}
className="nut-virtuallist"
style={{
......
此差异已折叠。
......@@ -116,7 +116,7 @@ const WithNavRouter = (C: LoadableComponent<any>) => {
className={'dark-model'}
src="https://img14.360buyimg.com/imagetools/jfs/t1/135168/8/21387/6193/625fa81aEe07cc347/55ad5bc2580c53a6.png"
alt=""
onClick={() => handleSwitchDarkModel()}
onClick={() => handleSwitchLocale()}
/>
</div>
</div>
......
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 }
}
export const pxCheck = (value: string | number): string => {
return Number.isNaN(Number(value)) ? String(value) : `${value}px`
}
......@@ -2,7 +2,7 @@ import type { CSSProperties, ReactNode } from 'react'
export interface BasicComponent {
className?: string
style?: CSSProperties
style?: CSSProperties & Record<`--${string}`, string | number>
children?: ReactNode
}
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
const path = require('path')
const atImport = require('postcss-import')
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
import path from 'path'
import config from './src/config.json'
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
import path from 'path'
import commonjs from '@rollup/plugin-commonjs'
import typescript from '@rollup/plugin-typescript'
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
const path = require('path')
const atImport = require('postcss-import')
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
import autoprefixer from 'autoprefixer'
const path = require('path')
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
import autoprefixer from 'autoprefixer'
const path = require('path')
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
import autoprefixer from 'autoprefixer'
const atImport = require('postcss-import')
......
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import reactRefresh from '@vitejs/plugin-react'
const atImport = require('postcss-import')
const path = require('path')
......