From fada59a958d0436a853168fec6645f4135e28f2d Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Tue, 26 Dec 2023 08:57:59 +0800 Subject: [PATCH 001/275] fix(watermark): fix demos (#1817) --- src/packages/watermark/demo.taro.tsx | 8 ++------ src/packages/watermark/demo.tsx | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/packages/watermark/demo.taro.tsx b/src/packages/watermark/demo.taro.tsx index 6676668148..48289b0932 100644 --- a/src/packages/watermark/demo.taro.tsx +++ b/src/packages/watermark/demo.taro.tsx @@ -33,11 +33,8 @@ const WaterMarkDemo = () => { }) const [flag, setFlag] = useState(false) - const src = useRef( - '//storage.360buyimg.com/imgtools/e067cd5b69-07c864c0-dd02-11ed-8b2c-d7f58b17086a.png' - ) const imgSrc = useRef( - '//m.360buyimg.com/imagetools/jfs/t1/57345/6/20069/8019/62b995cdEd96fef03/51d3302dfeccd1d2.png' + 'https://img13.360buyimg.com/imagetools/jfs/t1/230451/22/10532/3288/65893454Fa4cb86ab/5f564e17d19f4f29.png' ) const showTextMark = () => { @@ -71,8 +68,7 @@ const WaterMarkDemo = () => { )}

{translated.fa139733}

- - + diff --git a/src/packages/watermark/demo.tsx b/src/packages/watermark/demo.tsx index 06abada100..d8afca57eb 100644 --- a/src/packages/watermark/demo.tsx +++ b/src/packages/watermark/demo.tsx @@ -33,9 +33,6 @@ const WaterMarkDemo = () => { }) const [flag, setFlag] = useState(false) - const src = useRef( - '//storage.360buyimg.com/imgtools/e067cd5b69-07c864c0-dd02-11ed-8b2c-d7f58b17086a.png' - ) const imgSrc = useRef( '//m.360buyimg.com/imagetools/jfs/t1/57345/6/20069/8019/62b995cdEd96fef03/51d3302dfeccd1d2.png' ) @@ -70,8 +67,7 @@ const WaterMarkDemo = () => { )}

{translated.fa139733}

- - + From d34be66e605c281d34cc51b02c4ad25156b5d9df Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Tue, 26 Dec 2023 09:01:09 +0800 Subject: [PATCH 002/275] fix(popover): icon cannot be displayed at taro (#1820) --- src/packages/popover/popover.taro.tsx | 8 +++++--- src/packages/popover/popover.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/packages/popover/popover.taro.tsx b/src/packages/popover/popover.taro.tsx index 391988c45c..3b1c7a024c 100644 --- a/src/packages/popover/popover.taro.tsx +++ b/src/packages/popover/popover.taro.tsx @@ -342,16 +342,18 @@ export const Popover: FunctionComponent< onClick={() => handleSelect(item, index)} > {item.icon ? ( - {item.icon} +
+ {item.icon} +
) : null}
{item.name}
{item.action && item.action.icon ? ( - item.action?.onClick?.(e)} > {item.action.icon} - + ) : null} ) diff --git a/src/packages/popover/popover.tsx b/src/packages/popover/popover.tsx index 1dad7bdcaa..496689147c 100644 --- a/src/packages/popover/popover.tsx +++ b/src/packages/popover/popover.tsx @@ -329,16 +329,18 @@ export const Popover: FunctionComponent< onClick={() => handleSelect(item, index)} > {item.icon ? ( - {item.icon} +
+ {item.icon} +
) : null}
{item.name}
{item.action && item.action.icon ? ( - item.action?.onClick?.(e)} > {item.action.icon} - + ) : null} ) From 646868694131a2139a5631890da8a8d35b3986b4 Mon Sep 17 00:00:00 2001 From: RyanCW <75795462+Ryan-CW-Code@users.noreply.github.com> Date: Tue, 26 Dec 2023 09:47:36 +0800 Subject: [PATCH 003/275] =?UTF-8?q?fix(datepicker):=20=E6=9C=AA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20value/defaultValue=20=E6=97=B6=E6=B8=B2=E6=9F=93=20?= =?UTF-8?q?0=20(#1819)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/datepicker/datepicker.taro.tsx | 4 +--- src/packages/datepicker/datepicker.tsx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/packages/datepicker/datepicker.taro.tsx b/src/packages/datepicker/datepicker.taro.tsx index 2d14af8dde..661daf1759 100644 --- a/src/packages/datepicker/datepicker.taro.tsx +++ b/src/packages/datepicker/datepicker.taro.tsx @@ -359,9 +359,7 @@ export const DatePicker: FunctionComponent< } useEffect(() => { - if (selectedDate) { - setPickerOptions(columns()) - } + setPickerOptions(columns()) }, [selectedDate, startDate, endDate]) return ( diff --git a/src/packages/datepicker/datepicker.tsx b/src/packages/datepicker/datepicker.tsx index baef5af86d..d7f4be5c8f 100644 --- a/src/packages/datepicker/datepicker.tsx +++ b/src/packages/datepicker/datepicker.tsx @@ -359,9 +359,7 @@ export const DatePicker: FunctionComponent< } useEffect(() => { - if (selectedDate) { - setPickerOptions(columns()) - } + setPickerOptions(columns()) }, [selectedDate, startDate, endDate]) return ( From a8f20b68d0bfd18d2c8f9bb3c597d3b7743f04d6 Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Wed, 27 Dec 2023 16:41:38 +0800 Subject: [PATCH 004/275] fix(popver): bottom positon (#1823) --- .../popover/__tests__/popover.spec.tsx | 70 +++++++++++++++++++ src/packages/popover/popover.scss | 36 ++++++---- 2 files changed, 91 insertions(+), 15 deletions(-) diff --git a/src/packages/popover/__tests__/popover.spec.tsx b/src/packages/popover/__tests__/popover.spec.tsx index 5dc5816340..1ad9bf5988 100644 --- a/src/packages/popover/__tests__/popover.spec.tsx +++ b/src/packages/popover/__tests__/popover.spec.tsx @@ -50,6 +50,76 @@ test('render popover content', async () => { ) }) +test('render popover position', async () => { + const { container } = render( + + + + ) + const content = container.querySelectorAll('.nut-popover-content')[0] + expect(content.className).toContain( + 'nut-popup-default nut-popover-content nut-popover-content-bottom-start' + ) +}) + +test('render popover position2', async () => { + const { container } = render( + + + + ) + const content = container.querySelectorAll( + '.nut-popover-arrow' + )[0] as HTMLElement + expect(content).toHaveAttribute('style', 'left: 36px;') +}) + +test('render popover position22', async () => { + const { container } = render( + + + + ) + const content = container.querySelectorAll( + '.nut-popover-arrow' + )[0] as HTMLElement + expect(content).toHaveAttribute('style', 'left: calc(50% + 20px);') +}) + +test('render popover position3', async () => { + const { container } = render( + + + + ) + const content = container.querySelectorAll( + '.nut-popover-arrow' + )[0] as HTMLElement + expect(content).toHaveAttribute('style', 'top: -4px;') +}) + +test('render popover position33', async () => { + const { container } = render( + + + + ) + const content = container.querySelectorAll( + '.nut-popover-arrow' + )[0] as HTMLElement + expect(content).toHaveAttribute('style', 'top: calc(50% - 20px);') +}) + test('should emit onchoose event when clicking the action', async () => { const choose = jest.fn() const { container } = render( diff --git a/src/packages/popover/popover.scss b/src/packages/popover/popover.scss index ff4a17cf8d..d9c63ae558 100644 --- a/src/packages/popover/popover.scss +++ b/src/packages/popover/popover.scss @@ -23,21 +23,6 @@ border-bottom-color: $popover-border-color; border-top-width: 0; margin-top: -8px; - - &.nut-popover-arrow-bottom { - left: 50%; - transform: translateX(-50%); - } - - &.nut-popover-arrow-bottom-start { - left: 16px; - transform: translateX(0%); - } - - &.nut-popover-arrow-bottom-end { - right: 16px; - transform: translateX(0%); - } } &-left { @@ -190,10 +175,31 @@ } } + &-bottom { + .nut-popover-arrow-bottom { + left: 50%; + transform: translateX(-50%); + } + } + &-bottom-end { + .nut-popover-arrow-bottom-end { + right: 16px; + transform: translateX(0%); + } + right: 0; } + &-bottom-start { + left: 0; + + .nut-popover-arrow-bottom-start { + left: 16px; + transform: translateX(0%); + } + } + &-left-end { bottom: 0; } From d33697cc7fe62a85c0cb9816d7336450194d26dd Mon Sep 17 00:00:00 2001 From: MingHui Date: Thu, 28 Dec 2023 09:24:13 +0800 Subject: [PATCH 005/275] =?UTF-8?q?docs(nabvar):=20showtoas=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20showToast=20(#1826)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将文档中的例子Taro.showtoast更改为Taro.showToast --- src/packages/navbar/doc.taro.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/packages/navbar/doc.taro.md b/src/packages/navbar/doc.taro.md index ac9f0281a6..c081db3761 100644 --- a/src/packages/navbar/doc.taro.md +++ b/src/packages/navbar/doc.taro.md @@ -33,13 +33,13 @@ const App = () => { } left={} right={ - Taro.showtoast({ title: 'icon' })}> + Taro.showToast({ title: 'icon' })}> } - onBackClick={(e) => Taro.showtoast({ title: '返回' })} + onBackClick={(e) => Taro.showToast({ title: '返回' })} > - Taro.showtoast({ title: '标题' })}> + Taro.showToast({ title: '标题' })}> 订单详情 @@ -63,14 +63,14 @@ const App = () => { return ( Taro.showtoast({ title: '清空' })}> + Taro.showToast({ title: '清空' })}> 清空 } back={} - onBackClick={(e) => Taro.showtoast({ title: '返回' })} + onBackClick={(e) => Taro.showToast({ title: '返回' })} > - Taro.showtoast({ title: '标题' })}> + Taro.showToast({ title: '标题' })}> 浏览记录 @@ -96,18 +96,18 @@ const App = () => { back={} right={ <> - Taro.showtoast({ title: '编辑' })}> + Taro.showToast({ title: '编辑' })}> 编辑 - Taro.showtoast({ title: 'icon' })} /> + Taro.showToast({ title: 'icon' })} /> } - onBackClick={(e) => Taro.showtoast({ title: '返回' })} + onBackClick={(e) => Taro.showToast({ title: '返回' })} > - Taro.showtoast({ title: '标题' })}> + Taro.showToast({ title: '标题' })}> 购物车 - Taro.showtoast({ title: 'icon' })}> + Taro.showToast({ title: 'icon' })}> @@ -134,13 +134,13 @@ const App = () => { back={} right={ <> - Taro.showtoast({ title: '编辑' })}> + Taro.showToast({ title: '编辑' })}> 编辑 - Taro.showtoast({ title: 'icon' })} /> + Taro.showToast({ title: 'icon' })} /> } - onBackClick={(e) => Taro.showtoast({ title: '返回' })} + onBackClick={(e) => Taro.showToast({ title: '返回' })} > { setTab1value(paneKey) }}> Tab 1 @@ -225,4 +225,4 @@ export default App; | \--nutui-navbar-font-size | 头部导航的字体大小 | `$font-size-base` | | \--nutui-navbar-title-font-size | 头部导航标题的字体大小 | `$font-size-base` | | \--nutui-navbar-title-font-weight | 头部导航标题的字体粗细 | `0` | -| \--nutui-navbar-title-font-color | 头部导航标题的字体颜色 | `$color-title` | \ No newline at end of file +| \--nutui-navbar-title-font-color | 头部导航标题的字体颜色 | `$color-title` | From f149bb0da4ae6a11387efbbc58ccd976e72cda79 Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Thu, 28 Dec 2023 10:43:35 +0800 Subject: [PATCH 006/275] fix(tabbar): fix icon color (#1816) --- src/packages/tabbaritem/tabbaritem.scss | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/packages/tabbaritem/tabbaritem.scss b/src/packages/tabbaritem/tabbaritem.scss index c7870b09f1..a691f421d7 100644 --- a/src/packages/tabbaritem/tabbaritem.scss +++ b/src/packages/tabbaritem/tabbaritem.scss @@ -11,10 +11,6 @@ color: $tabbar-inactive-color; height: 100%; - &-active { - color: $tabbar-active-color; - } - &-icon-box { padding: 0px; display: flex; @@ -41,4 +37,14 @@ font-weight: $tabbar-text-large-font-weight; } } + + &-active { + color: $tabbar-active-color; + .nut-tabbar-item-icon-box { + color: inherit; + .nut-icon { + color: inherit; + } + } + } } From 0558d9020c225c6ee7ad1255640993354e8ebbbd Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Thu, 28 Dec 2023 10:44:48 +0800 Subject: [PATCH 007/275] =?UTF-8?q?fix(infiniteLoading):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=B1=BB=E5=90=8D=E5=8F=8Ademo=20(#1818)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- migrate-from-v1.md | 1 + .../infiniteloading.spec.tsx.snap | 184 +++++++++++++++++- .../__tests__/infiniteloading.spec.tsx | 119 ++++++++++- src/packages/infiniteloading/demo.taro.tsx | 52 +---- src/packages/infiniteloading/demo.tsx | 40 +--- .../infiniteloading/infiniteloading.scss | 8 +- .../infiniteloading/infiniteloading.taro.tsx | 6 +- .../infiniteloading/infiniteloading.tsx | 6 +- 8 files changed, 309 insertions(+), 107 deletions(-) diff --git a/migrate-from-v1.md b/migrate-from-v1.md index 1d552552c3..d602675db8 100644 --- a/migrate-from-v1.md +++ b/migrate-from-v1.md @@ -507,6 +507,7 @@ plugins: [ - `pullTxt` 重命名为 `pullingText`,类型变更为 `ReactNode` - `loadTxt` 重命名为 `loadingText`,类型变更为 `ReactNode` - `containerId` 重命名为 `target` +- 修订类名如 `top-box`、`bottom-box` 为 `nut-infinite-top-tips`、`nut-infinite-bottom-tips` #### Notify diff --git a/src/packages/infiniteloading/__tests__/__snapshots__/infiniteloading.spec.tsx.snap b/src/packages/infiniteloading/__tests__/__snapshots__/infiniteloading.spec.tsx.snap index 88fcc1ebf3..1f60f851b9 100644 --- a/src/packages/infiniteloading/__tests__/__snapshots__/infiniteloading.spec.tsx.snap +++ b/src/packages/infiniteloading/__tests__/__snapshots__/infiniteloading.spec.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`infiniteloading base 1`] = ` +exports[`infiniteloading base 01 1`] = `
松开刷新
@@ -25,6 +25,182 @@ exports[`infiniteloading base 1`] = `
`; +exports[`infiniteloading base 02 1`] = ` +
+
+
+
+ 松开刷新 +
+
+
+
  • + 0 +
  • +
  • + 1 +
  • +
  • + 2 +
  • +
  • + 3 +
  • +
  • + 4 +
  • +
  • + 5 +
  • +
  • + 6 +
  • +
  • + 7 +
  • +
  • + 8 +
  • +
  • + 9 +
  • +
    +
    +
    +
    +`; + +exports[`pull base 01 1`] = ` +
    +
    +
    +
    + 下拉刷新 +
    +
    +
    +
    +
    +
    +`; + +exports[`pull base 01 2`] = ` +
    +
    +
    +
    + 下拉刷新 +
    +
    +
    +
    +
    +
    +`; + +exports[`pull base 03 1`] = ` +
    +
    +
    +
    + 下拉刷新 +
    +
    +
    +
    +
    +
    +`; + +exports[`pull base 03 2`] = ` +
    +
    +
    +
    + 下拉刷新 +
    +
    +
    +
    +
    +
    +`; + exports[`pull base 1`] = `
    松开刷新
    @@ -60,7 +236,7 @@ exports[`pull base 2`] = ` style="height: 10px; transition: height 0.2s cubic-bezier(0.25,0.1,0.25,1);" >
    松开刷新
    diff --git a/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx b/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx index 071b51147c..e845b74aa9 100644 --- a/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx +++ b/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { render } from '@testing-library/react' +import { render, waitFor } from '@testing-library/react' import { trigger, triggerDrag } from '@/utils/test/event' import '@testing-library/jest-dom' @@ -26,7 +26,63 @@ test('pull base', () => { expect(refresh).toBeCalled() }) +test('pull base 01', async () => { + const done = jest.fn() + const refresh = (done: () => void) => { + setTimeout(() => { + done() + }, 10) + } + const { container } = render( + + ) + const track = container.querySelector('.nut-infiniteloading') + + // pulling + trigger(track, 'touchstart', 0, 0) + trigger(track, 'touchmove', 0, 20) + expect(container).toMatchSnapshot() + + // loading + trigger(track, 'touchend', 0, 100) + expect(container).toMatchSnapshot() + + // still loading + triggerDrag(track, 0, 100) + refresh(done) + await waitFor(() => expect(done).toHaveBeenCalled()) +}) + +test('pull base 03', () => { + const refresh = jest.fn() + const { container } = render( + + ) + const track = container.querySelector('.nut-infiniteloading') + + // pulling + trigger(track, 'touchstart', 0, 0) + trigger(track, 'touchmove', 0, 0) + expect(container).toMatchSnapshot() + + // loading + trigger(track, 'touchend', 0, 5) + expect(container).toMatchSnapshot() + + // still loading + triggerDrag(track, 0, 5) + expect(refresh).toHaveBeenCalledTimes(0) +}) + test('infiniteloading base', () => { + const { container } = render( +
      + +
    + ) +}) + +test('infiniteloading base 01', async () => { const App = () => { const [refreshList, setRefreshList] = React.useState([]) const [refreshHasMore, setRefreshHasMore] = React.useState(true) @@ -48,7 +104,7 @@ test('infiniteloading base', () => { for (let i = curLen; i < curLen + 10; i++) { refreshList.push(`${i}`) } - if (refreshList.length >= 30) { + if (refreshList.length >= 300) { setRefreshHasMore(false) } else { setRefreshList([...refreshList]) @@ -65,11 +121,60 @@ test('infiniteloading base', () => { ) } const { container } = render() - const track = container.querySelector('.nut-infiniteloading') - trigger(track, 'touchstart', 0, 0) - trigger(track, 'touchmove', 0, -100) - trigger(track, 'touchend', 0, -800) + await waitFor(() => expect(container).toMatchSnapshot()) +}) + +test('infiniteloading base 02', async () => { + const done = jest.fn() + const App = () => { + const [refreshList, setRefreshList] = React.useState([]) + const [refreshHasMore, setRefreshHasMore] = React.useState(true) + + React.useEffect(() => { + init() + }, []) + + const init = () => { + for (let i = 0; i < 10; i++) { + refreshList.push(`${i}`) + } + setRefreshList([...refreshList]) + } - triggerDrag(track, 0, -800) + const refreshLoadMore = (done: () => void) => { + setTimeout(() => { + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 30) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } + done() + }, 500) + } + return ( + + {refreshList.map((item, index) => { + return ( +
  • + {item} +
  • + ) + })} +
    + ) + } + const { container } = render() + const track = container.querySelector('.nut-infiniteloading') + trigger(track, 'scroll', 0, 800) expect(container).toMatchSnapshot() + await waitFor(() => expect(done).toHaveBeenCalled()) }) diff --git a/src/packages/infiniteloading/demo.taro.tsx b/src/packages/infiniteloading/demo.taro.tsx index 057bd7526b..499c20295b 100644 --- a/src/packages/infiniteloading/demo.taro.tsx +++ b/src/packages/infiniteloading/demo.taro.tsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react' import Taro from '@tarojs/taro' +import { Loading, More } from '@nutui/icons-react-taro' import { useTranslate } from '@/sites/assets/locale/taro' import { InfiniteLoading, Cell } from '@/packages/nutui.react.taro' import '@/packages/infiniteloading/demo.scss' @@ -94,64 +95,19 @@ const InfiniteLoadingDemo = () => { onRefresh={refresh} pullingText={ <> - - - - - + 松开刷新 } loadingText={ <> - - - - - - - + 加载中 } loadMoreText={ <> - - - - - - - - - - - - + 没有更多了 } diff --git a/src/packages/infiniteloading/demo.tsx b/src/packages/infiniteloading/demo.tsx index 8568c29446..abe4e44ce4 100644 --- a/src/packages/infiniteloading/demo.tsx +++ b/src/packages/infiniteloading/demo.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react' -import { Jd } from '@nutui/icons-react' +import { Jd, Loading, More } from '@nutui/icons-react' import { useTranslate } from '../../sites/assets/locale' import { InfiniteLoading } from './infiniteloading' import Cell from '@/packages/cell' @@ -147,45 +147,13 @@ const InfiniteloadingDemo = () => { onLoadMore={loadMore} loadingText={ <> - - - - - - - + 加载中 } loadMoreText={ <> - - - - - - - - - - - - + 没有更多了 } @@ -207,7 +175,7 @@ const InfiniteloadingDemo = () => { - +
    -
    +
    {pullingText || locale.infiniteloading.pullRefreshText}
    {children}
    {isInfiniting ? ( -
    +
    {loadingText || locale.infiniteloading.loadText}
    ) : ( !hasMore && ( -
    +
    {loadMoreText || locale.infiniteloading.loadMoreText}
    ) diff --git a/src/packages/infiniteloading/infiniteloading.tsx b/src/packages/infiniteloading/infiniteloading.tsx index 81f3f256c3..4c27847436 100644 --- a/src/packages/infiniteloading/infiniteloading.tsx +++ b/src/packages/infiniteloading/infiniteloading.tsx @@ -220,19 +220,19 @@ export const InfiniteLoading: FunctionComponent< {...restProps} >
    -
    +
    {pullingText || locale.infiniteloading.pullRefreshText}
    {children}
    {isInfiniting ? ( -
    +
    {loadingText || locale.infiniteloading.loadText}
    ) : ( !hasMore && ( -
    +
    {loadMoreText || locale.infiniteloading.loadMoreText}
    ) From 3c451d8a8aa2e46bed7a38737a59aa1920565a12 Mon Sep 17 00:00:00 2001 From: oasis-cloud <12181600+oasis-cloud@users.noreply.github.com> Date: Fri, 29 Dec 2023 10:24:57 +0800 Subject: [PATCH 008/275] =?UTF-8?q?fix(virtualList):=20=E7=AD=89=E9=AB=98?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84=E6=8A=96=E5=8A=A8=E5=A4=84?= =?UTF-8?q?=E7=90=86,=20=E4=B8=8D=E5=AE=9A=E9=AB=98=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E6=BB=91=E5=8A=A8=E7=99=BD=E5=B1=8F=20(#1825?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../virtuallist/__test__/virtuallist.spec.tsx | 20 ++++++ src/packages/virtuallist/demo.taro.tsx | 10 ++- src/packages/virtuallist/utils.ts | 6 +- src/packages/virtuallist/virtuallist.taro.tsx | 72 +++++++++---------- 4 files changed, 64 insertions(+), 44 deletions(-) diff --git a/src/packages/virtuallist/__test__/virtuallist.spec.tsx b/src/packages/virtuallist/__test__/virtuallist.spec.tsx index 2e21f77dc6..d5b1db605e 100644 --- a/src/packages/virtuallist/__test__/virtuallist.spec.tsx +++ b/src/packages/virtuallist/__test__/virtuallist.spec.tsx @@ -5,6 +5,7 @@ import { render, waitFor } from '@testing-library/react' import '@testing-library/jest-dom' import { VirtualList } from '../virtuallist' +import { trigger } from '@/utils/test/event' const props = { list: new Array(100).fill(0), @@ -56,3 +57,22 @@ test('renders only visible items', async () => { expect(listElement.length).toBe(visibleCount) }) }) +test('scroll', async () => { + const boxHeight = 500 + const { container } = render( + + ) + const track = container.querySelector('.nut-virtualList-box') + if (track) { + trigger(track, 'scroll', 0, 100) + await waitFor(() => { + const element18 = container.querySelector('[data-index="18"]') + expect(element18).toBeTruthy() + }) + } +}) diff --git a/src/packages/virtuallist/demo.taro.tsx b/src/packages/virtuallist/demo.taro.tsx index d3ac516cde..9ea25fab2a 100644 --- a/src/packages/virtuallist/demo.taro.tsx +++ b/src/packages/virtuallist/demo.taro.tsx @@ -56,10 +56,10 @@ const ListDemo = () => { } const getData = useCallback(() => { const datas: any = [] - const pageSize = 10 + const pageSize = 20 for (let i = (pageNo - 1) * pageSize; i < pageNo * pageSize; i++) { const num = i > 9 ? i : `0${i}` - datas.push({ v: ` list${num}`, k: '3333' }) + datas.push({ v: ` list${num}` }) } if (pageNo === 1) { setsourceData(() => { @@ -77,7 +77,7 @@ const ListDemo = () => { }, [getData]) const itemRender = (data: any) => { - return
    {data.v + data.k}
    + return
    {data.v}
    } const itemVariable = (data: any, dataIndex: number, index: number) => { @@ -88,7 +88,7 @@ const ListDemo = () => { ...itemStyel2, }} > - {data.v} + {data.v}-{dataIndex}
    ) } @@ -115,12 +115,10 @@ const ListDemo = () => { case '2': return ( ) default: diff --git a/src/packages/virtuallist/utils.ts b/src/packages/virtuallist/utils.ts index 70369dbcd5..b7cfd1e657 100644 --- a/src/packages/virtuallist/utils.ts +++ b/src/packages/virtuallist/utils.ts @@ -112,14 +112,16 @@ const getEndIndex = ({ const updateItemSize = ( positions: PositionType[], items: HTMLCollection, - sizeKey: 'width' | 'height' + sizeKey: 'width' | 'height', + margin?: number ): void => { const newPos = positions.concat() Array.from(items).forEach((item) => { const index = Number(item.getAttribute('data-index')) const styleVal = item.getAttribute('style') if (styleVal && styleVal.includes('none')) return - const nowSize = item.getBoundingClientRect()[sizeKey] + let nowSize = item.getBoundingClientRect()[sizeKey] + if (margin) nowSize += margin const oldSize = positions[index][sizeKey] as number // 存在差值, 更新该节点以后所有的节点 diff --git a/src/packages/virtuallist/virtuallist.taro.tsx b/src/packages/virtuallist/virtuallist.taro.tsx index b09a8495ea..25c33e4b8f 100644 --- a/src/packages/virtuallist/virtuallist.taro.tsx +++ b/src/packages/virtuallist/virtuallist.taro.tsx @@ -6,11 +6,11 @@ import React, { useRef, useState, } from 'react' -import { ScrollView } from '@tarojs/components' +import { ScrollView, View } from '@tarojs/components' import { getSystemInfoSync } from '@tarojs/taro' import classNames from 'classnames' -import { Data, PositionType, VirtualListState } from './types' -import { binarySearch, initPositinoCache, updateItemSize } from './utils' +import { Data, PositionType } from './types' +import { initPositinoCache, updateItemSize } from './utils' import { BasicComponent, ComponentDefaults } from '@/utils/typings' const clientHeight = getSystemInfoSync().windowHeight - 5 || 667 @@ -20,6 +20,7 @@ export interface VirtualListProps extends BasicComponent { containerHeight: number itemRender: (data: any, dataIndex: number, index: number) => ReactNode itemHeight: number + margin: number itemEqual: boolean overscan: number onScroll: () => void @@ -31,6 +32,7 @@ const defaultProps = { list: [] as Array, containerHeight: clientHeight, itemHeight: 66, + margin: 10, itemEqual: true, overscan: 2, } as VirtualListProps @@ -42,6 +44,7 @@ export const VirtualList: FunctionComponent> = ( list, itemRender, itemHeight, + margin, itemEqual, overscan, key, @@ -55,7 +58,7 @@ export const VirtualList: FunctionComponent> = ( } const [startOffset, setStartOffset] = useState(0) - const [start, setStart] = useState(0) + const start = useRef(0) // 虚拟列表容器ref const scrollRef = useRef(null) @@ -75,12 +78,6 @@ export const VirtualList: FunctionComponent> = ( ]) const [offSetSize, setOffSetSize] = useState(containerHeight || 0) - const [options, setOptions] = useState({ - startOffset: 0, // 可视区域距离顶部的偏移量 - startIndex: 0, // 可视区域开始索引 - overStart: 0, - endIndex: 10, // 可视区域结束索引 - }) // 初始计算可视区域展示数量 useEffect(() => { @@ -91,39 +88,40 @@ export const VirtualList: FunctionComponent> = ( useEffect(() => { if (containerHeight) return - setOffSetSize(getContainerHeight()) }, [containerHeight]) useEffect(() => { - const pos = initPositinoCache(itemHeight, list.length) + const pos = initPositinoCache(itemHeight + margin, list.length) setPositions(pos) }, [itemHeight, list]) + const prevListLength = useRef(list.length) + // 可视区域总高度 const getContainerHeight = () => { // 初始首页列表高度 - const initH = itemHeight * list.length + const initH = (itemHeight + margin) * list.length // 未设置containerHeight高度,判断首页高度小于设备高度时,滚动容器高度为首页数据高度,减5为分页触发的偏移量 return initH < clientHeight - ? initH + overscan * itemHeight - 5 + ? initH + overscan * (itemHeight + margin) - 5 : Math.min(containerHeight, clientHeight) // Math.min(containerHeight, clientHeight) } // 可视区域条数 const visibleCount = () => { - return Math.ceil(getContainerHeight() / itemHeight) + overscan + return Math.ceil(getContainerHeight() / (itemHeight + margin)) + overscan } const end = () => { - return start + visibleCount() + return start.current + visibleCount() } const listHeight = () => { - return list.length * itemHeight + return list.length * (itemHeight + margin) } const visibleData = () => { - return list.slice(start, Math.min(end(), list.length)) + return list.slice(start.current, Math.min(end(), list.length)) } const updateTotalSize = useCallback(() => { @@ -131,29 +129,31 @@ export const VirtualList: FunctionComponent> = ( const items: HTMLCollection = itemsRef.current.children if (!items.length) return // 更新缓存 - updateItemSize(positions, items, 'height') + updateItemSize(positions, items, 'height', margin) }, [positions]) // 滚动监听 const listScroll = (e: any) => { const scrollTop = e.target.scrollTop - const scrollSize = Math.floor(scrollTop) - const startIndex = binarySearch(positions, false, scrollSize) - const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0 - const endIndex = end() + if (scrollTop <= 0) { + e.target.scrollTop = 0 + return setStartOffset(0) + } if (!itemEqual) { updateTotalSize() } - setStart(Math.floor(scrollTop / itemHeight)) - setOptions({ startOffset, startIndex, overStart, endIndex }) - if (end() > list.length - 1) { + start.current = Math.floor(scrollTop / (itemHeight + margin)) + setStartOffset(scrollTop - (scrollTop % (itemHeight + margin))) + const endIndex = end() + // list 变动说明触底 + if (endIndex > list.length - 1 && prevListLength.current < list.length) { onScroll && onScroll() + prevListLength.current = list.length } - setStartOffset(scrollTop - (scrollTop % itemHeight)) } return ( -
    > = ( > > = ( }} onScroll={listScroll} > -
    -
    {visibleData().map((data: any, index: number) => { - const { overStart } = options - const dataIndex = overStart + index + const dataIndex = start.current + index const keyVal = key && data[key] ? data[key] : dataIndex return ( -
    > = ( }} > {itemRender ? itemRender(data, dataIndex, index) : data} -
    + ) })} -
    + -
    + ) } From 5ce392431c7455d1e5a4a8d9c7d23b68da2a1bea Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:30:21 +0800 Subject: [PATCH 009/275] fix(infiniteLoading): ssr (#1828) --- src/packages/infiniteloading/infiniteloading.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packages/infiniteloading/infiniteloading.tsx b/src/packages/infiniteloading/infiniteloading.tsx index 4c27847436..6f203c2a64 100644 --- a/src/packages/infiniteloading/infiniteloading.tsx +++ b/src/packages/infiniteloading/infiniteloading.tsx @@ -65,7 +65,7 @@ export const InfiniteLoading: FunctionComponent< const [isInfiniting, setIsInfiniting] = useState(false) const scroller = useRef(null) const refreshTop = useRef(null) - const scrollEl = useRef(window) + const scrollEl = useRef(null) const isTouching = useRef(false) const beforeScrollTop = useRef(0) const refreshMaxH = useRef(0) @@ -76,14 +76,14 @@ export const InfiniteLoading: FunctionComponent< useEffect(() => { if (target && document.getElementById(target)) { - scrollEl.current = document.getElementById(target) as HTMLElement | Window + scrollEl.current = document.getElementById(target) } else { scrollEl.current = window } - scrollEl.current.addEventListener('scroll', handleScroll, capture) + scrollEl.current?.addEventListener('scroll', handleScroll, capture) return () => { - scrollEl.current.removeEventListener('scroll', handleScroll, capture) + scrollEl.current?.removeEventListener('scroll', handleScroll, capture) } }, [hasMore, isInfiniting, onLoadMore]) From 4c647db40927dfc067246ea985299f58de5cef0e Mon Sep 17 00:00:00 2001 From: oasis-cloud <12181600+oasis-cloud@users.noreply.github.com> Date: Fri, 29 Dec 2023 14:34:45 +0800 Subject: [PATCH 010/275] =?UTF-8?q?refactor(infiniteloading):=20onRefresh?= =?UTF-8?q?=E3=80=81onLoadMore=20=E6=94=B9=E4=B8=BA=20Promise=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E5=8E=BB=E6=8E=89=E6=98=BE=E7=A4=BA=E8=B0=83?= =?UTF-8?q?=E7=94=A8=20done=20=E6=96=B9=E6=B3=95=20(#1827)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__tests__/infiniteloading.spec.tsx | 141 +++++++++++------- src/packages/infiniteloading/demo.taro.tsx | 42 +++--- src/packages/infiniteloading/demo.tsx | 108 +++++++------- src/packages/infiniteloading/doc.en-US.md | 116 +++++++------- src/packages/infiniteloading/doc.md | 124 ++++++++------- src/packages/infiniteloading/doc.taro.md | 46 +++--- src/packages/infiniteloading/doc.zh-TW.md | 116 +++++++------- .../infiniteloading/infiniteloading.taro.tsx | 14 +- .../infiniteloading/infiniteloading.tsx | 26 ++-- 9 files changed, 375 insertions(+), 358 deletions(-) diff --git a/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx b/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx index e845b74aa9..cafd72b3c7 100644 --- a/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx +++ b/src/packages/infiniteloading/__tests__/infiniteloading.spec.tsx @@ -1,9 +1,10 @@ import * as React from 'react' -import { render, waitFor } from '@testing-library/react' +import { act, render, waitFor } from '@testing-library/react' import { trigger, triggerDrag } from '@/utils/test/event' import '@testing-library/jest-dom' import { InfiniteLoading } from '../infiniteloading' +import { sleep } from '@/utils/sleep' test('pull base', () => { const refresh = jest.fn() @@ -26,33 +27,6 @@ test('pull base', () => { expect(refresh).toBeCalled() }) -test('pull base 01', async () => { - const done = jest.fn() - const refresh = (done: () => void) => { - setTimeout(() => { - done() - }, 10) - } - const { container } = render( - - ) - const track = container.querySelector('.nut-infiniteloading') - - // pulling - trigger(track, 'touchstart', 0, 0) - trigger(track, 'touchmove', 0, 20) - expect(container).toMatchSnapshot() - - // loading - trigger(track, 'touchend', 0, 100) - expect(container).toMatchSnapshot() - - // still loading - triggerDrag(track, 0, 100) - refresh(done) - await waitFor(() => expect(done).toHaveBeenCalled()) -}) - test('pull base 03', () => { const refresh = jest.fn() const { container } = render( @@ -98,19 +72,17 @@ test('infiniteloading base 01', async () => { setRefreshList([...refreshList]) } - const refreshLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = refreshList.length - for (let i = curLen; i < curLen + 10; i++) { - refreshList.push(`${i}`) - } - if (refreshList.length >= 300) { - setRefreshHasMore(false) - } else { - setRefreshList([...refreshList]) - } - done() - }, 500) + const refreshLoadMore = async () => { + await sleep(10) + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 300) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } } return ( { setRefreshList([...refreshList]) } - const refreshLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = refreshList.length - for (let i = curLen; i < curLen + 10; i++) { - refreshList.push(`${i}`) - } - if (refreshList.length >= 30) { - setRefreshHasMore(false) - } else { - setRefreshList([...refreshList]) - } - done() - }, 500) + const refreshLoadMore = async () => { + await sleep(100) + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 30) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } } return ( { expect(container).toMatchSnapshot() await waitFor(() => expect(done).toHaveBeenCalled()) }) + +test('hasMore false', () => { + const done = jest.fn() + const { container: container1, rerender } = render( + + {Array.from({ length: 100 }) + .fill('NutUI') + .map((item: string, index) => { + return ( +
  • + {item} +
  • + ) + })} +
    + ) + const track1 = container1.querySelector('.nut-infiniteloading') + trigger(track1, 'scroll', 0, 100) +}) + +test('hasMore', () => { + const done = jest.fn() + const { container } = render( + + {Array.from({ length: 100 }) + .fill('NutUI') + .map((item: string, index) => { + return ( +
  • + {item} +
  • + ) + })} +
    + ) + const track1 = container.querySelector('.nut-infiniteloading') + act(() => { + trigger(track1, 'scroll', 0, 100) + }) + + waitFor(() => { + expect(done).toBeCalled() + }) +}) + +test('pull base 01', async () => { + const refresh = async () => { + await sleep(10) + } + const { container } = render( + + ) + const track = container.querySelector('.nut-infiniteloading') + + // pulling + trigger(track, 'touchstart', 0, 0) + trigger(track, 'touchmove', 0, 20) + expect(container).toMatchSnapshot() + + // loading + trigger(track, 'touchend', 0, 100) + expect(container).toMatchSnapshot() +}) diff --git a/src/packages/infiniteloading/demo.taro.tsx b/src/packages/infiniteloading/demo.taro.tsx index 499c20295b..edb0a43282 100644 --- a/src/packages/infiniteloading/demo.taro.tsx +++ b/src/packages/infiniteloading/demo.taro.tsx @@ -5,6 +5,7 @@ import { useTranslate } from '@/sites/assets/locale/taro' import { InfiniteLoading, Cell } from '@/packages/nutui.react.taro' import '@/packages/infiniteloading/demo.scss' import Header from '@/sites/components/header' +import { sleep } from '@/utils/sleep' interface T { '83913e71': string @@ -12,6 +13,7 @@ interface T { eb4236fe: string '1254a90a': string } + const InfiniteLoadingDemo = () => { const [translated] = useTranslate({ 'zh-CN': { @@ -41,30 +43,26 @@ const InfiniteLoadingDemo = () => { init() }, []) - const loadMore = (done: () => void) => { - setTimeout(() => { - const curLen = defaultList.length - for (let i = curLen; i < curLen + 10; i++) { - defaultList.push(`${i}`) - } - if (defaultList.length >= 100) { - setHasMore(false) - } else { - setDefaultList([...defaultList]) - } - done() - }, 500) + const loadMore = async () => { + await sleep(2000) + const curLen = defaultList.length + for (let i = curLen; i < curLen + 10; i++) { + defaultList.push(`${i}`) + } + if (defaultList.length >= 100) { + setHasMore(false) + } else { + setDefaultList([...defaultList]) + } } - const refresh = (done: () => void) => { - setTimeout(() => { - Taro.showToast({ - title: translated['83913e71'], - icon: 'success', - duration: 2000, - }) - done() - }, 1000) + const refresh = async () => { + await sleep(2000) + Taro.showToast({ + title: translated['83913e71'], + icon: 'success', + duration: 2000, + }) } const init = () => { diff --git a/src/packages/infiniteloading/demo.tsx b/src/packages/infiniteloading/demo.tsx index abe4e44ce4..d5aca9f141 100644 --- a/src/packages/infiniteloading/demo.tsx +++ b/src/packages/infiniteloading/demo.tsx @@ -5,6 +5,7 @@ import { InfiniteLoading } from './infiniteloading' import Cell from '@/packages/cell' import Toast from '@/packages/toast' import './demo.scss' +import { sleep } from '@/utils/sleep' interface T { '83913e71': string @@ -14,6 +15,7 @@ interface T { '1254a90a': string '1254a90n': string } + const InfiniteloadingDemo = () => { const [translated] = useTranslate({ 'zh-CN': { @@ -55,71 +57,63 @@ const InfiniteloadingDemo = () => { init() }, []) - const loadMore = (done: () => void) => { - setTimeout(() => { - const curLen = defaultList.length - for (let i = curLen; i < curLen + 10; i++) { - defaultList.push(`${i}`) - } - if (defaultList.length >= 30) { - setHasMore(false) - } else { - setDefaultList([...defaultList]) - } - done() - }, 500) + const loadMore = async () => { + await sleep(2000) + // setTimeout(() => { + const curLen = defaultList.length + for (let i = curLen; i < curLen + 10; i++) { + defaultList.push(`${i}`) + } + if (defaultList.length >= 30) { + setHasMore(false) + } else { + setDefaultList([...defaultList]) + } + // }, 500) } - const refreshLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = refreshList.length - for (let i = curLen; i < curLen + 10; i++) { - refreshList.push(`${i}`) - } - if (refreshList.length >= 30) { - setRefreshHasMore(false) - } else { - setRefreshList([...refreshList]) - } - done() - }, 500) + const refreshLoadMore = async () => { + await sleep(2000) + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 30) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } - const windowLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = windowList.length - for (let i = curLen; i < curLen + 10; i++) { - windowList.push(`${i}`) - } - if (windowList.length >= 300) { - setWindowHasMore(false) - } else { - setWindowList([...windowList]) - } - done() - }, 500) + const windowLoadMore = async () => { + await sleep(2000) + const curLen = windowList.length + for (let i = curLen; i < curLen + 10; i++) { + windowList.push(`${i}`) + } + if (windowList.length >= 300) { + setWindowHasMore(false) + } else { + setWindowList([...windowList]) + } } - const refresh = (done: () => void) => { - setTimeout(() => { - Toast.show(translated['83913e71']) - done() - }, 1000) + const refresh = async () => { + await sleep(1000) + Toast.show(translated['83913e71']) } const init = () => { diff --git a/src/packages/infiniteloading/doc.en-US.md b/src/packages/infiniteloading/doc.en-US.md index ade89976f4..5e5082b6ee 100644 --- a/src/packages/infiniteloading/doc.en-US.md +++ b/src/packages/infiniteloading/doc.en-US.md @@ -20,6 +20,8 @@ import { InfiniteLoading } from '@nutui/nutui-react' import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -42,19 +44,17 @@ const App = () => { init() }, []) - const loadMore = (done: () => void) => { - setTimeout(() => { - const curLen = defaultList.length - for (let i = curLen; i < curLen + 10; i++) { - defaultList.push(`${i}`) - } - if (defaultList.length >= 30) { - setHasMore(false) - } else { - setDefaultList([...defaultList]) - } - done() - }, 500) + const loadMore = async () => { + await sleep(2000) + const curLen = defaultList.length + for (let i = curLen; i < curLen + 10; i++) { + defaultList.push(`${i}`) + } + if (defaultList.length >= 30) { + setHasMore(false) + } else { + setDefaultList([...defaultList]) + } } const init = () => { @@ -101,6 +101,8 @@ import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' import { Jd } from '@nutui/icons-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -130,26 +132,22 @@ const App = () => { setRefreshList([...refreshList]) } - const refreshLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = refreshList.length - for (let i = curLen; i < curLen + 10; i++) { - refreshList.push(`${i}`) - } - if (refreshList.length >= 30) { - setRefreshHasMore(false) - } else { - setRefreshList([...refreshList]) - } - done() - }, 500) + const refreshLoadMore = async () => { + await sleep(2000) + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 30) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } } - const refresh = (done: () => void) => { - setTimeout(() => { - Toast.show('Refresh success!') - done() - }, 1000) + const refresh = async () => { + await sleep(1000) + Toast.show('刷新成功') } return ( @@ -197,6 +195,8 @@ export default App import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -226,19 +226,17 @@ const App = () => { setCustomList([...customList]) } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } return ( @@ -280,6 +278,8 @@ export default App import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { width: '100%', padding: '0', @@ -308,19 +308,17 @@ const App = () => { setCustomList([...customList]) } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } return ( @@ -366,8 +364,8 @@ export default App | pullRefresh | Enable pull refresh | `boolean` | `false` | | pullingText | Pull refresh text | `ReactNode` | `Let go and refresh` | | loadingText | Pull on loading text | `ReactNode` | `loading...` | -| onRefresh | Pull down refresh event callback | `(param: () => void) => void` | `-` | -| onLoadMore | Callback function to continue loading | `(param: () => void) => void` | `-` | +| onRefresh | Pull down refresh event callback | `() => Promise` | `-` | +| onLoadMore | Callback function to continue loading | `() => Promise` | `-` | | onScroll | Monitor scroll height in real time | `(param: number) => void` | `-` | ## Theming diff --git a/src/packages/infiniteloading/doc.md b/src/packages/infiniteloading/doc.md index 9c5623e34c..61b17ae7e9 100644 --- a/src/packages/infiniteloading/doc.md +++ b/src/packages/infiniteloading/doc.md @@ -20,6 +20,8 @@ import { InfiniteLoading } from '@nutui/nutui-react' import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -42,19 +44,17 @@ const App = () => { init() }, []) - const loadMore = (done: () => void) => { - setTimeout(() => { - const curLen = defaultList.length - for (let i = curLen; i < curLen + 10; i++) { - defaultList.push(`${i}`) - } - if (defaultList.length >= 30) { - setHasMore(false) - } else { - setDefaultList([...defaultList]) - } - done() - }, 500) + const loadMore = async () => { + await sleep(2000) + const curLen = defaultList.length + for (let i = curLen; i < curLen + 10; i++) { + defaultList.push(`${i}`) + } + if (defaultList.length >= 30) { + setHasMore(false) + } else { + setDefaultList([...defaultList]) + } } const init = () => { @@ -145,6 +145,8 @@ import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' import { Jd } from '@nutui/icons-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -174,26 +176,22 @@ const App = () => { setRefreshList([...refreshList]) } - const refreshLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = refreshList.length - for (let i = curLen; i < curLen + 10; i++) { - refreshList.push(`${i}`) - } - if (refreshList.length >= 30) { - setRefreshHasMore(false) - } else { - setRefreshList([...refreshList]) - } - done() - }, 500) + const refreshLoadMore = async () => { + await sleep(2000) + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 30) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } } - const refresh = (done: () => void) => { - setTimeout(() => { - Toast.show('刷新成功') - done() - }, 1000) + const refresh = async () => { + await sleep(1000) + Toast.show('刷新成功') } return ( @@ -254,6 +252,8 @@ export default App import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -283,30 +283,28 @@ const App = () => { setCustomList([...customList]) } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } return ( <>

    自定义加载文案

    -
      +
        @@ -337,6 +335,8 @@ export default App import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { width: '100%', padding: '0', @@ -365,19 +365,17 @@ const App = () => { setCustomList([...customList]) } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } return ( @@ -423,8 +421,8 @@ export default App | pullRefresh | 是否开启下拉刷新 | `boolean` | `false` | | pullingText | 下拉刷新提示文案 | `ReactNode` | `松手刷新` | | loadingText | 上拉加载提示文案 | `ReactNode` | `刷新中` | -| onRefresh | 下拉刷新事件回调 | `(param: () => void) => void` | `-` | -| onLoadMore | 继续加载的回调函数 | `(param: () => void) => void` | `-` | +| onRefresh | 下拉刷新事件回调 | `() => Promise` | `-` | +| onLoadMore | 继续加载的回调函数 | `() => Promise` | `-` | | onScroll | 实时监听滚动高度 | `(param: number) => void` | `-` | ## 主题定制 diff --git a/src/packages/infiniteloading/doc.taro.md b/src/packages/infiniteloading/doc.taro.md index b4cbe6f164..7d299b5e5c 100644 --- a/src/packages/infiniteloading/doc.taro.md +++ b/src/packages/infiniteloading/doc.taro.md @@ -22,6 +22,8 @@ import Taro from '@tarojs/taro' import { Jd } from '@nutui/icons-react-taro' import { Cell, InfiniteLoading } from '@nutui/nutui-react-taro' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '500px', width: '100%', @@ -44,30 +46,26 @@ const App = () => { init() }, []) - const loadMore = (done: () => void) => { - setTimeout(() => { - const curLen = defaultList.length - for (let i = curLen; i < curLen + 10; i++) { - defaultList.push(`${i}`) - } - if (defaultList.length >= 30) { - setHasMore(false) - } else { - setDefaultList([...defaultList]) - } - done() - }, 500) + const loadMore = async () => { + await sleep(2000) + const curLen = defaultList.length + for (let i = curLen; i < curLen + 10; i++) { + defaultList.push(`${i}`) + } + if (defaultList.length >= 30) { + setHasMore(false) + } else { + setDefaultList([...defaultList]) + } } - const refresh = (done: () => void) => { - setTimeout(() => { - Taro.showToast({ - title: '刷新成功', - icon: 'success', - duration: 2000, - }) - done() - }, 1000) + const refresh = async () => { + await sleep(1000) + Taro.showToast({ + title: '刷新成功', + icon: 'success', + duration: 2000, + }) } const init = () => { @@ -183,8 +181,8 @@ export default App | pullRefresh | 是否开启下拉刷新 | `boolean` | `false` | | pullingText | 下拉刷新提示文案 | `ReactNode` | `松手刷新` | | loadingText | 上拉加载提示文案 | `ReactNode` | `刷新中` | -| onRefresh | 下拉刷新事件回调 | `(param: () => void) => void` | `-` | -| onLoadMore | 继续加载的回调函数 | `(param: () => void) => void` | `-` | +| onRefresh | 下拉刷新事件回调 | `() => Promise` | `-` | +| onLoadMore | 继续加载的回调函数 | `() => Promise` | `-` | | onScroll | 实时监听滚动高度 | `(param: number) => void` | `-` | ## 主题定制 diff --git a/src/packages/infiniteloading/doc.zh-TW.md b/src/packages/infiniteloading/doc.zh-TW.md index d315ee63da..775b4a6789 100644 --- a/src/packages/infiniteloading/doc.zh-TW.md +++ b/src/packages/infiniteloading/doc.zh-TW.md @@ -20,6 +20,8 @@ import { InfiniteLoading } from '@nutui/nutui-react' import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -42,19 +44,17 @@ const App = () => { init() }, []) - const loadMore = (done: () => void) => { - setTimeout(() => { - const curLen = defaultList.length - for (let i = curLen; i < curLen + 10; i++) { - defaultList.push(`${i}`) - } - if (defaultList.length >= 30) { - setHasMore(false) - } else { - setDefaultList([...defaultList]) - } - done() - }, 500) + const loadMore = async () => { + await sleep(2000) + const curLen = defaultList.length + for (let i = curLen; i < curLen + 10; i++) { + defaultList.push(`${i}`) + } + if (defaultList.length >= 30) { + setHasMore(false) + } else { + setDefaultList([...defaultList]) + } } const init = () => { @@ -101,6 +101,8 @@ import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' import { Jd } from '@nutui/icons-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -130,26 +132,22 @@ const App = () => { setRefreshList([...refreshList]) } - const refreshLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = refreshList.length - for (let i = curLen; i < curLen + 10; i++) { - refreshList.push(`${i}`) - } - if (refreshList.length >= 30) { - setRefreshHasMore(false) - } else { - setRefreshList([...refreshList]) - } - done() - }, 500) + const refreshLoadMore = async () => { + await sleep(2000) + const curLen = refreshList.length + for (let i = curLen; i < curLen + 10; i++) { + refreshList.push(`${i}`) + } + if (refreshList.length >= 30) { + setRefreshHasMore(false) + } else { + setRefreshList([...refreshList]) + } } - const refresh = (done: () => void) => { - setTimeout(() => { - Toast.show('刷新成功') - done() - }, 1000) + const refresh = async () => { + await sleep(1000) + Toast.show('刷新成功') } return ( @@ -197,6 +195,8 @@ export default App import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { height: '300px', width: '100%', @@ -226,19 +226,17 @@ const App = () => { setCustomList([...customList]) } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } return ( @@ -280,6 +278,8 @@ export default App import React, { useState, useEffect } from 'react' import { Cell, InfiniteLoading } from '@nutui/nutui-react' +const sleep = (time: number): Promise => + new Promise((resolve) => {setTimeout(resolve, time)}) const InfiniteUlStyle = { width: '100%', padding: '0', @@ -308,19 +308,17 @@ const App = () => { setCustomList([...customList]) } - const customLoadMore = (done: () => void) => { - setTimeout(() => { - const curLen = customList.length - for (let i = curLen; i < curLen + 10; i++) { - customList.push(`${i}`) - } - if (customList.length >= 30) { - setCustomHasMore(false) - } else { - setCustomList([...customList]) - } - done() - }, 500) + const customLoadMore = async () => { + await sleep(2000) + const curLen = customList.length + for (let i = curLen; i < curLen + 10; i++) { + customList.push(`${i}`) + } + if (customList.length >= 30) { + setCustomHasMore(false) + } else { + setCustomList([...customList]) + } } return ( @@ -366,8 +364,8 @@ export default App | pullRefresh | 是否開啟下拉刷新 | `boolean` | `false` | | pullingText | 下拉刷新提示文案 | `ReactNode` | `鬆手刷新` | | loadingText | 上拉加載提示文案 | `ReactNode` | `加載中...` | -| onRefresh | 下拉刷新事件回調 | `(param: () => void) => void` | `-` | -| onLoadMore | 繼續加載的回調函數 | `(param: () => void) => void` | `-` | +| onRefresh | 下拉刷新事件回調 | `() => Promise` | `-` | +| onLoadMore | 繼續加載的回調函數 | `() => Promise` | `-` | | onScroll | 實時監聽滾動高度 | `(param: number) => void` | `-` | ## 主題定制 diff --git a/src/packages/infiniteloading/infiniteloading.taro.tsx b/src/packages/infiniteloading/infiniteloading.taro.tsx index 854a637d42..11f83380e1 100644 --- a/src/packages/infiniteloading/infiniteloading.taro.tsx +++ b/src/packages/infiniteloading/infiniteloading.taro.tsx @@ -20,8 +20,8 @@ export interface InfiniteLoadingProps extends BasicComponent { pullingText: ReactNode loadingText: ReactNode loadMoreText: ReactNode - onRefresh: (param: () => void) => void - onLoadMore: (param: () => void) => void + onRefresh: () => Promise + onLoadMore: () => Promise onScroll: (param: number) => void } @@ -115,12 +115,13 @@ export const InfiniteLoading: FunctionComponent< onScroll && onScroll(e.target.scrollTop) } - const lower = () => { + const lower = async () => { if (!hasMore || isInfiniting) { return false } setIsInfiniting(true) - onLoadMore && onLoadMore(infiniteDone) + await onLoadMore?.() + infiniteDone() } const touchStart = (event: any) => { @@ -146,12 +147,13 @@ export const InfiniteLoading: FunctionComponent< } } - const touchEnd = () => { + const touchEnd = async () => { if (distance.current < refreshMaxH.current) { distance.current = 0 setTopDisScoll(0) } else { - onRefresh && onRefresh(refreshDone) + await onRefresh?.() + refreshDone() } } diff --git a/src/packages/infiniteloading/infiniteloading.tsx b/src/packages/infiniteloading/infiniteloading.tsx index 6f203c2a64..73740f2a4b 100644 --- a/src/packages/infiniteloading/infiniteloading.tsx +++ b/src/packages/infiniteloading/infiniteloading.tsx @@ -8,7 +8,6 @@ import React, { import classNames from 'classnames' import { useConfig } from '@/packages/configprovider' import { BasicComponent, ComponentDefaults } from '@/utils/typings' -import requestAniFrame from '@/utils/raf' export interface InfiniteLoadingProps extends BasicComponent { hasMore: boolean @@ -19,8 +18,8 @@ export interface InfiniteLoadingProps extends BasicComponent { pullingText: ReactNode loadingText: ReactNode loadMoreText: ReactNode - onRefresh: (param: () => void) => void - onLoadMore: (param: () => void) => void + onRefresh: () => Promise + onLoadMore: () => Promise onScroll: (param: number) => void } @@ -107,15 +106,13 @@ export const InfiniteLoading: FunctionComponent< } } - const handleScroll = () => { - requestAniFrame(() => { - if (!isScrollAtBottom() || !hasMore || isInfiniting) { - return false - } - setIsInfiniting(true) - onLoadMore && onLoadMore(infiniteDone) - return true - }) + const handleScroll = async () => { + if (!isScrollAtBottom() || !hasMore || isInfiniting) { + return + } + setIsInfiniting(true) + await onLoadMore?.() + infiniteDone() } const infiniteDone = () => { @@ -159,12 +156,13 @@ export const InfiniteLoading: FunctionComponent< } } - const touchEnd = () => { + const touchEnd = async () => { if (distance.current < refreshMaxH.current) { distance.current = 0 getRefreshTop().style.height = `${distance.current}px` } else { - onRefresh && onRefresh(refreshDone) + await onRefresh?.() + refreshDone() } } From d3dce660a80ca7598255e7ee5639cb0ed11b6d9b Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Fri, 29 Dec 2023 14:40:49 +0800 Subject: [PATCH 011/275] chore(release): v2.3.4 --- CHANGELOG.md | 15 +++++++++++++++ package.json | 4 ++-- src/packages/navbar/doc.en-US.md | 2 +- src/packages/navbar/doc.md | 2 +- src/packages/navbar/doc.taro.md | 2 +- src/packages/navbar/doc.zh-TW.md | 2 +- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a738d77e4..6cc1666674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# v2.3.4 +`2023-12-29` + +* 📖 docs(nabvar): showtoas 改为 showToast (#1826) @MingHui +* :bug: fix(datepicker): 未设置 value/defaultValue 时渲染 0 (#1819) @RyanCW +* :bug: fix(infiniteLoading): ssr (#1828) @xiaoyatong +* :bug: fix(infiniteLoading): 修改类名及demo (#1818) @xiaoyatong +* :bug: fix(popover): icon cannot be displayed at taro (#1820) @xiaoyatong +* :bug: fix(popver): bottom positon (#1823) @xiaoyatong +* :bug: fix(tabbar): fix icon color (#1816) @xiaoyatong +* :bug: fix(virtualList): 等高模式下的抖动处理, 不定高模式快速滑动白屏 (#1825) @oasis-cloud +* :bug: fix(watermark): fix demos (#1817) @xiaoyatong +* 🛠 refactor(infiniteloading): onRefresh、onLoadMore 改为 Promise 类型,去掉显示调用 done 方法 (#1827) @oasis-cloud + + # v2.3.3 `2023-12-22` diff --git a/package.json b/package.json index 65cb8fe542..4faf5bb094 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@nutui/nutui-react", - "version": "2.3.3", + "name": "@nutui/nutui-react-taro", + "version": "2.3.4", "style": "dist/style.css", "main": "dist/nutui.react.umd.js", "module": "dist/esm/nutui-react.es.js", diff --git a/src/packages/navbar/doc.en-US.md b/src/packages/navbar/doc.en-US.md index ff33f67bc0..fba5cbc693 100644 --- a/src/packages/navbar/doc.en-US.md +++ b/src/packages/navbar/doc.en-US.md @@ -200,7 +200,7 @@ export default App; | back | Returns the text of the area | `ReactNode` | `-` | | titleAlign | Title align, optional value center、left | `string` | `center` | | fixed | Is it fixed | `boolean` | `false` | -| safeArea | Whether it is suitable for the safe area | `boolean` | `false` | +| safeAreaInsetTop | Whether it is suitable for the safe area | `boolean` | `false` | | placeholder | When fixed to the top, whether to generate a placeholder element of equal height at the label position | `boolean` | `false` | | zIndex | Navigation Bar Hierarchy | `number` \| `string` | `10` | | onBackClick | Click the callback after the return area | `onBackClick:(event: Event)=>void` | `false` | diff --git a/src/packages/navbar/doc.md b/src/packages/navbar/doc.md index f6985f03b9..41f406eb1c 100644 --- a/src/packages/navbar/doc.md +++ b/src/packages/navbar/doc.md @@ -200,7 +200,7 @@ export default App; | back | 返回区域的文字 | `ReactNode` | `-` | | titleAlign | 标题位置,可选值center left | `string` | `center` | | fixed | 是否固定 | `boolean` | `false` | -| safeArea | 是否适配安全区 | `boolean` | `false` | +| safeAreaInsetTop | 是否适配安全区 | `boolean` | `false` | | placeholder | 固定在顶部时,是否在标签位置生成一个等高的占位元素 | `boolean` | `false` | | zIndex | 导航栏层级 | `number` \| `string` | `10` | | onBackClick | 点击返回区域后的回调 | `onBackClick:(event: Event)=>void` | `false` | diff --git a/src/packages/navbar/doc.taro.md b/src/packages/navbar/doc.taro.md index c081db3761..3a69a8693f 100644 --- a/src/packages/navbar/doc.taro.md +++ b/src/packages/navbar/doc.taro.md @@ -203,7 +203,7 @@ export default App; | back | 返回区域的文字 | `ReactNode` | `-` | | titleAlign | 标题位置,可选值center left | `string` | `center` | | fixed | 是否固定 | `boolean` | `false` | -| safeArea | 是否适配安全区 | `boolean` | `false` | +| safeAreaInsetTop | 是否适配安全区 | `boolean` | `false` | | placeholder | 固定在顶部时,是否在标签位置生成一个等高的占位元素 | `boolean` | `false` | | zIndex | 导航栏层级 | `number` \| `string` | `10` | | onBackClick | 点击返回区域后的回调 | `onBackClick:(event: Event)=>void` | `false` | diff --git a/src/packages/navbar/doc.zh-TW.md b/src/packages/navbar/doc.zh-TW.md index bbb8d64c27..a86477f8ed 100644 --- a/src/packages/navbar/doc.zh-TW.md +++ b/src/packages/navbar/doc.zh-TW.md @@ -200,7 +200,7 @@ export default App; | back | 返回區域的文字 | `ReactNode` | `-` | | titleAlign | 標題位置,可選值center left | `string` | `center` | | fixed | 是否固定 | `boolean` | `false` | -| safeArea | 是否適配安全區 | `boolean` | `false` | +| safeAreaInsetTop | 是否適配安全區 | `boolean` | `false` | | placeholder | 固定在頂部時,是否在標簽位置生成一個等高的佔位元素 | `boolean` | `false` | | zIndex | 導航欄層級 | `number` \| `string` | `10` | | onBackClick | 點擊返回區域後的回調 | `onBackClick:(event: Event)=>void` | `false` | From 880fdd5fd08bcf365e5766257cddd6c841857400 Mon Sep 17 00:00:00 2001 From: NickH <742037091@qq.com> Date: Wed, 3 Jan 2024 10:27:43 +0800 Subject: [PATCH 012/275] =?UTF-8?q?fix(pulltorefresh):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AE=89=E5=8D=93=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=8D=A1=E9=A1=BF=E9=97=AE=E9=A2=98=20(#1830)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(pulltorefresh): 修复安卓小程序下拉卡顿问题 * fix(pullotorefresh): 删除pullTransitionTime属性 --- src/packages/pulltorefresh/pulltorefresh.taro.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/packages/pulltorefresh/pulltorefresh.taro.tsx b/src/packages/pulltorefresh/pulltorefresh.taro.tsx index 21d61048a6..7449adf652 100644 --- a/src/packages/pulltorefresh/pulltorefresh.taro.tsx +++ b/src/packages/pulltorefresh/pulltorefresh.taro.tsx @@ -1,6 +1,7 @@ import React, { FunctionComponent, ReactNode, useRef, useState } from 'react' import { ITouchEvent, View } from '@tarojs/components' import { Loading, More } from '@nutui/icons-react-taro' +import Taro from '@tarojs/taro' import { useConfig } from '@/packages/configprovider/index.taro' import { useTouch } from '@/utils/use-touch' import { rubberbandIfOutOfBounds } from '@/utils/rubberband' @@ -140,9 +141,14 @@ export const PullToRefresh: FunctionComponent> = ( setStatus('pulling') } } + // 安卓微信小程序onTouchMove回调次数少导致下拉卡顿,增加动效会更顺畅 + const isAndroidWeApp = + Taro.getSystemInfoSync().platform === 'android' && Taro.getEnv() === 'WEAPP' const springStyles = { height: `${height}px`, - ...(!pullingRef.current ? { transition: 'height .3s ease' } : {}), + ...(!pullingRef.current || isAndroidWeApp + ? { transition: 'height .3s ease' } + : {}), } return ( Date: Wed, 3 Jan 2024 11:20:55 +0800 Subject: [PATCH 013/275] chore(deps): update @nutui/icons to v1.0.1 (#1836) --- package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4faf5bb094..d7abaa4462 100644 --- a/package.json +++ b/package.json @@ -92,8 +92,8 @@ }, "dependencies": { "@babel/runtime": "^7.21.0", - "@nutui/icons-react": "^1.0.0", - "@nutui/icons-react-taro": "^1.0.0", + "@nutui/icons-react": "^1.0.1", + "@nutui/icons-react-taro": "^1.0.1", "@nutui/touch-emulator": "^1.0.0", "@react-spring/web": "~9.6.1", "@use-gesture/react": "10.2.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e36fc92611..34e390542c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,11 +16,11 @@ importers: specifier: ^7.21.0 version: 7.23.5 '@nutui/icons-react': - specifier: ^1.0.0 - version: 1.0.0 + specifier: ^1.0.1 + version: 1.0.1 '@nutui/icons-react-taro': - specifier: ^1.0.0 - version: 1.0.0 + specifier: ^1.0.1 + version: 1.0.1 '@nutui/touch-emulator': specifier: ^1.0.0 version: 1.0.0 @@ -2812,12 +2812,12 @@ packages: fastq: 1.15.0 dev: true - /@nutui/icons-react-taro@1.0.0: - resolution: {integrity: sha512-GlRqrRrhiRe6zZCzpc+nHzg9gjwM4uKWaXl8lde0ctVY6pYG1OMzyyb1sNgRZY3gRZj0bzY1cVXBXWkit/CVHQ==} + /@nutui/icons-react-taro@1.0.1: + resolution: {integrity: sha512-9eJqzv/a4JjyEm5Q64k4FAG9B4UmvQ9DGwtcC2apKTrJDCDJ+3XzEvTKIwYjCyatgW7FRwYwOA0wTmHhXxSzYw==} dev: false - /@nutui/icons-react@1.0.0: - resolution: {integrity: sha512-ARNcPJiSmBWQx3JJ3B/y7vby5AE8VK2HBHoEWN5xuwgDwra1R6yvYIzpSbt3CANlGBNGGtOABPv1mvPIxKs9yg==} + /@nutui/icons-react@1.0.1: + resolution: {integrity: sha512-i7Y4Z8/n/nij4da8/GfHgMYaro8+4N/27cxlE6hMtUErzYbf/iBQbgzeqbF/9l6pSWi2cH22PMWBJY2NT/YBAw==} dev: false /@nutui/touch-emulator@1.0.0: From feadd3f7d721f62090f4dbac415e128552b401bb Mon Sep 17 00:00:00 2001 From: LING_ZI_QING Date: Wed, 3 Jan 2024 13:42:18 +0800 Subject: [PATCH 014/275] =?UTF-8?q?feat(tabs):=20=E6=96=B0=E5=A2=9E=20CSS?= =?UTF-8?q?=20=E5=8F=98=E9=87=8F=20(#1835)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(cascader): 动态加载文档代码与 demo 保持一致,回显已选数据 * feat(tabs): 新增 CSS 变量 - --nutui-tabs-titles-padding 自定义内边距 - --nutui-tabs-titles-item-color 自定义文字颜色 * docs(tabs): 更新样式变量 新增 --nutui-tabs-titles-padding、--nutui-tabs-titles-item-color --- src/packages/tabs/doc.en-US.md | 3 ++- src/packages/tabs/doc.md | 2 ++ src/packages/tabs/doc.taro.md | 2 ++ src/packages/tabs/tabs.scss | 4 ++-- src/styles/variables.scss | 5 +++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/packages/tabs/doc.en-US.md b/src/packages/tabs/doc.en-US.md index abec53734d..6a123ff50b 100644 --- a/src/packages/tabs/doc.en-US.md +++ b/src/packages/tabs/doc.en-US.md @@ -659,10 +659,11 @@ The component provides the following CSS variables, which can be used to customi | --- | --- | --- | | \--nutui-tabs-titles-height | height of titles in horizontal direction | `44px` | | \--nutui-tabs-titles-background-color | Tab title background color | `$color-background` | +| \--nutui-tabs-titles-padding | Tab title padding | `0 16px` | | \--nutui-tabs-title-gap | Tab title margin | `0px` | | \--nutui-tabs-titles-font-size | Tab title font size | `$font-size-base` | - | \--nutui-tabs-titles-item-min-width | Minimum width of horizontal titles | `50px` | +| \--nutui-tabs-titles-item-color | Tab titles font color | `$color-title` | | \--nutui-tabs-titles-item-active-color | Tab selected titles font color | `$color-primary` | | \--nutui-tabs-titles-item-active-font-weight | Tab selected titles font weight | `$font-weight-bold` | | \--nutui-tabs-titles-item-active-font-size | Tab selected titles font size | `$font-size-large` | diff --git a/src/packages/tabs/doc.md b/src/packages/tabs/doc.md index 7bf7964bcf..c3c541c9b0 100644 --- a/src/packages/tabs/doc.md +++ b/src/packages/tabs/doc.md @@ -659,9 +659,11 @@ export default App; | --- | --- | --- | | \--nutui-tabs-titles-height | 水平方向标题的高度 | `44px` | | \--nutui-tabs-titles-background-color | Tab 标题的背景色 | `$color-background` | +| \--nutui-tabs-titles-padding | Tab 标题的内边距 | `0 16px` | | \--nutui-tabs-title-gap | Tab 标题的左右 margin | `0px` | | \--nutui-tabs-titles-font-size | Tab 标题的字号 | `$font-size-base` | | \--nutui-tabs-titles-item-min-width | 水平方向标题的最小宽度 | `50px` | +| \--nutui-tabs-titles-item-color | Tab 标题的字色 | `$color-title` | | \--nutui-tabs-titles-item-active-color | Tab 选中标题的字色 | `$color-primary` | | \--nutui-tabs-titles-item-active-font-weight | Tab 选中标题的字重 | `$font-weight-bold` | | \--nutui-tabs-titles-item-active-font-size | Tab 选中标题的字号 | `$font-size-large` | diff --git a/src/packages/tabs/doc.taro.md b/src/packages/tabs/doc.taro.md index f6b8578b39..e44acde3ae 100644 --- a/src/packages/tabs/doc.taro.md +++ b/src/packages/tabs/doc.taro.md @@ -659,9 +659,11 @@ export default App; | --- | --- | --- | | \--nutui-tabs-titles-height | 水平方向标题的高度 | `44px` | | \--nutui-tabs-titles-background-color | Tab 标题的背景色 | `$color-background` | +| \--nutui-tabs-titles-padding | Tab 标题的内边距 | `0 16px` | | \--nutui-tabs-title-gap | Tab 标题的左右 margin | `0px` | | \--nutui-tabs-titles-font-size | Tab 标题的字号 | `$font-size-base` | | \--nutui-tabs-titles-item-min-width | 水平方向标题的最小宽度 | `50px` | +| \--nutui-tabs-titles-item-color | Tab 标题的字色 | `$color-title` | | \--nutui-tabs-titles-item-active-color | Tab 选中标题的字色 | `$color-primary` | | \--nutui-tabs-titles-item-active-font-weight | Tab 选中标题的字重 | `$font-weight-bold` | | \--nutui-tabs-titles-item-active-font-size | Tab 选中标题的字号 | `$font-size-large` | diff --git a/src/packages/tabs/tabs.scss b/src/packages/tabs/tabs.scss index 130ed25487..df6e225228 100644 --- a/src/packages/tabs/tabs.scss +++ b/src/packages/tabs/tabs.scss @@ -9,7 +9,7 @@ display: flex; box-sizing: border-box; height: $tabs-titles-height; - padding: 0 16px; + padding: $tabs-titles-padding; user-select: none; overflow: hidden; background: $tabs-titles-background-color; @@ -50,7 +50,7 @@ margin: 0 $tabs-titles-gap; min-width: $tabs-titles-item-min-width; font-size: $tabs-titles-font-size; - color: $color-title; + color: $tabs-titles-item-color; text-overflow: ellipsis; white-space: nowrap; diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 99e8044762..6a4fdb9388 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -1592,6 +1592,7 @@ $tabs-titles-background-color: var( --nutui-tabs-titles-background-color, $color-background ) !default; +$tabs-titles-padding: var(--nutui-tabs-titles-padding, 0 16px) !default; $tabs-titles-gap: var(--nutui-tabs-titles-gap, 12px) !default; $tabs-titles-font-size: var( --nutui-tabs-titles-font-size, @@ -1601,6 +1602,10 @@ $tabs-titles-item-min-width: var( --nutui-tabs-titles-item-min-width, 50px ) !default; +$tabs-titles-item-color: var( + --nutui-tabs-titles-item-color, + $color-title +) !default; $tabs-titles-item-active-color: var( --nutui-tabs-titles-item-active-color, $color-primary From 8581a3ce60c1296344c535c2ea0286c4096a37e7 Mon Sep 17 00:00:00 2001 From: oasis-cloud <12181600+oasis-cloud@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:29:43 +0800 Subject: [PATCH 015/275] =?UTF-8?q?fix(picker):=20=E4=BC=98=E5=8C=96=20opt?= =?UTF-8?q?ions=20=E7=9A=84=20text=20=E5=B1=9E=E6=80=A7=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E7=A9=BA=E9=80=BB=E8=BE=91=20(#1837)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/picker/picker.taro.tsx | 2 +- src/packages/picker/pickerpanel.taro.tsx | 4 ++-- src/packages/picker/pickerpanel.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/packages/picker/picker.taro.tsx b/src/packages/picker/picker.taro.tsx index 9fd98d1481..94a31e9e39 100644 --- a/src/packages/picker/picker.taro.tsx +++ b/src/packages/picker/picker.taro.tsx @@ -428,7 +428,7 @@ const InternalPicker: ForwardRefRenderFunction< key={item.value || index} className="nut-picker-roller-item-title" > - <>{item.text || item} + <>{item.text} ) })} diff --git a/src/packages/picker/pickerpanel.taro.tsx b/src/packages/picker/pickerpanel.taro.tsx index a29a566c72..2b40b96436 100644 --- a/src/packages/picker/pickerpanel.taro.tsx +++ b/src/packages/picker/pickerpanel.taro.tsx @@ -289,7 +289,7 @@ const InternalPickerPanel: ForwardRefRenderFunction< }} key={item.value ? item.value : index} > - <>{item.text ? item.text : item} + <>{item.text}
    ) })} @@ -305,7 +305,7 @@ const InternalPickerPanel: ForwardRefRenderFunction< lineHeight: `${lineSpacing.current}px`, }} > - <>{item.text ? item.text : item} + <>{item.text}
    ) })} diff --git a/src/packages/picker/pickerpanel.tsx b/src/packages/picker/pickerpanel.tsx index 20fba4b51e..15e66ce773 100644 --- a/src/packages/picker/pickerpanel.tsx +++ b/src/packages/picker/pickerpanel.tsx @@ -276,7 +276,7 @@ const InternalPickerPanel: ForwardRefRenderFunction< }} key={item.value ? item.value : index} > - <>{item.text ? item.text : item} + <>{item.text}
    ) })} @@ -288,7 +288,7 @@ const InternalPickerPanel: ForwardRefRenderFunction< className="nut-picker-roller-item-title" key={item.value ? item.value : index} > - <>{item.text ? item.text : item} + <>{item.text}
    ) })} From 2f66a19de47bd801d16e5c7733ec51fd263d608b Mon Sep 17 00:00:00 2001 From: oasis-cloud <12181600+oasis-cloud@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:19:28 +0800 Subject: [PATCH 016/275] feat(range): marks type optimization (#1833) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(range): marks 类型优化 * feat(range): marks 类型优化 * fix(review): marks 数组没提供 label 的兼容处理,取 value --- src/packages/range/__test__/range.spec.tsx | 17 ++++++++ src/packages/range/demo.taro.tsx | 14 ++++++- src/packages/range/demo.tsx | 14 ++++++- src/packages/range/doc.en-US.md | 8 ++++ src/packages/range/doc.md | 18 ++++++--- src/packages/range/doc.taro.md | 8 ++++ src/packages/range/doc.zh-TW.md | 8 ++++ src/packages/range/index.taro.ts | 3 +- src/packages/range/index.ts | 3 +- src/packages/range/range.scss | 4 +- src/packages/range/range.taro.tsx | 45 ++++++++++++++-------- src/packages/range/range.tsx | 45 ++++++++++++++-------- src/packages/range/types.ts | 4 ++ 13 files changed, 144 insertions(+), 47 deletions(-) create mode 100644 src/packages/range/types.ts diff --git a/src/packages/range/__test__/range.spec.tsx b/src/packages/range/__test__/range.spec.tsx index 6d6ff0a81d..18fbae4e55 100644 --- a/src/packages/range/__test__/range.spec.tsx +++ b/src/packages/range/__test__/range.spec.tsx @@ -109,6 +109,23 @@ test('marks test', () => { ) }) +test('marks array', () => { + const state = { + value0: 40, + marks: [ + { value: 0, label: 'start' }, + { value: 100, label: 'end' }, + ], + } + const { container } = render( + + ) + expect(container.querySelector('.nut-range-mark')).toBeTruthy() + expect(container.querySelectorAll('.nut-range-mark-text')?.length).toEqual( + Object.keys(state.marks).length + ) +}) + test('custom-button test', () => { const state = { value0: 40, diff --git a/src/packages/range/demo.taro.tsx b/src/packages/range/demo.taro.tsx index 6228af7c06..889a672cf1 100644 --- a/src/packages/range/demo.taro.tsx +++ b/src/packages/range/demo.taro.tsx @@ -70,12 +70,12 @@ const RangeDemo = () => { const [value1, setValue1] = useState(40) const [value2, setValue2] = useState(60) const [marks] = useState({ - 0: 0, + 0: 'Start', 20: 20, 40: 40, 60: 60, 80: 80, - 100: 100, + 100: 'End', }) return ( @@ -86,6 +86,16 @@ const RangeDemo = () => { showToast(`${val}`)} /> + + showToast(`${val}`)} + /> +

    {translated.controlled}

    setValue1(val)} /> diff --git a/src/packages/range/demo.tsx b/src/packages/range/demo.tsx index 68ad362687..87d7b57e7b 100644 --- a/src/packages/range/demo.tsx +++ b/src/packages/range/demo.tsx @@ -64,12 +64,12 @@ const RangeDemo = () => { const [value1, setValue1] = useState(40) const [value2, setValue2] = useState(60) const [marks] = useState({ - 0: 0, + 0: 'Start', 20: 20, 40: 40, 60: 60, 80: 80, - 100: 100, + 100: 'End', }) return ( @@ -79,6 +79,16 @@ const RangeDemo = () => { Toast.show(`${val}`)} /> + + Toast.show(`${val}`)} + /> +

    {translated.controlled}

    setValue1(val)} /> diff --git a/src/packages/range/doc.en-US.md b/src/packages/range/doc.en-US.md index df4bab71d3..a4b06f88af 100644 --- a/src/packages/range/doc.en-US.md +++ b/src/packages/range/doc.en-US.md @@ -26,6 +26,14 @@ const App = () => { }; return Toast.show(`${val}`)} /> + Toast.show(`${val}`)} + /> }; export default App; diff --git a/src/packages/range/doc.md b/src/packages/range/doc.md index 3a0cc61c56..e4de5167fb 100644 --- a/src/packages/range/doc.md +++ b/src/packages/range/doc.md @@ -17,18 +17,26 @@ import { Range } from '@nutui/nutui-react'; :::demo ```tsx -import React from "react"; -import { Range, Cell, Toast } from '@nutui/nutui-react'; +import React from 'react' +import { Range, Cell, Toast } from '@nutui/nutui-react' const App = () => { const cellStyle = { padding: '40px 18px', - }; + } return Toast.show(`${val}`)} /> + Toast.show(`${val}`)} + /> -}; -export default App; +} +export default App ``` ::: diff --git a/src/packages/range/doc.taro.md b/src/packages/range/doc.taro.md index c427157fd1..5b7da62c6a 100644 --- a/src/packages/range/doc.taro.md +++ b/src/packages/range/doc.taro.md @@ -26,6 +26,14 @@ const App = () => { }; return console.log(`${val}`)} /> + console.log(`${val}`)} + /> }; export default App; diff --git a/src/packages/range/doc.zh-TW.md b/src/packages/range/doc.zh-TW.md index 326aa16aa2..af75399070 100644 --- a/src/packages/range/doc.zh-TW.md +++ b/src/packages/range/doc.zh-TW.md @@ -26,6 +26,14 @@ const App = () => { }; return Toast.show(`${val}`)} /> + Toast.show(`${val}`)} + /> }; export default App; diff --git a/src/packages/range/index.taro.ts b/src/packages/range/index.taro.ts index 1c6da75b92..0df55fe1cc 100644 --- a/src/packages/range/index.taro.ts +++ b/src/packages/range/index.taro.ts @@ -1,4 +1,5 @@ import { Range } from './range.taro' -export type { RangeProps, RangeValue } from './range.taro' +export type { RangeMark, RangeValue } from './types' +export type { RangeProps } from './range.taro' export default Range diff --git a/src/packages/range/index.ts b/src/packages/range/index.ts index 2079ea3416..5379c998cc 100644 --- a/src/packages/range/index.ts +++ b/src/packages/range/index.ts @@ -1,4 +1,5 @@ import { Range } from './range' -export type { RangeProps, RangeValue } from './range' +export type { RangeMark, RangeValue } from './types' +export type { RangeProps } from './range' export default Range diff --git a/src/packages/range/range.scss b/src/packages/range/range.scss index 01cd4df0cc..1b062c88ce 100644 --- a/src/packages/range/range.scss +++ b/src/packages/range/range.scss @@ -69,7 +69,7 @@ text-align: center; word-break: keep-all; user-select: none; - transform: translateY(-50%); + transform: translateY(-11px); } &-tick { @@ -191,7 +191,7 @@ text-align: center; word-break: keep-all; user-select: none; - transform: translateX(-50%); + transform: translateX(-10px); } &-tick { diff --git a/src/packages/range/range.taro.tsx b/src/packages/range/range.taro.tsx index 19e80865b7..88dc086913 100644 --- a/src/packages/range/range.taro.tsx +++ b/src/packages/range/range.taro.tsx @@ -12,8 +12,7 @@ import { useTouch } from '@/utils/use-touch' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { usePropsValue } from '@/utils/use-props-value' import { getRectByTaro } from '@/utils/get-rect-by-taro' - -export type RangeValue = number | number[] +import { RangeMark, RangeValue } from './types' export interface RangeProps extends BasicComponent { value: RangeValue @@ -27,7 +26,7 @@ export interface RangeProps extends BasicComponent { maxDescription: ReactNode button: ReactNode vertical: boolean - marks: Record + marks: Record | RangeMark[] currentDescription: ((value: RangeValue) => ReactNode) | null onChange: (value: RangeValue) => void onStart: () => void @@ -76,7 +75,7 @@ export const Range: FunctionComponent< const [dragStatus, setDragStatus] = useState('start' || 'draging' || '') const touch = useTouch() const root = useRef(null) - const [marksList, setMarksList] = useState([]) + const [marksList, setMarksList] = useState([]) const [startValue, setStartValue] = useState(0) @@ -93,15 +92,27 @@ export const Range: FunctionComponent< const [exactValue, setEaxctValue] = useState( () => value || defaultValue || 0 ) - + const marksRef = useRef<{ [key: string]: any }>({}) useEffect(() => { if (marks) { - const marksKeys = Object.keys(marks) - const list: any = marksKeys - .map(parseFloat) - .sort((a, b) => a - b) - .filter((point) => point >= min && point <= max) - setMarksList(list) + if (Array.isArray(marks)) { + // 增加变量 + const list = marks + .sort((a, b) => a.value - b.value) + .filter((point) => point.value >= min && point.value <= max) + setMarksList(list.map((mark) => mark.value)) + list.forEach((mark) => { + marksRef.current[mark.value] = + mark.label !== undefined ? mark.label : mark.value + }) + } else { + const marksKeys = Object.keys(marks) + const list: any = marksKeys + .map(parseFloat) + .sort((a, b) => a - b) + .filter((point) => point >= min && point <= max) + setMarksList(list) + } } }, [marks]) @@ -341,17 +352,17 @@ export const Range: FunctionComponent<
    click(e)}> {marksList.length > 0 && (
    - {marksList.map((marks: any) => { + {marksList.map((mark: any) => { return ( - {marks} + {Array.isArray(marks) ? marksRef.current[mark] : marks[mark]} diff --git a/src/packages/range/range.tsx b/src/packages/range/range.tsx index 26aba6cf4c..f26df13fdd 100644 --- a/src/packages/range/range.tsx +++ b/src/packages/range/range.tsx @@ -12,8 +12,7 @@ import { useTouch } from '@/utils/use-touch' import { getRect } from '@/utils/use-client-rect' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { usePropsValue } from '@/utils/use-props-value' - -export type RangeValue = number | number[] +import { RangeMark, RangeValue } from './types' export interface RangeProps extends BasicComponent { value: RangeValue @@ -27,7 +26,7 @@ export interface RangeProps extends BasicComponent { maxDescription: ReactNode button: ReactNode vertical: boolean - marks: Record + marks: Record | RangeMark[] currentDescription: ((value: RangeValue) => ReactNode) | null onChange: (value: RangeValue) => void onStart: () => void @@ -76,7 +75,7 @@ export const Range: FunctionComponent< const [dragStatus, setDragStatus] = useState('start' || 'draging' || '') const touch = useTouch() const root = useRef(null) - const [marksList, setMarksList] = useState([]) + const [marksList, setMarksList] = useState([]) const [startValue, setStartValue] = useState(0) @@ -93,15 +92,27 @@ export const Range: FunctionComponent< const [exactValue, setEaxctValue] = useState( () => value || defaultValue || 0 ) - + const marksRef = useRef<{ [key: string]: any }>({}) useEffect(() => { if (marks) { - const marksKeys = Object.keys(marks) - const list: any = marksKeys - .map(parseFloat) - .sort((a, b) => a - b) - .filter((point) => point >= min && point <= max) - setMarksList(list) + if (Array.isArray(marks)) { + // 增加变量 + const list = marks + .sort((a, b) => a.value - b.value) + .filter((point) => point.value >= min && point.value <= max) + setMarksList(list.map((mark) => mark.value)) + list.forEach((mark) => { + marksRef.current[mark.value] = + mark.label !== undefined ? mark.label : mark.value + }) + } else { + const marksKeys = Object.keys(marks) + const list: any = marksKeys + .map(parseFloat) + .sort((a, b) => a - b) + .filter((point) => point >= min && point <= max) + setMarksList(list) + } } }, [marks]) @@ -342,17 +353,17 @@ export const Range: FunctionComponent<
    click(e)}> {marksList.length > 0 && (
    - {marksList.map((marks: any) => { + {marksList.map((mark: any) => { return ( - {marks} + {Array.isArray(marks) ? marksRef.current[mark] : marks[mark]} diff --git a/src/packages/range/types.ts b/src/packages/range/types.ts new file mode 100644 index 0000000000..d6047c30ae --- /dev/null +++ b/src/packages/range/types.ts @@ -0,0 +1,4 @@ +import { ReactNode } from 'react' + +export type RangeValue = number | number[] +export type RangeMark = { value: number; label?: ReactNode } From 155d200b1f181de1b37e3bc09649f4da040e95ff Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:33:49 +0800 Subject: [PATCH 017/275] fix(tabs): docs and jmapp css variables (#1838) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: uploader taro h5 支持video * fix: delete sth doesnot merge * fix(cascader): 第二列数据无法展示问题修复 * fix(tabs): docs and jmapp css variables --- src/packages/tabs/doc.zh-TW.md | 2 ++ src/styles/variables-jmapp.scss | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/packages/tabs/doc.zh-TW.md b/src/packages/tabs/doc.zh-TW.md index 0219830099..b100cbfcda 100644 --- a/src/packages/tabs/doc.zh-TW.md +++ b/src/packages/tabs/doc.zh-TW.md @@ -659,9 +659,11 @@ export default App; | --- | --- | --- | | \--nutui-tabs-titles-height | 水平方向標題的高度 | `44px` | | \--nutui-tabs-titles-background-color | Tab 標題的背景色 | `$color-background` | +| \--nutui-tabs-titles-padding | Tab 標題的內邊距 | `0 16px` | | \--nutui-tabs-title-gap | Tab 標題的左右 margin | `0px` | | \--nutui-tabs-titles-font-size | Tab 標題的字號 | `$font-size-base` | | \--nutui-tabs-titles-item-min-width | 水平方向標題的最小寬度 | `50px` | +| \--nutui-tabs-titles-item-color | Tab 標題的字色 | `$color-title` | | \--nutui-tabs-titles-item-active-color | Tab 選中標題的字色 | `$color-primary` | | \--nutui-tabs-titles-item-active-font-weight | Tab 選中標題的字重 | `$font-weight-bold` | | \--nutui-tabs-titles-item-active-font-size | Tab 選中標題的字號 | `$font-size-large` | diff --git a/src/styles/variables-jmapp.scss b/src/styles/variables-jmapp.scss index 476deca33b..8efa60e452 100644 --- a/src/styles/variables-jmapp.scss +++ b/src/styles/variables-jmapp.scss @@ -1634,6 +1634,7 @@ $tabs-titles-background-color: var( --nutui-tabs-titles-background-color, $white ) !default; +$tabs-titles-padding: var(--nutui-tabs-titles-padding, 0 16px) !default; $tabs-titles-gap: var(--nutui-tabs-titles-gap, 12px) !default; $tabs-titles-font-size: var( --nutui-tabs-titles-font-size, @@ -1643,6 +1644,10 @@ $tabs-titles-item-min-width: var( --nutui-tabs-titles-item-min-width, 50px ) !default; +$tabs-titles-item-color: var( + --nutui-tabs-titles-item-color, + $color-title +) !default; $tabs-titles-item-active-color: var( --nutui-tabs-titles-item-active-color, $color-text-link From 853a3278fcb17e011d3f9324e9e31a23144587d3 Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:35:23 +0800 Subject: [PATCH 018/275] fix(empty): fix import at taro (#1839) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: uploader taro h5 支持video * fix: delete sth doesnot merge * fix(cascader): 第二列数据无法展示问题修复 * fix(Empty): fix import at taro --- src/packages/empty/empty.taro.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/packages/empty/empty.taro.tsx b/src/packages/empty/empty.taro.tsx index 7bbb420729..5fcdbcce03 100644 --- a/src/packages/empty/empty.taro.tsx +++ b/src/packages/empty/empty.taro.tsx @@ -2,9 +2,8 @@ import React, { FunctionComponent, useEffect, useState, ReactNode } from 'react' import classNames from 'classnames' import { useConfig } from '@/packages/configprovider/configprovider.taro' import { BasicComponent, ComponentDefaults } from '@/utils/typings' -import { EmptyAction } from '@/packages/empty/index.taro' - -import Button from '../button' +import type { EmptyAction } from './types' +import { Button } from '@/packages/button/button.taro' type statusOptions = { [key: string]: string From b890826c59636406d9b8098624776b4ec3029a43 Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:36:45 +0800 Subject: [PATCH 019/275] fix(avatarcropper): fix cannot display when it is development at taro (#1840) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: uploader taro h5 支持video * fix: delete sth doesnot merge * fix(cascader): 第二列数据无法展示问题修复 * fix(AvatarCropper): fix cannot display when it is development at taro --- src/packages/avatarcropper/demo.taro.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/packages/avatarcropper/demo.taro.tsx b/src/packages/avatarcropper/demo.taro.tsx index 13ea9f4d42..2b0900c2d1 100644 --- a/src/packages/avatarcropper/demo.taro.tsx +++ b/src/packages/avatarcropper/demo.taro.tsx @@ -2,9 +2,13 @@ import React, { useState } from 'react' import Taro from '@tarojs/taro' import { Refresh, Retweet } from '@nutui/icons-react-taro' import { useTranslate } from '@/sites/assets/locale/taro' -import { AvatarCropper } from './avatarcropper.taro' import Header from '@/sites/components/header' -import { Cell, Button, Avatar } from '@/packages/nutui.react.taro' +import { + Cell, + Button, + Avatar, + AvatarCropper, +} from '@/packages/nutui.react.taro' import './demo.scss' interface T { From 05a985a1306b98cc900712595f0df6598bf4c400 Mon Sep 17 00:00:00 2001 From: Marvin Gui <63292605+yi-boide@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:42:55 +0800 Subject: [PATCH 020/275] =?UTF-8?q?feat(avatarcropper):=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B1=9E=E6=80=A7shape=EF=BC=8C=E5=8F=AF=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=A3=81=E5=89=AA=E6=A0=B7=E5=BC=8F=E4=B8=BA=E5=9C=86?= =?UTF-8?q?=E5=BD=A2=20(#1842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__snapshots__/avatarcropper.spec.tsx.snap | 1 + src/packages/avatarcropper/avatarcropper.scss | 5 +++ .../avatarcropper/avatarcropper.taro.tsx | 12 ++++++- src/packages/avatarcropper/avatarcropper.tsx | 8 ++++- src/packages/avatarcropper/demo.taro.tsx | 10 ++++++ src/packages/avatarcropper/demo.tsx | 10 ++++++ src/packages/avatarcropper/doc.en-US.md | 31 +++++++++++++++++++ src/packages/avatarcropper/doc.md | 31 +++++++++++++++++++ src/packages/avatarcropper/doc.taro.md | 31 +++++++++++++++++++ src/packages/avatarcropper/doc.zh-TW.md | 31 +++++++++++++++++++ src/packages/avatarcropper/index.taro.ts | 1 + src/packages/avatarcropper/index.ts | 1 + 12 files changed, 170 insertions(+), 2 deletions(-) diff --git a/src/packages/avatarcropper/__tests__/__snapshots__/avatarcropper.spec.tsx.snap b/src/packages/avatarcropper/__tests__/__snapshots__/avatarcropper.spec.tsx.snap index cc66919697..7990790464 100644 --- a/src/packages/avatarcropper/__tests__/__snapshots__/avatarcropper.spec.tsx.snap +++ b/src/packages/avatarcropper/__tests__/__snapshots__/avatarcropper.spec.tsx.snap @@ -10,6 +10,7 @@ exports[`layout default slot 1`] = ` /> diff --git a/src/packages/avatarcropper/avatarcropper.scss b/src/packages/avatarcropper/avatarcropper.scss index 43275ac93f..bfb79bf5aa 100644 --- a/src/packages/avatarcropper/avatarcropper.scss +++ b/src/packages/avatarcropper/avatarcropper.scss @@ -89,4 +89,9 @@ } } } + &.round { + .nut-avatar-cropper-edit-text { + border-radius: 50%; + } + } } diff --git a/src/packages/avatarcropper/avatarcropper.taro.tsx b/src/packages/avatarcropper/avatarcropper.taro.tsx index efb02a231c..7227189757 100644 --- a/src/packages/avatarcropper/avatarcropper.taro.tsx +++ b/src/packages/avatarcropper/avatarcropper.taro.tsx @@ -16,6 +16,7 @@ import { clamp, preventDefault } from '@/utils' export type AvatarCropperToolbarPosition = 'top' | 'bottom' export type AvatarCropperSizeType = 'original' | 'compressed' export type AvatarCropperSourceType = 'album' | 'camera' +export type AvatarCropperShape = 'square' | 'round' export interface AvatarCropperProps extends BasicComponent { maxZoom: number space: number @@ -24,6 +25,7 @@ export interface AvatarCropperProps extends BasicComponent { editText: React.ReactNode | string sizeType: AvatarCropperSizeType[] sourceType: AvatarCropperSourceType[] + shape: AvatarCropperShape onConfirm: (e: string) => void onCancel: () => void } @@ -46,6 +48,7 @@ const defaultProps = { editText: '编辑', sizeType: ['original', 'compressed'], sourceType: ['album', 'camera'], + shape: 'square', } as AvatarCropperProps const classPrefix = `nut-avatar-cropper` @@ -61,6 +64,7 @@ export const AvatarCropper: FunctionComponent> = ( editText, sizeType, sourceType, + shape, className, style, onConfirm, @@ -83,7 +87,12 @@ export const AvatarCropper: FunctionComponent> = ( cropperCanvasContext: Taro.CanvasContext | null } - const cls = classNames(classPrefix, 'taro', className) + const cls = classNames( + classPrefix, + 'taro', + className, + shape === 'round' && 'round' + ) const toolbarPositionCls = classNames( `${classPrefix}-popup-toolbar`, toolbarPosition @@ -160,6 +169,7 @@ export const AvatarCropper: FunctionComponent> = ( return { width, height, + borderRadius: shape === 'round' ? '50%' : '', } }, [pixelRatio, state.cropperWidth]) diff --git a/src/packages/avatarcropper/avatarcropper.tsx b/src/packages/avatarcropper/avatarcropper.tsx index a132e38cb7..6ca2af7c8c 100644 --- a/src/packages/avatarcropper/avatarcropper.tsx +++ b/src/packages/avatarcropper/avatarcropper.tsx @@ -14,12 +14,14 @@ import { clamp, preventDefault } from '@/utils' import { getRect } from '@/utils/use-client-rect' export type AvatarCropperToolbarPosition = 'top' | 'bottom' +export type AvatarCropperShape = 'square' | 'round' export interface AvatarCropperProps extends BasicComponent { maxZoom: number space: number toolbar: React.ReactNode[] toolbarPosition: AvatarCropperToolbarPosition editText: React.ReactNode | string + shape: AvatarCropperShape onConfirm: (e: string) => void onCancel: () => void } @@ -40,6 +42,7 @@ const defaultProps = { ], toolbarPosition: 'bottom', editText: '编辑', + shape: 'square', } as AvatarCropperProps const classPrefix = `nut-avatar-cropper` @@ -53,6 +56,7 @@ export const AvatarCropper: FunctionComponent> = ( space, toolbarPosition, editText, + shape, className, style, onConfirm, @@ -63,7 +67,7 @@ export const AvatarCropper: FunctionComponent> = ( ...props, } - const cls = classNames(classPrefix, className) + const cls = classNames(classPrefix, className, shape === 'round' && 'round') const toolbarPositionCls = classNames( `${classPrefix}-popup-toolbar`, toolbarPosition @@ -109,6 +113,7 @@ export const AvatarCropper: FunctionComponent> = ( return { width, height, + borderRadius: shape === 'round' ? '50%' : '', } }, [devicePixelRatio, drawImage.swidth]) @@ -469,6 +474,7 @@ export const AvatarCropper: FunctionComponent> = ( accept="image/*" className={`${classPrefix}-input`} onChange={(e: any) => inputImageChange(e)} + aria-label="选择图片" />
    {editText}
    diff --git a/src/packages/avatarcropper/demo.taro.tsx b/src/packages/avatarcropper/demo.taro.tsx index 2b0900c2d1..573aa51751 100644 --- a/src/packages/avatarcropper/demo.taro.tsx +++ b/src/packages/avatarcropper/demo.taro.tsx @@ -14,20 +14,24 @@ import './demo.scss' interface T { c0a1c0a1: string c0a1c0a2: string + c0a1c0a3: string } const AvatarCropperDemo = () => { const [translated] = useTranslate({ 'zh-CN': { c0a1c0a1: '基础用法', c0a1c0a2: '自定义裁剪区域工具栏', + c0a1c0a3: '圆形裁剪', }, 'zh-TW': { c0a1c0a1: '基礎用法', c0a1c0a2: '自定義裁剪區域工具欄', + c0a1c0a3: '圓形裁剪', }, 'en-US': { c0a1c0a1: 'Basic usage', c0a1c0a2: 'Customize the cropping area toolbar', + c0a1c0a3: 'Roll Finger Cutting', }, }) const [imageUrl, setImageUrl] = useState( @@ -70,6 +74,12 @@ const AvatarCropperDemo = () => { +

    {translated.c0a1c0a3}

    + + + + +
    ) diff --git a/src/packages/avatarcropper/demo.tsx b/src/packages/avatarcropper/demo.tsx index 88661ba3d2..efe5ad2bfd 100644 --- a/src/packages/avatarcropper/demo.tsx +++ b/src/packages/avatarcropper/demo.tsx @@ -8,20 +8,24 @@ import './demo.scss' interface T { c0a1c0a1: string c0a1c0a2: string + c0a1c0a3: string } const AvatarCropperDemo = () => { const [translated] = useTranslate({ 'zh-CN': { c0a1c0a1: '基础用法', c0a1c0a2: '自定义裁剪区域工具栏', + c0a1c0a3: '圆形裁剪', }, 'zh-TW': { c0a1c0a1: '基礎用法', c0a1c0a2: '自定義裁剪區域工具欄', + c0a1c0a3: '圓形裁剪', }, 'en-US': { c0a1c0a1: 'Basic usage', c0a1c0a2: 'Customize the cropping area toolbar', + c0a1c0a3: 'Roll Finger Cutting', }, }) const [imageUrl, setImageUrl] = useState( @@ -59,6 +63,12 @@ const AvatarCropperDemo = () => { +

    {translated.c0a1c0a3}

    + + + + +
    ) diff --git a/src/packages/avatarcropper/doc.en-US.md b/src/packages/avatarcropper/doc.en-US.md index adbe42c68f..f83e4e30e9 100644 --- a/src/packages/avatarcropper/doc.en-US.md +++ b/src/packages/avatarcropper/doc.en-US.md @@ -87,6 +87,36 @@ export default App; ::: +### Roll Finger Cutting + +Set the shape of the crop display, which is still square after the crop, and need to set rounded corners in the display place + +:::demo + +```tsx +import React, { useState } from "react"; +import { Avatar, AvatarCropper } from '@nutui/nutui-react'; + +const App = () => { + const [imageUrl, setImageUrl] = useState( + 'https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png' + ) + const cutImage = (data: any) => { + setImageUrl(data) + } + return ( + <> + + + + + ) +} +export default App; +``` + +::: + ## AvatarCropper ### Props @@ -98,5 +128,6 @@ export default App; | edit-text | The text content in the middle | `ReactNode \| string` | `编辑` | | toolbar | Customize the clipping area toolbar, after setting this content | `ReactNode[]` | `[, ,,]` | | toolbar-position | Location of the toolbar in the clipping area. The optional value is:`top` `bottom` | `string` | `bottom` | +| shape | Crop shape, optional value is:`square` `round` | `string` | `square` | | onConfirm | Click Confirm to trigger after cropping | `(url: string) => void` | `-` | | onCancel | Click cancel trigger | `-` | `-` | \ No newline at end of file diff --git a/src/packages/avatarcropper/doc.md b/src/packages/avatarcropper/doc.md index 8e3eb812ce..e5b4161d68 100644 --- a/src/packages/avatarcropper/doc.md +++ b/src/packages/avatarcropper/doc.md @@ -87,6 +87,36 @@ export default App; ::: +### 圆形裁剪 + +设置裁剪展示的形状,裁剪后还是方形的,需要在展示的地方设置圆角 + +:::demo + +```tsx +import React, { useState } from "react"; +import { Avatar, AvatarCropper } from '@nutui/nutui-react'; + +const App = () => { + const [imageUrl, setImageUrl] = useState( + 'https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png' + ) + const cutImage = (data: any) => { + setImageUrl(data) + } + return ( + <> + + + + + ) +} +export default App; +``` + +::: + ## AvatarCropper ### Props @@ -98,5 +128,6 @@ export default App; | editText | 中间的文字内容 | `ReactNode \| string` | `编辑` | | toolbar | 自定义裁剪区域工具栏 | `ReactNode[]` | `[, ,,]` | | toolbarPosition | 裁剪区域工具栏位置,可选值为:`top` `bottom` | `string` | `bottom` | +| shape | 裁剪形状,可选值为:`square` `round` | `string` | `square` | | onConfirm | 裁剪后点击确认触发 | `(url: string) => void` | `-` | | onCancel | 点击取消触发 | `-` | `-` | \ No newline at end of file diff --git a/src/packages/avatarcropper/doc.taro.md b/src/packages/avatarcropper/doc.taro.md index 2e0b181547..b902973fb8 100644 --- a/src/packages/avatarcropper/doc.taro.md +++ b/src/packages/avatarcropper/doc.taro.md @@ -87,6 +87,36 @@ export default App; ::: +### 圆形裁剪 + +设置裁剪展示的形状,裁剪后还是方形的,需要在展示的地方设置圆角 + +:::demo + +```tsx +import React, { useState } from "react"; +import { Avatar, AvatarCropper } from '@nutui/nutui-react'; + +const App = () => { + const [imageUrl, setImageUrl] = useState( + 'https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png' + ) + const cutImage = (data: any) => { + setImageUrl(data) + } + return ( + <> + + + + + ) +} +export default App; +``` + +::: + ## AvatarCropper ### Props @@ -100,5 +130,6 @@ export default App; | source-type | 选择图片的来源: 可选值:`album` `camera` | `Array` | `['album', 'camera']` | | toolbar | 自定义裁剪区域工具栏 | `ReactNode[]` | `[, ,,]` | | toolbarPosition | 裁剪区域工具栏位置,可选值为:`top` `bottom` | `string` | `bottom` | +| shape | 裁剪形状,可选值为:`square` `round` | `string` | `square` | | onConfirm | 裁剪后点击确认触发 | `(url: string) => void` | `-` | | onCancel | 点击取消触发 | `-` | `-` | \ No newline at end of file diff --git a/src/packages/avatarcropper/doc.zh-TW.md b/src/packages/avatarcropper/doc.zh-TW.md index dedf0766a1..b7a94985f8 100644 --- a/src/packages/avatarcropper/doc.zh-TW.md +++ b/src/packages/avatarcropper/doc.zh-TW.md @@ -87,6 +87,36 @@ export default App; ::: +### 圓形裁剪 + +設置裁剪展示的形狀,裁剪後還是方形的,需要在展示的地方設置圓角 + +:::demo + +```tsx +import React, { useState } from "react"; +import { Avatar, AvatarCropper } from '@nutui/nutui-react'; + +const App = () => { + const [imageUrl, setImageUrl] = useState( + 'https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png' + ) + const cutImage = (data: any) => { + setImageUrl(data) + } + return ( + <> + + + + + ) +} +export default App; +``` + +::: + ## AvatarCropper ### Props @@ -98,5 +128,6 @@ export default App; | toolbarPosition | 裁剪區域工具欄位置,可選值為:`top` `bottom` | `string` | `bottom` | | editText | 中間的文字內容 | `ReactNode \| string` | `編輯` | | toolbar | 自定義裁剪區域工具欄 | `ReactNode[]` | `[, ,,]` | +| shape | 裁剪形狀,可選值爲:`square` `round` | `string` | `square` | | onConfirm | 裁剪後點擊確認觸發 | `(url: string) => void` | `-` | | onCancel | 點擊取消觸發 | `-` | `-` | \ No newline at end of file diff --git a/src/packages/avatarcropper/index.taro.ts b/src/packages/avatarcropper/index.taro.ts index 20de7119c4..8bb9890391 100644 --- a/src/packages/avatarcropper/index.taro.ts +++ b/src/packages/avatarcropper/index.taro.ts @@ -5,5 +5,6 @@ export type { AvatarCropperToolbarPosition, AvatarCropperSizeType, AvatarCropperSourceType, + AvatarCropperShape, } from './avatarcropper.taro' export default AvatarCropper diff --git a/src/packages/avatarcropper/index.ts b/src/packages/avatarcropper/index.ts index 2c7031e461..9fad28a9c8 100644 --- a/src/packages/avatarcropper/index.ts +++ b/src/packages/avatarcropper/index.ts @@ -3,5 +3,6 @@ import { AvatarCropper } from './avatarcropper' export type { AvatarCropperProps, AvatarCropperToolbarPosition, + AvatarCropperShape, } from './avatarcropper' export default AvatarCropper From 28dc67d7ad3a2f76e59dfc0d68a60e52cb40874e Mon Sep 17 00:00:00 2001 From: Eiinu Date: Fri, 5 Jan 2024 13:27:14 +0800 Subject: [PATCH 021/275] =?UTF-8?q?fix(picker):=20=E4=BF=AE=E5=A4=8D=20saf?= =?UTF-8?q?ari=20=E4=B8=8B=20mask=20=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1843)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/picker/picker.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packages/picker/picker.scss b/src/packages/picker/picker.scss index 7ab83b4305..8c20492b2c 100644 --- a/src/packages/picker/picker.scss +++ b/src/packages/picker/picker.scss @@ -86,6 +86,7 @@ background-position: top, bottom; background-size: 100% 108px; background-repeat: no-repeat; + transform: translateZ(0); z-index: 3; } From a97a4f06b38f0bfd2de969e82489d40d899e93f4 Mon Sep 17 00:00:00 2001 From: LING_ZI_QING Date: Fri, 5 Jan 2024 14:32:00 +0800 Subject: [PATCH 022/275] =?UTF-8?q?feat(dialog):=20=E6=96=B0=E5=A2=9E=20CS?= =?UTF-8?q?S=20=E5=8F=98=E9=87=8F=20(#1844)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/dialog/dialog.scss | 2 +- src/packages/dialog/doc.en-US.md | 1 + src/packages/dialog/doc.md | 1 + src/packages/dialog/doc.taro.md | 1 + src/packages/dialog/doc.zh-TW.md | 1 + src/styles/variables-jmapp.scss | 4 ++++ src/styles/variables.scss | 4 ++++ 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/packages/dialog/dialog.scss b/src/packages/dialog/dialog.scss index 5ca04da48f..d0fdfae4eb 100644 --- a/src/packages/dialog/dialog.scss +++ b/src/packages/dialog/dialog.scss @@ -37,7 +37,7 @@ &-header { display: block; text-align: center; - font-size: $font-size-large; + font-size: $dialog-header-font-size; font-weight: $dialog-header-font-weight; color: $color-title; @include oneline-ellipsis(); diff --git a/src/packages/dialog/doc.en-US.md b/src/packages/dialog/doc.en-US.md index f8cc9b22ed..9b930f8cc0 100644 --- a/src/packages/dialog/doc.en-US.md +++ b/src/packages/dialog/doc.en-US.md @@ -235,6 +235,7 @@ The component provides the following CSS variables, which can be used to customi | \--nutui-dialog-content-max-height | dialog content max height | `268px` | | \--nutui-dialog-content-line-height | dialog content line height | `20px` | | \--nutui-dialog-content-text-align | dialog content text align | `left` | +| \--nutui-dialog-header-font-size | dialog header font size | `$font-size-large` | | \--nutui-dialog-header-font-weight | dialog header font weight | `normal` | | \--nutui-dialog-footer-justify-content | dialog footer justify content | `space-around` | | \--nutui-dialog-footer-button-min-width | dialog footer button min width | `117px` | diff --git a/src/packages/dialog/doc.md b/src/packages/dialog/doc.md index e6d110e64b..dc80e03e03 100644 --- a/src/packages/dialog/doc.md +++ b/src/packages/dialog/doc.md @@ -261,6 +261,7 @@ export default function App() { | \--nutui-dialog-content-max-height | 对话框内容最大高度 | `268px` | | \--nutui-dialog-content-line-height | 对话框内容行高 | `20px` | | \--nutui-dialog-content-text-align | 对话框内容文本对齐方式 | `left` | +| \--nutui-dialog-header-font-size | 对话框标题字体大小 | `$font-size-large` | | \--nutui-dialog-header-font-weight | 对话框标题字重 | `normal` | | \--nutui-dialog-footer-justify-content | 对话框底部按钮排布 | `space-around` | | \--nutui-dialog-footer-button-min-width | 对话框底部按钮最小宽度 | `117px` | diff --git a/src/packages/dialog/doc.taro.md b/src/packages/dialog/doc.taro.md index 620f5e6ed9..1beb0d1180 100644 --- a/src/packages/dialog/doc.taro.md +++ b/src/packages/dialog/doc.taro.md @@ -228,6 +228,7 @@ DialogOptions 是 DialogProps 的子集,包含如下属性:title, content, f | \--nutui-dialog-content-max-height | 对话框内容最大高度 | `268px` | | \--nutui-dialog-content-line-height | 对话框内容行高 | `20px` | | \--nutui-dialog-content-text-align | 对话框内容文本对齐方式 | `left` | +| \--nutui-dialog-header-font-size | 对话框标题字体大小 | `$font-size-large` | | \--nutui-dialog-header-font-weight | 对话框标题字重 | `normal` | | \--nutui-dialog-footer-justify-content | 对话框底部按钮排布 | `space-around` | | \--nutui-dialog-footer-button-min-width | 对话框底部按钮最小宽度 | `117px` | diff --git a/src/packages/dialog/doc.zh-TW.md b/src/packages/dialog/doc.zh-TW.md index ed87d44a33..0adbea5d0e 100644 --- a/src/packages/dialog/doc.zh-TW.md +++ b/src/packages/dialog/doc.zh-TW.md @@ -261,6 +261,7 @@ export default function App() { | \--nutui-dialog-content-max-height | 對話框內容最大高度 | `268px` | | \--nutui-dialog-content-line-height | 對話框內容行高 | `20px` | | \--nutui-dialog-content-text-align | 對話框內容文本對齊方式 | `left` | +| \--nutui-dialog-header-font-size | 對話框標題字体大小 | `$font-size-large` | | \--nutui-dialog-header-font-weight | 對話框標題字重 | `normal` | | \--nutui-dialog-footer-justify-content | 對話框底部按鈕排布 | `space-around` | | \--nutui-dialog-footer-button-min-width | 對話框底部按鈕最小寬度 | `117px` | diff --git a/src/styles/variables-jmapp.scss b/src/styles/variables-jmapp.scss index 8efa60e452..eb74a1999a 100644 --- a/src/styles/variables-jmapp.scss +++ b/src/styles/variables-jmapp.scss @@ -1289,6 +1289,10 @@ $dialog-footer-ok-max-width: var( --nutui-dialog-footer-ok-max-width, 128px ) !default; +$dialog-header-font-size: var( + --nutui-dialog-header-font-size, + $font-size-large +) !default; $dialog-header-font-weight: var( --nutui-dialog-header-font-weight, normal diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 6a4fdb9388..e5916ff562 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -1239,6 +1239,10 @@ $dialog-footer-ok-max-width: var( --nutui-dialog-footer-ok-max-width, 128px ) !default; +$dialog-header-font-size: var( + --nutui-dialog-header-font-size, + $font-size-large +) !default; $dialog-header-font-weight: var( --nutui-dialog-header-font-weight, normal From c6e509338e0a441290059111a27f4239058b72dc Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Fri, 5 Jan 2024 14:42:17 +0800 Subject: [PATCH 023/275] chore(release): v2.3.5 --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 4 ++-- src/packages/configprovider/types.ts | 3 +++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cc1666674..d8ac4e1c3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# v2.3.5 +`2024-01-05` + +* :sparkles: feat(avatarcropper): 新增属性shape,可设置裁剪样式为圆形 (#1842) @Marvin Gui +* :sparkles: feat(dialog): 新增 CSS 变量 (#1844) @LING_ZI_QING +* :sparkles: feat(range): marks type optimization (#1833) @oasis-cloud +* :sparkles: feat(tabs): 新增 CSS 变量 (#1835) @LING_ZI_QING +* :bug: fix(avatarcropper): fix cannot display when it is development at taro (#1840) @xiaoyatong +* :bug: fix(empty): fix import at taro (#1839) @xiaoyatong +* :bug: fix(picker): 优化 options 的 text 属性的判空逻辑 (#1837) @oasis-cloud +* :bug: fix(picker): 修复 safari 下 mask 样式问题 (#1843) @Eiinu +* :bug: fix(pulltorefresh): 修复安卓小程序下拉卡顿问题 (#1830) @NickH +* :bug: fix(tabs): docs and jmapp css variables (#1838) @xiaoyatong +* 🔨 chore(deps): update @nutui/icons to v1.0.1 (#1836) @oasis-cloud + + # v2.3.4 `2023-12-29` diff --git a/package.json b/package.json index d7abaa4462..1102924c2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@nutui/nutui-react-taro", - "version": "2.3.4", + "name": "@nutui/nutui-react", + "version": "2.3.5", "style": "dist/style.css", "main": "dist/nutui.react.umd.js", "module": "dist/esm/nutui-react.es.js", diff --git a/src/packages/configprovider/types.ts b/src/packages/configprovider/types.ts index a1dbd684f3..58ef1e2a82 100644 --- a/src/packages/configprovider/types.ts +++ b/src/packages/configprovider/types.ts @@ -410,6 +410,7 @@ export type NutCSSVariables = | 'nutuiDialogFooterButtonMinWidth' | 'nutuiDialogFooterCancelMarginRight' | 'nutuiDialogFooterOkMaxWidth' + | 'nutuiDialogHeaderFontSize' | 'nutuiDialogHeaderFontWeight' | 'nutuiDialogVerticalFooterOkMarginTop' | 'nutuiCheckboxLabelDisableColor' @@ -528,9 +529,11 @@ export type NutCSSVariables = | 'nutuiBlack5' | 'nutuiTabsTitlesHeight' | 'nutuiTabsTitlesBackgroundColor' + | 'nutuiTabsTitlesPadding' | 'nutuiTabsTitlesGap' | 'nutuiTabsTitlesFontSize' | 'nutuiTabsTitlesItemMinWidth' + | 'nutuiTabsTitlesItemColor' | 'nutuiTabsTitlesItemActiveColor' | 'nutuiTabsTitlesItemActiveFontWeight' | 'nutuiTabsTitlesItemActiveFontSize' From c8e1ae03ee0e16a67c80f953329f485dbeeef254 Mon Sep 17 00:00:00 2001 From: "Alex.huxiyang" <99181718+Alexx12321@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:38:11 +0800 Subject: [PATCH 024/275] =?UTF-8?q?feat:=20doc=E6=96=87=E6=A1=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20(#1850)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/button/doc.en-US.md | 10 +++++++--- src/packages/button/doc.md | 8 ++++++-- src/packages/button/doc.taro.md | 8 ++++++-- src/packages/button/doc.zh-TW.md | 8 ++++++-- src/packages/infiniteloading/doc.md | 2 +- src/packages/infiniteloading/doc.taro.md | 2 +- src/packages/infiniteloading/doc.zh-TW.md | 2 +- src/packages/radio/doc.en-US.md | 2 +- src/packages/radio/doc.md | 2 +- src/packages/radio/doc.taro.md | 2 +- src/packages/radio/doc.zh-TW.md | 2 +- src/packages/skeleton/doc.md | 2 +- src/packages/skeleton/doc.taro.md | 2 +- src/packages/skeleton/doc.zh-TW.md | 2 +- src/packages/space/doc.en-US.md | 2 +- src/packages/space/doc.md | 13 ++++++++++--- src/packages/space/doc.taro.md | 2 +- src/packages/space/doc.zh-TW.md | 2 +- src/packages/swipe/doc.en-US.md | 6 +++--- src/packages/swipe/doc.md | 6 +++--- src/packages/swipe/doc.taro.md | 6 +++--- src/packages/swipe/doc.zh-TW.md | 8 ++++---- src/packages/tabs/doc.en-US.md | 2 +- src/packages/tabs/doc.md | 2 +- src/packages/tabs/doc.taro.md | 2 +- src/packages/tabs/doc.zh-TW.md | 2 +- src/packages/tag/doc.en-US.md | 2 +- src/packages/tag/doc.md | 2 +- src/packages/tag/doc.taro.md | 2 +- src/packages/tag/doc.zh-TW.md | 2 +- 30 files changed, 69 insertions(+), 46 deletions(-) diff --git a/src/packages/button/doc.en-US.md b/src/packages/button/doc.en-US.md index 3ac8b15c0e..593680afb0 100644 --- a/src/packages/button/doc.en-US.md +++ b/src/packages/button/doc.en-US.md @@ -14,7 +14,7 @@ import { Button } from '@nutui/nutui-react'; ### The button type -The button supports six types: 'default', 'primary', 'info', 'warning', 'danger', 'success', which defaults to ' default'. +The button supports six types: 'default', 'primary', 'info', 'warning', 'danger', 'success', which defaults to 'default'. :::demo @@ -41,6 +41,8 @@ export default App; ### Fill button +The button supports four types: 'solid', 'outline', 'dashed', 'none', which defaults to 'solid'. + :::demo ```tsx @@ -142,6 +144,8 @@ export default App; ### Icon button +Set the button icon through the 'icon' property, and provide the 'rightIcon' property to display the icon on the right side. + :::demo ```tsx @@ -286,11 +290,11 @@ export default App; | Property | Description | Type | Default | | --- | --- | --- | --- | -| type | button style | `default` \| `primary` \| `warning` \| `danger` \| `success` | `default` | +| type | button style | `default` \| `primary` \| `warning` \| `danger` \| `success` \| `info` | `default` | | size | button size | `normal` \| `large` \| `small` | `normal` | | shape | button shape | `square` \| `round` | `round` | | color | button color | `string` | `-` | -| fill | fill pattern | `solid` \| `ouline` \| `dashed` \| `none` | `solid` | +| fill | fill pattern | `solid` \| `outline` \| `dashed` \| `none` | `solid` | | disabled | disable the button | `boolean` | `false` | | block | block element | `boolean` | `false` | | icon | icon | `ReactNode` | `-` | diff --git a/src/packages/button/doc.md b/src/packages/button/doc.md index 1869d086fb..ba250e842f 100644 --- a/src/packages/button/doc.md +++ b/src/packages/button/doc.md @@ -41,6 +41,8 @@ export default App; ### 填充模式 +按钮支持 `solid`、 `outline`、 `dashed`、`none`四种类型,默认为 `solid`。 + :::demo ```tsx @@ -63,6 +65,8 @@ export default App; ### 图标按钮 +通过 `icon` 属性来设置按钮图标,并提供`rightIcon`属性使图标在右侧显示。 + :::demo ```tsx @@ -411,11 +415,11 @@ export default App; | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| type | 按钮的样式 | `default` \| `primary` \| `warning` \| `danger` \| `success` | `default` | +| type | 按钮的样式 | `default` \| `primary` \| `warning` \| `danger` \| `success` \| `info` | `default` | | size | 按钮的尺寸 | `normal` \| `large` \| `small` | `normal` | | shape | 按钮的形状 | `square` \| `round` | `round` | | color | 按钮颜色,支持传入 linear-gradient 渐变色 | `string` | `-` | -| fill | 填充模式 | `solid` \| `ouline` \| `dashed` \| `none` | `solid` | +| fill | 填充模式 | `solid` \| `outline` \| `dashed` \| `none` | `solid` | | disabled | 是否禁用按钮 | `boolean` | `false` | | block | 是否为块级元素 | `boolean` | `false` | | icon | 按钮图标 | `ReactNode` | `-` | diff --git a/src/packages/button/doc.taro.md b/src/packages/button/doc.taro.md index 50e6c95249..323c517e0e 100644 --- a/src/packages/button/doc.taro.md +++ b/src/packages/button/doc.taro.md @@ -62,6 +62,8 @@ export default App; ### 填充模式 +按钮支持 `solid`、 `outline`、 `dashed`、`none`四种类型,默认为 `solid`。 + :::demo ```tsx @@ -84,6 +86,8 @@ export default App; ### 图标按钮 +通过 `icon` 属性来设置按钮图标,并提供`rightIcon`属性使图标在右侧显示。 + :::demo ```tsx @@ -432,11 +436,11 @@ export default App; | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| type | 按钮的样式 | `default` \| `primary` \| `warning` \| `danger` \| `success` | `default` | +| type | 按钮的样式 | `default` \| `primary` \| `warning` \| `danger` \| `success` \| `info` | `default` | | size | 按钮的尺寸 | `normal` \| `large` \| `small` | `normal` | | shape | 按钮的形状 | `square` \| `round` | `round` | | color | 按钮颜色,支持传入 linear-gradient 渐变色 | `string` | `-` | -| fill | 填充模式 | `solid` \| `ouline` \| `dashed` \| `none` | `solid` | +| fill | 填充模式 | `solid` \| `outline` \| `dashed` \| `none` | `solid` | | disabled | 是否禁用按钮 | `boolean` | `false` | | block | 是否为块级元素 | `boolean` | `false` | | icon | 按钮图标 | `ReactNode` | `-` | diff --git a/src/packages/button/doc.zh-TW.md b/src/packages/button/doc.zh-TW.md index e8d701a59f..ed413e7dd1 100644 --- a/src/packages/button/doc.zh-TW.md +++ b/src/packages/button/doc.zh-TW.md @@ -41,6 +41,8 @@ export default App; ### 填充模式 +按鈕支援 `solid`、 `outline`、 `dashed`、`none`四種類型,預設為 `solid`。 + :::demo ```tsx @@ -63,6 +65,8 @@ export default App; ### 圖標按鈕 +透過 `icon` 屬性來設定按鈕圖標,並提供`rightIcon`屬性使圖標在右側顯示。 + :::demo ```tsx @@ -411,11 +415,11 @@ export default App; | 屬性 | 說明 | 類型 | 默認值 | | --- | --- | --- | --- | -| type | 按鈕的樣式 | `default` \| `primary` \| `warning` \| `danger` \| `success` | `default` | +| type | 按鈕的樣式 | `default` \| `primary` \| `warning` \| `danger` \| `success` \| `info` | `default` | | size | 按鈕的尺寸 | `normal` \| `large` \| `small` | `normal` | | shape | 按鈕的形狀 | `square` \| `round` | `round` | | color | 按鈕顏色,支持傳入 linear-gradient 漸變色 | `string` | `-` | -| fill | 填充模式 | `solid` \| `ouline` \| `dashed` \| `none` | `solid` | +| fill | 填充模式 | `solid` \| `outline` \| `dashed` \| `none` | `solid` | | disabled | 是否禁用按鈕 | `boolean` | `false` | | block | 是否為塊級元素 | `boolean` | `false` | | icon | 按鈕圖標 | `ReactNode` | `-` | diff --git a/src/packages/infiniteloading/doc.md b/src/packages/infiniteloading/doc.md index 61b17ae7e9..f8732c0871 100644 --- a/src/packages/infiniteloading/doc.md +++ b/src/packages/infiniteloading/doc.md @@ -417,7 +417,7 @@ export default App | threshold | 距离底部多远加载 | `number` | `200` | | capture | 是否使用捕获模式 true 捕获 false 冒泡 | `boolean` | `false` | | target | 获取监听的目标元素 | `string` | `-` | -| loadMoreText | “没有更多数”据展示文案 | `string` | `哎呀,这里是底部了啦` | +| loadMoreText | “没有更多数据”展示文案 | `string` | `哎呀,这里是底部了啦` | | pullRefresh | 是否开启下拉刷新 | `boolean` | `false` | | pullingText | 下拉刷新提示文案 | `ReactNode` | `松手刷新` | | loadingText | 上拉加载提示文案 | `ReactNode` | `刷新中` | diff --git a/src/packages/infiniteloading/doc.taro.md b/src/packages/infiniteloading/doc.taro.md index 7d299b5e5c..84ef2cc5f3 100644 --- a/src/packages/infiniteloading/doc.taro.md +++ b/src/packages/infiniteloading/doc.taro.md @@ -177,7 +177,7 @@ export default App | hasMore | 是否还有更多数据 | `boolean` | `true` | | threshold | 距离底部多远加载 | `number` | `200` | | target | 获取监听的目标元素 | `string` | `-` | -| loadMoreText | “没有更多数”据展示文案 | `string` | `哎呀,这里是底部了啦` | +| loadMoreText | “没有更多数据”展示文案 | `string` | `哎呀,这里是底部了啦` | | pullRefresh | 是否开启下拉刷新 | `boolean` | `false` | | pullingText | 下拉刷新提示文案 | `ReactNode` | `松手刷新` | | loadingText | 上拉加载提示文案 | `ReactNode` | `刷新中` | diff --git a/src/packages/infiniteloading/doc.zh-TW.md b/src/packages/infiniteloading/doc.zh-TW.md index 775b4a6789..2d5a6f767d 100644 --- a/src/packages/infiniteloading/doc.zh-TW.md +++ b/src/packages/infiniteloading/doc.zh-TW.md @@ -360,7 +360,7 @@ export default App | threshold | 距離底部多遠加載 | `number` | `200` | | capture | 是否使用捕獲模式 true 捕獲 false 冒泡 | `boolean` | `false` | | target | 獲取監聽的目標元素 | `string` | `-` | -| loadMoreText | “沒有更多數”據展示文案 | `string` | `哎呀,這裏是底部了啦` | +| loadMoreText | “沒有更多數據”展示文案 | `string` | `哎呀,這裏是底部了啦` | | pullRefresh | 是否開啟下拉刷新 | `boolean` | `false` | | pullingText | 下拉刷新提示文案 | `ReactNode` | `鬆手刷新` | | loadingText | 上拉加載提示文案 | `ReactNode` | `加載中...` | diff --git a/src/packages/radio/doc.en-US.md b/src/packages/radio/doc.en-US.md index 4b4edc9237..1df83cd61d 100644 --- a/src/packages/radio/doc.en-US.md +++ b/src/packages/radio/doc.en-US.md @@ -244,7 +244,7 @@ export default RadioGroupOptions; | labelPosition | The position of the text | `left` \| `right` | `right` | | icon | icon name, before selection (it is recommended to modify it together with `activeIcon`) | `ReactNode` | `'CheckNormal'` | | activeIcon | icon name, after selected (it is recommended to modify it together with `icon`) | `ReactNode` | `'CheckChecked'` | -| shape | shape | `button` \| `round` \| `round` | `round` | +| shape | shape | `button` \| `round` | `round` | | onChange | Triggered when the checked state changes | `(checked: boolean) => void` | `-` | ## Radio.Group diff --git a/src/packages/radio/doc.md b/src/packages/radio/doc.md index a46037f9e6..5e54e9a1d1 100644 --- a/src/packages/radio/doc.md +++ b/src/packages/radio/doc.md @@ -244,7 +244,7 @@ export default RadioGroupOptions; | labelPosition | 文本所在的位置 | `left` \| `right` | `right` | | icon | 图标名称,选中前(建议和`activeIcon`一起修改) | `ReactNode` | `'CheckNormal'` | | activeIcon | 图标名称,选中后(建议和`icon`一起修改) | `ReactNode` | `'CheckChecked'` | -| shape | 形状 | `button` \| `round` \| `round` |`round` | +| shape | 形状 | `button` \| `round` |`round` | | onChange | 选中态变化时触发 | `(checked: boolean) => void` | `-` | ## Radio.Group diff --git a/src/packages/radio/doc.taro.md b/src/packages/radio/doc.taro.md index 50fa3bc212..667392003b 100644 --- a/src/packages/radio/doc.taro.md +++ b/src/packages/radio/doc.taro.md @@ -244,7 +244,7 @@ export default RadioGroupOptions; | labelPosition | 文本所在的位置 | `left` \| `right` | `right` | | icon | 图标名称,选中前(建议和`activeIcon`一起修改) | `ReactNode` | `'CheckNormal'` | | activeIcon | 图标名称,选中后(建议和`icon`一起修改) | `ReactNode` | `'CheckChecked'` | -| shape | 形状 | `button` \| `round` \| `round` |`round` | +| shape | 形状 | `button` \| `round` |`round` | | onChange | 选中态变化时触发 | `(checked: boolean) => void` | `-` | ## Radio.Group diff --git a/src/packages/radio/doc.zh-TW.md b/src/packages/radio/doc.zh-TW.md index dc96676e29..03982673d7 100644 --- a/src/packages/radio/doc.zh-TW.md +++ b/src/packages/radio/doc.zh-TW.md @@ -244,7 +244,7 @@ export default RadioGroupOptions; | labelPosition | 文本所在的位置 | `left` \| `right` | `right` | | icon | 圖標名稱,選中前(建議和`activeIcon`一起修改) | `ReactNode` | `'CheckNormal'` | | activeIcon | 圖標名稱,選中後(建議和`icon`一起修改) | `ReactNode` | `'CheckChecked'` | -| shape | 形狀 | `button` \| `round` \| `round` |`round` | +| shape | 形狀 | `button` \| `round` |`round` | | onChange | 選中態變化時觸發 | `(checked: boolean) => void` | `-` | ## Radio.Group diff --git a/src/packages/skeleton/doc.md b/src/packages/skeleton/doc.md index 2b51ed1220..e377ca0f31 100644 --- a/src/packages/skeleton/doc.md +++ b/src/packages/skeleton/doc.md @@ -141,7 +141,7 @@ export default App; | avatar | 是否显示头像 | `boolean` | `false` | | avatarShape | 头像形状:正方形/圆形 | `string` | `round` | | avatarSize | 头像大小 | `string` | `50px` | -| rows | 设置段落行数 | `string` | `1` | +| rows | 设置段落行数 | `number` | `1` | | title | 是否显示段落标题 | `boolean` | `true` | ## 主题定制 diff --git a/src/packages/skeleton/doc.taro.md b/src/packages/skeleton/doc.taro.md index f6bd776b9e..9887da8254 100644 --- a/src/packages/skeleton/doc.taro.md +++ b/src/packages/skeleton/doc.taro.md @@ -141,7 +141,7 @@ export default App; | avatar | 是否显示头像 | `boolean` | `false` | | avatarShape | 头像形状:正方形/圆形 | `string` | `round` | | avatarSize | 头像大小 | `string` | `50px` | -| rows | 设置段落行数 | `string` | `1` | +| rows | 设置段落行数 | `number` | `1` | | title | 是否显示段落标题 | `boolean` | `true` | ## 主题定制 diff --git a/src/packages/skeleton/doc.zh-TW.md b/src/packages/skeleton/doc.zh-TW.md index 2ed9ecd7db..c4b9505568 100644 --- a/src/packages/skeleton/doc.zh-TW.md +++ b/src/packages/skeleton/doc.zh-TW.md @@ -141,7 +141,7 @@ export default App; | avatar | 是否顯示頭像 | `boolean` | `false` | | avatarShape | 頭像形狀:正方形/圓形 | `string` | `round` | | avatarSize | 頭像大小 | `string` | `50px` | -| rows | 設置段落行數 | `string` | `1` | +| rows | 設置段落行數 | `number` | `1` | | title | 是否顯示段落標題 | `boolean` | `true` | ## 主題定制 diff --git a/src/packages/space/doc.en-US.md b/src/packages/space/doc.en-US.md index c1690e8a83..0fc9608618 100644 --- a/src/packages/space/doc.en-US.md +++ b/src/packages/space/doc.en-US.md @@ -115,7 +115,7 @@ export default App; | direction | space direction | `vertical \| horizontal` | `horizontal` | | align | space align | `start \| end \|center \| baseline` | `-` | | justify | space justify | `start \| end \| center \| between \| around \| evenly \| stretch` | `-` | -| wrap | space wrap,Only valid when horizontal | `boolean / false` | `-` | +| wrap | space wrap,Only valid when horizontal | `boolean` | `false` | ## Theming diff --git a/src/packages/space/doc.md b/src/packages/space/doc.md index 2fd62f95af..8253ac0b72 100644 --- a/src/packages/space/doc.md +++ b/src/packages/space/doc.md @@ -33,6 +33,7 @@ import { Space, Button } from '@nutui/nutui-react'; export default App; ``` + ::: ### 换行 @@ -58,7 +59,9 @@ const App = () => { export default App; ``` + ::: + ### 垂直 :::demo @@ -79,7 +82,9 @@ const App = () => { export default App; ``` + ::: + ### 间距大小 :::demo @@ -106,17 +111,19 @@ const App = () => { export default App; ``` + ::: + ## Space ### Props | 属性 | 说明 | 类型 | 默认值 | | --- |--------------------------|---------------------------------------------------------------------|--------------------------------| -| direction | 间距方向 | ` vertical \| horizontal` | horizontal | +| direction | 间距方向 | `vertical \| horizontal` | `horizontal` | | align | 交叉轴对齐方式 | `start \| end \|center \| baseline` | `-` | | justify | 主轴对齐方式 | `start \| end \| center \| between \| around \| evenly \| stretch` | `-` | -| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean / false` | `-` | +| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean` | `false` | ## 主题定制 @@ -126,4 +133,4 @@ export default App; | 名称 | 默认值 | 描述 | | --- | --- | --- | -| \--nutui-space-gap | `8px` | 间距大小 | \ No newline at end of file +| \--nutui-space-gap | `8px` | 间距大小 | diff --git a/src/packages/space/doc.taro.md b/src/packages/space/doc.taro.md index 63c63863e4..caaa2475cc 100644 --- a/src/packages/space/doc.taro.md +++ b/src/packages/space/doc.taro.md @@ -115,7 +115,7 @@ export default App; | direction | 间距方向 | `'vertical'| 'horizontal'` | `'horizontal'` | | align | 交叉轴对齐方式 | `'start'|'end'|'center'|'baseline'` | `-` | | justify | 主轴对齐方式 | `'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch'` | `-` | -| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean / false` | `-` | +| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean` | `false` | ## 主题定制 diff --git a/src/packages/space/doc.zh-TW.md b/src/packages/space/doc.zh-TW.md index 9c912b1305..e5f0b2a676 100644 --- a/src/packages/space/doc.zh-TW.md +++ b/src/packages/space/doc.zh-TW.md @@ -115,7 +115,7 @@ export default App; | direction | 間距方嚮 | `'vertical'| 'horizontal'` | `'horizontal'` | | align | 交叉軸對齊方式 | `'start'|'end'|'center'|'baseline'` | `-` | | justify | 主軸對齊方式 | `'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch'` | `-` | -| wrap | 是否自動換行,僅在 horizontal 時有效 | `boolean / false` | `-` | +| wrap | 是否自動換行,僅在 horizontal 時有效 | `boolean` | `false` | ## 主題定制 diff --git a/src/packages/swipe/doc.en-US.md b/src/packages/swipe/doc.en-US.md index cd143cbd4e..34d7c996cb 100644 --- a/src/packages/swipe/doc.en-US.md +++ b/src/packages/swipe/doc.en-US.md @@ -275,9 +275,9 @@ export default App; | onOpen | open the cell sidebar | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-`| | onClose | collapse the cell sidebar | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-`| | onActionClick | triggered when clicking on the left or right | `(event: MouseEvent, position: 'left' \|'right') => void` | `-`| -| onTouchStart | onTouchStart | `(event: TouchEvent) => void` | `-`| -| onTouchMove | onTouchMove | `(event: TouchEvent) => void` | `-`| -| onTouchEnd | onTouchEnd | `(event: TouchEvent) => void` | `-`| +| onTouchStart | triggered when starting to touch | `(event: TouchEvent) => void` | `-`| +| onTouchMove | triggered when starting to move | `(event: TouchEvent) => void` | `-`| +| onTouchEnd | triggered when finishing to touch | `(event: TouchEvent) => void` | `-`| ### Ref diff --git a/src/packages/swipe/doc.md b/src/packages/swipe/doc.md index bad3a8dae0..806a3f89d1 100644 --- a/src/packages/swipe/doc.md +++ b/src/packages/swipe/doc.md @@ -273,9 +273,9 @@ export default App; | onOpen | 打开单元格侧边栏 | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-` | | onClose | 收起单元格侧边栏 | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-` | | onActionClick | 点击左侧或者右侧时触发 | `(event: MouseEvent, position: 'left' \| 'right') => void` | `-` | -| onTouchStart | onTouchStart | `(event: TouchEvent) => void` | `-` | -| onTouchMove | onTouchMove | `(event: TouchEvent) => void` | `-` | -| onTouchEnd | onTouchEnd | `(event: TouchEvent) => void` | `-` | +| onTouchStart | 开始触碰时触发 | `(event: TouchEvent) => void` | `-` | +| onTouchMove | 滑动时触发 | `(event: TouchEvent) => void` | `-` | +| onTouchEnd | 结束触碰时触发 | `(event: TouchEvent) => void` | `-` | ### Ref diff --git a/src/packages/swipe/doc.taro.md b/src/packages/swipe/doc.taro.md index 6b62fe1f9c..23ea34d982 100644 --- a/src/packages/swipe/doc.taro.md +++ b/src/packages/swipe/doc.taro.md @@ -316,9 +316,9 @@ export default App; | onOpen | 打开单元格侧边栏 | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-` | | onClose | 收起单元格侧边栏 | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-` | | onActionClick | 点击左侧或者右侧时触发 | `(event: MouseEvent, position: 'left' \|'right') => void` | `-` | -| onTouchStart | onTouchStart | `(event: TouchEvent) => void` | `-` | -| onTouchMove | onTouchMove | `(event: TouchEvent) => void` | `-` | -| onTouchEnd | onTouchEnd | `(event: TouchEvent) => void` | `-` | +| onTouchStart | 开始触碰时触发 | `(event: TouchEvent) => void` | `-` | +| onTouchMove | 滑动时触发 | `(event: TouchEvent) => void` | `-` | +| onTouchEnd | 结束触碰时触发 | `(event: TouchEvent) => void` | `-` | ### Ref diff --git a/src/packages/swipe/doc.zh-TW.md b/src/packages/swipe/doc.zh-TW.md index d0b7d06326..3c060724dc 100644 --- a/src/packages/swipe/doc.zh-TW.md +++ b/src/packages/swipe/doc.zh-TW.md @@ -273,13 +273,13 @@ export default App; | onOpen | 打開單元格側邊欄 | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-` | | onClose | 收起單元格側邊欄 | `(name, position): { name: string \| number, position: 'left' \| 'right' } => void` | `-` | | onActionClick | 點擊左側或者右側時觸發 | `(event: MouseEvent, position: 'left' \| 'right') => void` | `-` | -| onTouchStart | onTouchStart | `(event: TouchEvent) => void` | `-` | -| onTouchMove | onTouchMove | `(event: TouchEvent) => void` | `-` | -| onTouchEnd | onTouchEnd | `(event: TouchEvent) => void` | `-` | +| onTouchStart | 開始觸碰時觸發 | `(event: TouchEvent) => void` | `-` | +| onTouchMove | 滑動時觸發 | `(event: TouchEvent) => void` | `-` | +| onTouchEnd | 結束觸碰時觸發 | `(event: TouchEvent) => void` | `-` | ### Ref | 屬性 | 說明 | 回調參數 | | --- | --- | --- | | open | 打開單元格側邊欄,`side`參數默認為`right` | `(side?: 'left' \| 'right') => void` | -| close | 收起單元格側邊欄 | `() => void` | \ No newline at end of file +| close | 收起單元格側邊欄 | `() => void` | diff --git a/src/packages/tabs/doc.en-US.md b/src/packages/tabs/doc.en-US.md index 6a123ff50b..3623ace615 100644 --- a/src/packages/tabs/doc.en-US.md +++ b/src/packages/tabs/doc.en-US.md @@ -633,7 +633,7 @@ export default App; | activeType | Select the bottom display style Optional values `line`、`smile`、`simple`、`card`、`button`、`divider` | `line` \| `smile` \| `simple` \| `card` \| `button`\| `divider` | `line` | | duration | Switch animation duration, unit ms 0 means no animation | `number` \| `string` | `300` | | title | custom navigation area | `() => JSX.Element[]` | `-` | -| align | title left alignment | `left` \| `right` | `-` | +| align | title alignment | `left` \| `right` | `-` | | autoHeight | Auto height. When set to true, nut-tabs and nut-tabs\_\_content will change with the height of the current nut-tabpane. | `boolean` | `false` | | tabStyle | tab bar style | `CSSProperties` | `{}` | | onClick | Triggered when the label is clicked | `(index: string \| number) => void` | `-` | diff --git a/src/packages/tabs/doc.md b/src/packages/tabs/doc.md index c3c541c9b0..2b2f7d246b 100644 --- a/src/packages/tabs/doc.md +++ b/src/packages/tabs/doc.md @@ -633,7 +633,7 @@ export default App; | activeType | 选中底部展示样式 可选值 `line`、`smile`、`simple`、`card`、`button`、`divider` | `line` \| `smile` \| `simple` \| `card` \| `button`\| `divider` | `line` | | duration | 切换动画时长,单位 ms 0 代表无动画 | `number` \| `string` | `300` | | title | 自定义导航区域 | `() => JSX.Element[]` | `-` | -| align | 标题左对齐 | `left` \| `right` | `-` | +| align | 标题对齐方式 | `left` \| `right` | `-` | | autoHeight | 自动高度。设置为 true 时,nut-tabs 和 nut-tabs\_\_content 会随着当前 nut-tabpane 的高度而发生变化。 | `boolean` | `false` | | tabStyle | 标签栏样式 | `CSSProperties` | `{}` | | onClick | 点击标签时触发 | `(index: string \| number) => void` | `-` | diff --git a/src/packages/tabs/doc.taro.md b/src/packages/tabs/doc.taro.md index e44acde3ae..5bdc9ca9b9 100644 --- a/src/packages/tabs/doc.taro.md +++ b/src/packages/tabs/doc.taro.md @@ -633,7 +633,7 @@ export default App; | activeType | 选中底部展示样式 可选值 `line`、`smile`、`simple`、`card`、`button`、`divider` | `line` \| `smile` \| `simple` \| `card` \| `button`\| `divider` | `line` | | duration | 切换动画时长,单位 ms 0 代表无动画 | `number` \| `string` | `300` | | title | 自定义导航区域 | `() => JSX.Element[]` | `-` | -| align | 标题左对齐 | `left` \| `right` | `-` | +| align | 标题对齐方式 | `left` \| `right` | `-` | | autoHeight | 自动高度。设置为 true 时,nut-tabs 和 nut-tabs\_\_content 会随着当前 nut-tabpane 的高度而发生变化。 | `boolean` | `false` | | tabStyle | 标签栏样式 | `CSSProperties` | `{}` | | onClick | 点击标签时触发 | `(index: string\| number) => void` | `-` | diff --git a/src/packages/tabs/doc.zh-TW.md b/src/packages/tabs/doc.zh-TW.md index b100cbfcda..b05bfcca0c 100644 --- a/src/packages/tabs/doc.zh-TW.md +++ b/src/packages/tabs/doc.zh-TW.md @@ -633,7 +633,7 @@ export default App; | activeType | 選中底部展示樣式 可選值 `line`、`smile`、`simple`、`card`、`button`、`divider` | `line` \| `smile` \| `simple` \| `card` \| `button`\| `divider` | `line` | | duration | 切換動畫時長,單位 ms 0 代表無動畫 | `number` \| `string` | `300` | | title | 自定義導航區域 | `() => JSX.Element[]` | `-` | -| align | 標題左對齊 | `left` \| `right` | `-` | +| align | 標題對齊方式 | `left` \| `right` | `-` | | autoHeight | 自動高度。設置為 true 時,nut-tabs 和 nut-tabs\_\_content 會隨著當前 nut-tabpane 的高度而發生變化。 | `boolean` | `false` | | tabStyle | 標簽欄樣式 | `CSSProperties` | `{}` | | onClick | 點擊標簽時觸發 | `(index: string \| number) => void` | `-` | diff --git a/src/packages/tag/doc.en-US.md b/src/packages/tag/doc.en-US.md index b7fcbfc372..d2eddb69c2 100644 --- a/src/packages/tag/doc.en-US.md +++ b/src/packages/tag/doc.en-US.md @@ -143,7 +143,7 @@ export default App; | Property | Description | Type | Default | | --- | --- | --- | --- | -| type | Label type | `primary` \| `success` \| `danger` \| `warning` | `default` | +| type | Label type | `primary` \| `default` \| `info` \| `success` \| `danger` \| `warning` | `default` | | background | Label background | `string` | `-` | | color | Text color, priority is higher than the color attribute | `string` | `white` | | plain | Whether it is hollow | `boolean` | `false` | diff --git a/src/packages/tag/doc.md b/src/packages/tag/doc.md index ef70ed06b2..063aebc19c 100644 --- a/src/packages/tag/doc.md +++ b/src/packages/tag/doc.md @@ -96,7 +96,7 @@ export default App; | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| type | 标签类型 | `primary` \| `success` \| `danger` \| `warning` | `default` | +| type | 标签类型 | `primary` \| `default` \| `info` \| `success` \| `danger` \| `warning` | `default` | | background | 标签颜色 | `string` | `-` | | color | 文本颜色,优先级高于color属性 | `string` | `white` | | plain | 是否为空心样式 | `boolean` | `false` | diff --git a/src/packages/tag/doc.taro.md b/src/packages/tag/doc.taro.md index 6f96e3c366..1eb5f805d4 100644 --- a/src/packages/tag/doc.taro.md +++ b/src/packages/tag/doc.taro.md @@ -96,7 +96,7 @@ export default App; | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| type | 标签类型 | `primary` \| `success` \| `danger` \| `warning` | `default` | +| type | 标签类型 | `primary` \| `default` \| `info` \| `success` \| `danger` \| `warning` | `default` | | background | 标签颜色 | `string` | `-` | | color | 文本颜色,优先级高于color属性 | `string` | `white` | | plain | 是否为空心样式 | `boolean` | `false` | diff --git a/src/packages/tag/doc.zh-TW.md b/src/packages/tag/doc.zh-TW.md index 463adaffcd..e688c2e5cf 100644 --- a/src/packages/tag/doc.zh-TW.md +++ b/src/packages/tag/doc.zh-TW.md @@ -96,7 +96,7 @@ export default App; | 屬性 | 說明 | 類型 | 默認值 | | --- | --- | --- | --- | -| type | 標簽類型 | `primary` \| `success` \| `danger` \| `warning` | `default` | +| type | 標簽類型 | `primary` \| `default` \| `info` \| `success` \| `danger` \| `warning` | `default` | | background | 標簽顏色 | `string` | `-` | | color | 文本顏色,優先級高於color屬性 | `string` | `white` | | plain | 是否為空心樣式 | `boolean` | `false` | From 9b4d2d06d5c26c72e531f7a05d3e1acc38adef6a Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:39:09 +0800 Subject: [PATCH 025/275] fix(swiper): fix props of saving image at taro, fix parameter of onChange, update taro version to 3.6.22 (#1847) --- package.json | 10 +- packages/nutui-taro-demo/package.json | 38 +- pnpm-lock.yaml | 882 +++++++----------- src/packages/imagepreview/demo.taro.tsx | 5 +- src/packages/imagepreview/doc.en-US.md | 1 + src/packages/imagepreview/doc.md | 1 + src/packages/imagepreview/doc.taro.md | 1 + src/packages/imagepreview/doc.zh-TW.md | 1 + .../imagepreview/imagepreview.taro.tsx | 3 +- src/packages/imagepreview/imagepreview.tsx | 1 + 10 files changed, 365 insertions(+), 578 deletions(-) diff --git a/package.json b/package.json index 1102924c2a..87fb408ebd 100644 --- a/package.json +++ b/package.json @@ -120,11 +120,11 @@ "@rollup/plugin-commonjs": "^25.0.0", "@rollup/plugin-node-resolve": "15.2.3", "@rollup/plugin-typescript": "^11.1.0", - "@tarojs/components": "3.6.18", - "@tarojs/plugin-platform-alipay": "3.6.18", - "@tarojs/plugin-platform-weapp": "3.6.18", - "@tarojs/react": "3.6.18", - "@tarojs/taro": "3.6.18", + "@tarojs/components": "3.6.22", + "@tarojs/plugin-platform-alipay": "3.6.22", + "@tarojs/plugin-platform-weapp": "3.6.22", + "@tarojs/react": "3.6.22", + "@tarojs/taro": "3.6.22", "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", "@types/jest": "^29.0.0", diff --git a/packages/nutui-taro-demo/package.json b/packages/nutui-taro-demo/package.json index b51f43fb3e..e31ec62c9a 100644 --- a/packages/nutui-taro-demo/package.json +++ b/packages/nutui-taro-demo/package.json @@ -47,23 +47,23 @@ "@babel/runtime": "^7.21.0", "@nutui/touch-emulator": "^1.0.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", - "@tarojs/components": "3.6.18", - "@tarojs/helper": "3.6.18", - "@tarojs/plugin-framework-react": "3.6.18", - "@tarojs/plugin-html": "3.6.18", - "@tarojs/plugin-platform-alipay": "3.6.18", - "@tarojs/plugin-platform-h5": "3.6.18", - "@tarojs/plugin-platform-jd": "3.6.18", - "@tarojs/plugin-platform-qq": "3.6.18", - "@tarojs/plugin-platform-swan": "3.6.18", - "@tarojs/plugin-platform-tt": "3.6.18", - "@tarojs/plugin-platform-weapp": "3.6.18", - "@tarojs/react": "3.6.18", - "@tarojs/router": "3.6.18", - "@tarojs/runtime": "3.6.18", - "@tarojs/shared": "3.6.18", - "@tarojs/taro": "3.6.18", - "@tarojs/taro-h5": "3.6.18", + "@tarojs/components": "3.6.22", + "@tarojs/helper": "3.6.22", + "@tarojs/plugin-framework-react": "3.6.22", + "@tarojs/plugin-html": "3.6.22", + "@tarojs/plugin-platform-alipay": "3.6.22", + "@tarojs/plugin-platform-h5": "3.6.22", + "@tarojs/plugin-platform-jd": "3.6.22", + "@tarojs/plugin-platform-qq": "3.6.22", + "@tarojs/plugin-platform-swan": "3.6.22", + "@tarojs/plugin-platform-tt": "3.6.22", + "@tarojs/plugin-platform-weapp": "3.6.22", + "@tarojs/react": "3.6.22", + "@tarojs/router": "3.6.22", + "@tarojs/runtime": "3.6.22", + "@tarojs/shared": "3.6.22", + "@tarojs/taro": "3.6.22", + "@tarojs/taro-h5": "3.6.22", "babel-plugin-import": "^1.13.6", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -72,8 +72,8 @@ }, "devDependencies": { "@babel/core": "^7.21.4", - "@tarojs/cli": "3.6.18", - "@tarojs/webpack5-runner": "3.6.18", + "@tarojs/cli": "3.6.22", + "@tarojs/webpack5-runner": "3.6.22", "@types/react": "^18.0.35", "@types/react-dom": "^18.0.11", "@types/react-router-dom": "^5.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34e390542c..bac8882017 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,20 +95,20 @@ importers: specifier: ^11.1.0 version: 11.1.5(rollup@4.6.1)(typescript@4.9.5) '@tarojs/components': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) '@tarojs/plugin-platform-alipay': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) '@tarojs/plugin-platform-weapp': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/react': - specifier: 3.6.18 - version: 3.6.18(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(react@18.2.0) '@tarojs/taro': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@testing-library/jest-dom': specifier: ^6.0.0 version: 6.1.5(@types/jest@29.5.11)(jest@29.7.0) @@ -309,7 +309,7 @@ importers: version: 29.1.1(@babel/core@7.23.5)(jest@29.7.0)(typescript@4.9.5) ts-node: specifier: ^10.9.1 - version: 10.9.1(@swc/core@1.3.23)(@types/node@20.10.4)(typescript@4.9.5) + version: 10.9.1(@swc/core@1.3.96)(@types/node@20.10.4)(typescript@4.9.5) turndown: specifier: ^7.1.2 version: 7.1.2 @@ -369,56 +369,56 @@ importers: specifier: ^0.5.10 version: 0.5.11(react-refresh@0.14.0)(webpack@5.89.0) '@tarojs/components': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) '@tarojs/helper': - specifier: 3.6.18 - version: 3.6.18 + specifier: 3.6.22 + version: 3.6.22 '@tarojs/plugin-framework-react': - specifier: 3.6.18 - version: 3.6.18(@pmmmwh/react-refresh-webpack-plugin@0.5.11)(@types/react@18.2.42)(postcss@8.4.32)(react-refresh@0.14.0)(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(@pmmmwh/react-refresh-webpack-plugin@0.5.11)(@types/react@18.2.42)(postcss@8.4.32)(react-refresh@0.14.0)(react@18.2.0) '@tarojs/plugin-html': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/plugin-platform-alipay': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) '@tarojs/plugin-platform-h5': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/plugin-platform-jd': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/plugin-platform-qq': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/plugin-platform-swan': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/plugin-platform-tt': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/plugin-platform-weapp': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/react': - specifier: 3.6.18 - version: 3.6.18(react@18.2.0) + specifier: 3.6.22 + version: 3.6.22(react@18.2.0) '@tarojs/router': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/runtime': - specifier: 3.6.18 - version: 3.6.18 + specifier: 3.6.22 + version: 3.6.22 '@tarojs/shared': - specifier: 3.6.18 - version: 3.6.18 + specifier: 3.6.22 + version: 3.6.22 '@tarojs/taro': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/taro-h5': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) babel-plugin-import: specifier: ^1.13.6 version: 1.13.8 @@ -433,17 +433,17 @@ importers: version: 0.14.0 webpack: specifier: ^5.79.0 - version: 5.89.0(@swc/core@1.3.23) + version: 5.89.0(@swc/core@1.3.96) devDependencies: '@babel/core': specifier: ^7.21.4 version: 7.23.5 '@tarojs/cli': - specifier: 3.6.18 - version: 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + specifier: 3.6.22 + version: 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@tarojs/webpack5-runner': - specifier: 3.6.18 - version: 3.6.18(@babel/core@7.23.5)(@swc/core@1.3.23)(@types/react@18.2.42)(postcss@8.4.32)(prettier@3.1.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5)(webpack@5.89.0) + specifier: 3.6.22 + version: 3.6.22(@babel/core@7.23.5)(@swc/core@1.3.96)(@types/react@18.2.42)(postcss@8.4.32)(prettier@3.1.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5)(webpack@5.89.0) '@types/react': specifier: '18' version: 18.2.42 @@ -2129,7 +2129,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-arm@0.19.8: @@ -2138,7 +2137,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-x64@0.19.8: @@ -2147,7 +2145,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/darwin-arm64@0.19.8: @@ -2156,7 +2153,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/darwin-x64@0.19.8: @@ -2165,7 +2161,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-arm64@0.19.8: @@ -2174,7 +2169,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-x64@0.19.8: @@ -2183,7 +2177,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm64@0.19.8: @@ -2192,7 +2185,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm@0.19.8: @@ -2201,7 +2193,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ia32@0.19.8: @@ -2210,7 +2201,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-loong64@0.14.54: @@ -2219,6 +2209,7 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-loong64@0.19.8: @@ -2227,7 +2218,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-mips64el@0.19.8: @@ -2236,7 +2226,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ppc64@0.19.8: @@ -2245,7 +2234,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-riscv64@0.19.8: @@ -2254,7 +2242,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-s390x@0.19.8: @@ -2263,7 +2250,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-x64@0.19.8: @@ -2272,7 +2258,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/netbsd-x64@0.19.8: @@ -2281,7 +2266,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /@esbuild/openbsd-x64@0.19.8: @@ -2290,7 +2274,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true /@esbuild/sunos-x64@0.19.8: @@ -2299,7 +2282,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /@esbuild/win32-arm64@0.19.8: @@ -2308,7 +2290,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-ia32@0.19.8: @@ -2317,7 +2298,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-x64@0.19.8: @@ -2326,7 +2306,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.41.0): @@ -2989,7 +2968,7 @@ packages: react-refresh: 0.14.0 schema-utils: 3.3.0 source-map: 0.7.4 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) /@pnpm/config.env-replace@1.1.0: resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} @@ -3346,29 +3325,12 @@ packages: engines: {node: '>=12.10.0', npm: '>=6.0.0'} hasBin: true - /@swc/core-darwin-arm64@1.3.23: - resolution: {integrity: sha512-IGOEHmE4aBDX7gQWpanI3A0ni47UcvX7rmcy0H8kE6mm/y7mEMWskvNsYhYzJl4GVZgw38v1/lL/A7MRX6g71A==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - /@swc/core-darwin-arm64@1.3.96: resolution: {integrity: sha512-8hzgXYVd85hfPh6mJ9yrG26rhgzCmcLO0h1TIl8U31hwmTbfZLzRitFQ/kqMJNbIBCwmNH1RU2QcJnL3d7f69A==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] requiresBuild: true - dev: true - optional: true - - /@swc/core-darwin-x64@1.3.23: - resolution: {integrity: sha512-eQSN+JJqx/5Dk2C5uet2l7HifGsDBorQHD3PAVnge5jxl+rXU/zbzX9Un56+uuUB0QYeS4Dyr8cN7NHuIKGxBA==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - requiresBuild: true optional: true /@swc/core-darwin-x64@1.3.96: @@ -3377,15 +3339,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true - optional: true - - /@swc/core-linux-arm-gnueabihf@1.3.23: - resolution: {integrity: sha512-zxYvggbw6R/sTNey0qgsigFMY59DYepm1+JNojxOKjbnvxmgyeIa5sPdu/5gLj0TtJOiWvSGrpMPNUIVreUSGA==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - requiresBuild: true optional: true /@swc/core-linux-arm-gnueabihf@1.3.96: @@ -3394,16 +3347,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true - optional: true - - /@swc/core-linux-arm64-gnu@1.3.23: - resolution: {integrity: sha512-l8UWhcNvZ6RzNZBBToMYuKYijF0h7mbw2RuFV5rpCYF/k/Wh85PaDHPQIQ6qjMHJsIBHYXUt0HLAP+fiAfBiDw==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - libc: [glibc] - requiresBuild: true optional: true /@swc/core-linux-arm64-gnu@1.3.96: @@ -3413,16 +3356,6 @@ packages: os: [linux] libc: [glibc] requiresBuild: true - dev: true - optional: true - - /@swc/core-linux-arm64-musl@1.3.23: - resolution: {integrity: sha512-TZDPp1wUE1ynVyY0vwIToyOULKEQ91H49R+p6Iu/2YY+UQQwUamhX0Gp8O85RT+j72/iHyhbQkz7yRg6v+GB5A==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - libc: [musl] - requiresBuild: true optional: true /@swc/core-linux-arm64-musl@1.3.96: @@ -3432,16 +3365,6 @@ packages: os: [linux] libc: [musl] requiresBuild: true - dev: true - optional: true - - /@swc/core-linux-x64-gnu@1.3.23: - resolution: {integrity: sha512-rKqWnOmUyQfoKZuuXs/S0RNobN+kcUyMtwoCdRdCNqOlk1XZRCMpjGc9Aqn73K3xlZ6JXX6oLrXKn375b2dydw==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - libc: [glibc] - requiresBuild: true optional: true /@swc/core-linux-x64-gnu@1.3.96: @@ -3451,16 +3374,6 @@ packages: os: [linux] libc: [glibc] requiresBuild: true - dev: true - optional: true - - /@swc/core-linux-x64-musl@1.3.23: - resolution: {integrity: sha512-1MK9eocIhuIr/+yUKnTNHpYovMQvfKTJQbU4UMfQLg2qyCGKAvO+jOy5JIGR9x04MWqz9U3EHHS/7Id35ekhFQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - libc: [musl] - requiresBuild: true optional: true /@swc/core-linux-x64-musl@1.3.96: @@ -3470,15 +3383,6 @@ packages: os: [linux] libc: [musl] requiresBuild: true - dev: true - optional: true - - /@swc/core-win32-arm64-msvc@1.3.23: - resolution: {integrity: sha512-3nmdugj0SJIGWeCJBhvPWIfnE2Ax8H2KZsJfcaWmWg0SDh19aAt48Ncyd8WHHBandJmVm2fSjaANSjp+cS2S9A==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - requiresBuild: true optional: true /@swc/core-win32-arm64-msvc@1.3.96: @@ -3487,15 +3391,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true - optional: true - - /@swc/core-win32-ia32-msvc@1.3.23: - resolution: {integrity: sha512-2AlGRhys1BsfLjXyWOd+5J/Ko2kkVQVuy3ZR8OBGy7XI54p0PpepabloYI9irr+4bi9vtyxoc5rS21PmJxB83Q==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - requiresBuild: true optional: true /@swc/core-win32-ia32-msvc@1.3.96: @@ -3504,15 +3399,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true - optional: true - - /@swc/core-win32-x64-msvc@1.3.23: - resolution: {integrity: sha512-qYKP8sIM7VVLuDb5BkRBoHy28OHZWrUhPTO7WgpErhVVM9wnzmMi/Jgg8SyfMy6oheBjO0QiwWbXONxBwByjnQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - requiresBuild: true optional: true /@swc/core-win32-x64-msvc@1.3.96: @@ -3521,26 +3407,8 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true - /@swc/core@1.3.23: - resolution: {integrity: sha512-Aa7yw5+7ErOxr+G0J1eU2hkb9nEMSdt1Ye3isdAgg9mrsPuttk+cfLp6nP/Lux/VUnu5k4eOxeTy9UhjJhRAFw==} - engines: {node: '>=10'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@swc/core-darwin-arm64': 1.3.23 - '@swc/core-darwin-x64': 1.3.23 - '@swc/core-linux-arm-gnueabihf': 1.3.23 - '@swc/core-linux-arm64-gnu': 1.3.23 - '@swc/core-linux-arm64-musl': 1.3.23 - '@swc/core-linux-x64-gnu': 1.3.23 - '@swc/core-linux-x64-musl': 1.3.23 - '@swc/core-win32-arm64-msvc': 1.3.23 - '@swc/core-win32-ia32-msvc': 1.3.23 - '@swc/core-win32-x64-msvc': 1.3.23 - /@swc/core@1.3.96: resolution: {integrity: sha512-zwE3TLgoZwJfQygdv2SdCK9mRLYluwDOM53I+dT6Z5ZvrgVENmY3txvWDvduzkV+/8IuvrRbVezMpxcojadRdQ==} engines: {node: '>=10'} @@ -3564,22 +3432,9 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.96 '@swc/core-win32-ia32-msvc': 1.3.96 '@swc/core-win32-x64-msvc': 1.3.96 - dev: true /@swc/counter@0.1.2: resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} - dev: true - - /@swc/register@0.1.10(@swc/core@1.3.23): - resolution: {integrity: sha512-6STwH/q4dc3pitXLVkV7sP0Hiy+zBsU2wOF1aXpXR95pnH3RYHKIsDC+gvesfyB7jxNT9OOZgcqOp9RPxVTx9A==} - hasBin: true - peerDependencies: - '@swc/core': ^1.0.46 - dependencies: - '@swc/core': 1.3.23 - lodash.clonedeep: 4.5.0 - pirates: 4.0.6 - source-map-support: 0.5.21 /@swc/register@0.1.10(@swc/core@1.3.96): resolution: {integrity: sha512-6STwH/q4dc3pitXLVkV7sP0Hiy+zBsU2wOF1aXpXR95pnH3RYHKIsDC+gvesfyB7jxNT9OOZgcqOp9RPxVTx9A==} @@ -3591,11 +3446,9 @@ packages: lodash.clonedeep: 4.5.0 pirates: 4.0.6 source-map-support: 0.5.21 - dev: true /@swc/types@0.1.5: resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} - dev: true /@szmarczak/http-timer@1.1.2: resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==} @@ -3611,22 +3464,69 @@ packages: defer-to-connect: 2.0.1 dev: true - /@tarojs/api@3.6.18: - resolution: {integrity: sha512-deQga4zzgOpZeXoqKLWU4Gn1qrLMnK2y1uOKEXz50ZgR9Uw/Qh2V49lxRY5w0YzYpqaZ29lh0KIxW8jXDiXM0w==} + /@tarojs/api@3.6.22: + resolution: {integrity: sha512-OHNZv7f+PidW5kHyxWKtPmiMLhB6MXMWAYDqHZv+anXVdxDJZEkO72F1E1QVCklX7xPlSo3rH6tj1rNxeQyZQA==} dependencies: '@babel/runtime': 7.23.5 - '@tarojs/runtime': 3.6.18 - '@tarojs/shared': 3.6.18 + '@tarojs/runtime': 3.6.22 + '@tarojs/shared': 3.6.22 - /@tarojs/cli@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-Vm73dap6hdH93xP7hZva6QtdrkOUuz6ciFArUfx1S9hSHQRGsLuKA19qHSDqAc3wFBlVzsB45A7VraLFTVmO8w==} + /@tarojs/binding-darwin-arm64@3.6.22: + resolution: {integrity: sha512-gr+jOjMKesWfsTY0nSvXr0QMyHxiuck+BtRNp9QJLXYmF6jQBNyMt1R/nqiHG6glCkk6RzUhS9Rze5vi3Lkp2Q==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@tarojs/binding-darwin-x64@3.6.22: + resolution: {integrity: sha512-a/n+b9MjRM3XDAS/DQiN7qi7tRr5d5Oj9h63oDDXVgGTpIgo1GntSdZX4whX4B77zqAKN/p3V1liWHZr0JkGGg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@tarojs/binding-linux-x64-gnu@3.6.22: + resolution: {integrity: sha512-ylm5rW+OO5m82+Wt99gtsrh5dTPGhQwzuUMVMZn/VS486uM9oVi6YjgoxVruyllmJbWtHaWd+j9VYNSDsJZgEA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + requiresBuild: true + dev: true + optional: true + + /@tarojs/binding-win32-x64-msvc@3.6.22: + resolution: {integrity: sha512-bqhQW0PfwR2ERsjcCclKbiE22T2OSJPG9u19WQMI93KcogM5weAB2VKmxBdjN1NXtqKjK3pjwofSHQd8Y2LAGA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@tarojs/binding@3.6.22: + resolution: {integrity: sha512-q6LVE1XBrUrUw4vqS8hQxhAA5hX890Dlk2TxRo3jDpwNr2qC0/LqUrBBSfqpZtLsyuA1UGMnckzTTYXYABlotg==} + optionalDependencies: + '@tarojs/binding-darwin-arm64': 3.6.22 + '@tarojs/binding-darwin-x64': 3.6.22 + '@tarojs/binding-linux-x64-gnu': 3.6.22 + '@tarojs/binding-win32-x64-msvc': 3.6.22 + dev: true + + /@tarojs/cli@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-HwhYCcn/bWBbfUXL2ep1ICqXir7EsiXJuREJEKoWZ7LgO9qh2ZWf7GzOHswhClpKjyYKLMiHtmLPfx9hIS4FKQ==} engines: {node: '>=12'} hasBin: true dependencies: - '@tarojs/helper': 3.6.18 + '@tarojs/binding': 3.6.22 + '@tarojs/helper': 3.6.22 '@tarojs/plugin-doctor': 0.0.11 - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 adm-zip: 0.4.16 cli-highlight: 2.1.11 download-git-repo: 2.0.0 @@ -3634,11 +3534,8 @@ packages: eslint: 8.55.0 glob: 7.2.3 inquirer: 8.2.6 - joi: 17.11.0 latest-version: 5.1.0 lodash: 4.17.21 - mem-fs: 2.3.0 - mem-fs-editor: 9.7.0(mem-fs@2.3.0) minimist: 1.2.8 npm-check: 6.0.1 ora: 5.4.1 @@ -3647,6 +3544,7 @@ packages: validate-npm-package-name: 5.0.0 xml2js: 0.5.0 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -3655,8 +3553,8 @@ packages: - vue dev: true - /@tarojs/components-advanced@3.6.18(@types/react@18.2.42)(react@18.2.0): - resolution: {integrity: sha512-6TOPjwe/DhjBSxOzXyVQerovJ2Wn7vMXHWZAeo2BxFFa8DCyeQBs75eoruQEHrBajdkMRJre+4CGGTgsHhPrHg==} + /@tarojs/components-advanced@3.6.22(@types/react@18.2.42)(react@18.2.0): + resolution: {integrity: sha512-O5ocw40AeeTwlRSV4H5UOWMPALEvjdE5Y297zcnWYJvuBId6Si6hd2hjdQ2HYXLzE0+dVrU8dCtM0WZScvqb6Q==} peerDependencies: react: '>=17' vue: '*' @@ -3666,10 +3564,10 @@ packages: vue: optional: true dependencies: - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/runtime': 3.6.18 - '@tarojs/shared': 3.6.18 - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/runtime': 3.6.22 + '@tarojs/shared': 3.6.22 + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) classnames: 2.3.2 csstype: 3.1.2 memoize-one: 6.0.0 @@ -3681,12 +3579,12 @@ packages: - '@types/webpack' - '@types/webpack-dev-server' - /@tarojs/components-react@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-3QPGpxXd6jYfxh8GgaIYxkzfYF49Aqd7c445+AJROKEc6BECGCbMI2ivEyUtdsyCKLI0JcyohrTn0TNlUc6Vhw==} + /@tarojs/components-react@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-18HOKIb6ek+HCa1bcsTFhaOqNUy4kcpkHSy0eDO068eeMy3MT04pGIm/y/cUOrXyFpU4UyCthi0iYAaOpTwNvw==} dependencies: '@babel/runtime': 7.23.5 - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) classnames: 2.3.2 intersection-observer: 0.7.0 resolve-pathname: 3.0.0 @@ -3701,8 +3599,8 @@ packages: - vue dev: false - /@tarojs/components@3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0): - resolution: {integrity: sha512-qygrUZWPK0oy8/bZEEW/W0tteoGfdIf7HngxBIG8gdkw607+MYK3ft582KnAbKby7WGYbk9BUciBb5v1VlSAwA==} + /@tarojs/components@3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0): + resolution: {integrity: sha512-U7HJSdS81PX9K3iG173NLt1zQdWluudCHpSIMcvTnGnTXJt6HqasXYJ8P8x0udQ6EZJtGL0ySNyIPFF9tdItAQ==} peerDependencies: '@types/react': '*' '@types/react-native': '*' @@ -3716,9 +3614,9 @@ packages: optional: true dependencies: '@stencil/core': 2.22.3 - '@tarojs/components-advanced': 3.6.18(@types/react@18.2.42)(react@18.2.0) - '@tarojs/router': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/components-advanced': 3.6.22(@types/react@18.2.42)(react@18.2.0) + '@tarojs/router': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) '@types/react': 18.2.42 classnames: 2.3.2 hls.js: 1.4.13 @@ -3732,8 +3630,8 @@ packages: - postcss - react - /@tarojs/helper@3.6.18: - resolution: {integrity: sha512-nq74W65q+Fa4FKqeBCZ0CUOjGsv8IQ/H3x5iI8SWm1bbfVXvIy/5j5EIJYFbXEo0BHYdaq3vs+l7rSrb1LUjbg==} + /@tarojs/helper@3.6.20: + resolution: {integrity: sha512-sKsvv//FR2rfKfg2P+geMc2f69kSSgLpSr3e0B1CnGdzfI9CROVt2SKGo4jcrDVpDuRMbitfX4HsaMalOdzRfQ==} dependencies: '@babel/core': 7.23.5 '@babel/parser': 7.23.5 @@ -3745,8 +3643,8 @@ packages: '@babel/register': 7.22.15(@babel/core@7.23.5) '@babel/runtime': 7.23.5 '@babel/traverse': 7.23.5 - '@swc/core': 1.3.23 - '@swc/register': 0.1.10(@swc/core@1.3.23) + '@swc/core': 1.3.96 + '@swc/register': 0.1.10(@swc/core@1.3.96) ansi-escapes: 4.3.2 chalk: 3.0.0 chokidar: 3.5.3 @@ -3754,7 +3652,7 @@ packages: debug: 4.3.4 dotenv: 16.3.1 dotenv-expand: 9.0.0 - esbuild: 0.14.54 + esbuild: 0.19.8 find-yarn-workspace-root: 2.0.0 fs-extra: 8.1.0 lodash: 4.17.21 @@ -3763,10 +3661,12 @@ packages: supports-hyperlinks: 2.3.0 yauzl: 2.10.0 transitivePeerDependencies: + - '@swc/helpers' - supports-color + dev: true - /@tarojs/helper@3.6.20: - resolution: {integrity: sha512-sKsvv//FR2rfKfg2P+geMc2f69kSSgLpSr3e0B1CnGdzfI9CROVt2SKGo4jcrDVpDuRMbitfX4HsaMalOdzRfQ==} + /@tarojs/helper@3.6.22: + resolution: {integrity: sha512-u2hnXcsg4gwF9JKQU4PWwVffUX52CL+7rfJwVZYUm3lgJ4xvbz3i6mYSBEnj+L6VquHnhr/jjPKAbE1ne2dQTA==} dependencies: '@babel/core': 7.23.5 '@babel/parser': 7.23.5 @@ -3798,7 +3698,6 @@ packages: transitivePeerDependencies: - '@swc/helpers' - supports-color - dev: true /@tarojs/plugin-doctor-darwin-arm64@0.0.11: resolution: {integrity: sha512-H3C0TQD7k9YalSR2kgrVEvP1TfhSeRQDQQXhSurLStNuTqhrk8JSzxbxYC/Of5edM/uu+5xOzT0YfMV2LKG5UA==} @@ -3924,8 +3823,8 @@ packages: - supports-color dev: true - /@tarojs/plugin-framework-react@3.6.18(@pmmmwh/react-refresh-webpack-plugin@0.5.11)(@types/react@18.2.42)(postcss@8.4.32)(react-refresh@0.14.0)(react@18.2.0): - resolution: {integrity: sha512-SBmyfYDu4Ehj7kXX4LdrD/EZO3qPqEo0usiatj6KEMFv7VR/LxUUvyHs2hkdVpFYniVNBeHskuob8WuE5aLPqw==} + /@tarojs/plugin-framework-react@3.6.22(@pmmmwh/react-refresh-webpack-plugin@0.5.11)(@types/react@18.2.42)(postcss@8.4.32)(react-refresh@0.14.0)(react@18.2.0): + resolution: {integrity: sha512-C0zisUrKTVfF305sFOZjQi6Yxh7UYhhiETv9eRuLwVQvm5ZCkscBcqQC/hFygTT9m6Ex7wqaCpCpRh6+CASw2Q==} peerDependencies: '@pmmmwh/react-refresh-webpack-plugin': '*' '@prefresh/webpack': '*' @@ -3945,16 +3844,17 @@ packages: optional: true dependencies: '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(react-refresh@0.14.0)(webpack@5.89.0) - '@tarojs/helper': 3.6.18 - '@tarojs/runtime': 3.6.18 - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/helper': 3.6.22 + '@tarojs/runtime': 3.6.22 + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 acorn: 8.11.2 acorn-walk: 8.3.1 lodash: 4.17.21 react: 18.2.0 react-refresh: 0.14.0 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -3963,17 +3863,18 @@ packages: - vue dev: false - /@tarojs/plugin-html@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-t3rbNTgJZbrQxEeSJ1T2v+cUC6/+oM/u3qdd4q36uwwf9mBXTph1Lhzrg+SoG7zXSOu/X5PUhF1LPVXl0adncA==} + /@tarojs/plugin-html@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-5fVO6ZsmFZDKMy0SCq8wLRHP/GitE4L58bwuFCoj4Hxl4AC5VKzhXDBxM8JFY6S2eVXozJpHNknrZ8PaVv7+7A==} dependencies: '@babel/generator': 7.23.5 '@babel/parser': 7.23.5 '@babel/traverse': 7.23.5 '@babel/types': 7.23.5 - '@tarojs/runtime': 3.6.18 - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/runtime': 3.6.22 + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -3982,13 +3883,14 @@ packages: - vue dev: false - /@tarojs/plugin-platform-alipay@3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0): - resolution: {integrity: sha512-GlDtbJJFmjKLq/B0VdV95LsfzylAqOVc6I7ib3qe9e4ZrL+PdGIlfm1R5w7rSfAsmbxwj1WxBvmY7PBBqqqjhg==} + /@tarojs/plugin-platform-alipay@3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0): + resolution: {integrity: sha512-dmhWl2BHsL1eUNjYRKrOwQJGkpdN/LGyu+++iFSM3ra8PzwaGRxq61u1LxC+7nkf8/9dJKtG5UoEoWprxQD5yg==} dependencies: - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -3998,20 +3900,21 @@ packages: - supports-color - vue - /@tarojs/plugin-platform-h5@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-APgjNyLBLbhUAM4x/os2RnHKQdLygzZojLS6m0qah/9rNo8RoGVinN/j6i8d2DIdrxEViY5kD4aexzw0qdQl+g==} + /@tarojs/plugin-platform-h5@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-g3Xkyu7AAqZEGQtQ/rZ9WAecRPlg7YfvXoXgopRNlUXVqGX2Hoc1GTI/Zy/mQH2jXR4/ALIBkAUs2kBN+pPH6w==} dependencies: - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/components-react': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/router': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 - '@tarojs/taro-h5': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - babel-plugin-transform-taroapi: 3.6.18 + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/components-react': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/router': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 + '@tarojs/taro-h5': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + babel-plugin-transform-taroapi: 3.6.22 change-case: 4.1.2 lodash-es: 4.17.21 resolve: 1.22.8 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -4021,12 +3924,13 @@ packages: - vue dev: false - /@tarojs/plugin-platform-jd@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-jBX07do4/BMqtmrR1ttCYwh3LGbrVmprJvRdD6if52sHkESMa1jfQZN/foyjd4lIbwDzfdGBNiQoyDV2bhMtmw==} + /@tarojs/plugin-platform-jd@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-2b22hUK6WqbzPtJAXcxd/To5DF7aFQNEgRbKgnGk4wTjeUAsiAf1BV3xGe4ekPFvw4msaafXJT2fq1Qbn4bupA==} dependencies: - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -4034,13 +3938,14 @@ packages: - supports-color - vue - /@tarojs/plugin-platform-qq@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-DTy9teQDfFs1bPVfMwP1tGkhmYcIJHCzco7+XezShDi+hNybu+ysmoUO9uHAS66Q2uFq2QlxAH3LZpS6Ml+vIA==} + /@tarojs/plugin-platform-qq@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-XMVvO2k3qEmNgY7lKFvwm2+JPW6m8FqvGp6n27tAlUFYEgnSH7ejyvNauKYDKbv1XZpQHPvbJE2ijq5Zdj5WKQ==} dependencies: - '@tarojs/plugin-platform-weapp': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/plugin-platform-weapp': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -4049,13 +3954,14 @@ packages: - supports-color - vue - /@tarojs/plugin-platform-swan@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-09Eb3qjlMMBcFaqjE+y5m0sXCqy3rCPmuWNvlc7IKF+JuoHWLSbcEqj4oOq/DN1KGCeIzZAU4zWUIHMN/cn8vw==} + /@tarojs/plugin-platform-swan@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-dtRSyMOrr3flrdt49d2WPwJ3P34EWejIqHXCFfLXNc/isDvTpXgSKWyZYujEMxwtZlgATtvUefAz6OJza/KD6g==} dependencies: - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -4064,13 +3970,14 @@ packages: - supports-color - vue - /@tarojs/plugin-platform-tt@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-3sSshP47AvOrkF/I7XbPB5SDKK1veearIBRY48mbyNcel+ch//8D4SGOpvI3BKOu2ubYsV8ZDdXswMk7jqGIQA==} + /@tarojs/plugin-platform-tt@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-V54BiUspY4U3VEMc8K0aG9YPbFZin5oc1t9btYgcP/fYmb8X7e19166Es9OyY5SnlVj4FiMBw/qEiFVSwCvtSg==} dependencies: - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -4079,13 +3986,14 @@ packages: - supports-color - vue - /@tarojs/plugin-platform-weapp@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-GoXR1/rHMbboadstoQXQvo8k6ssQQoNeD3+ccygEgYWD1CFynjB7+QoBdTPzahpvgKnLrAbjKmn6hrlaC+pKpg==} + /@tarojs/plugin-platform-weapp@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-WjVfVYj63o8ATEL+rL0hkJlexDIp8jE3Ijv4BQIceQvHoBg2VkPtOE3ctZcb9FnfcEHkPOIV8+wK5iqkyBQhaw==} dependencies: - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/service': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/shared': 3.6.18 + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/service': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/shared': 3.6.22 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -4094,20 +4002,20 @@ packages: - supports-color - vue - /@tarojs/react@3.6.18(react@18.2.0): - resolution: {integrity: sha512-zTAFNp1zLdegG8wE70G4Ni/CKu0YYXgp5nMJEjD2126Kf126PvFNvaGhzopkaZwlWGwyqAObGBcL9WH3zsSsjw==} + /@tarojs/react@3.6.22(react@18.2.0): + resolution: {integrity: sha512-m0Vkrn3s0c2OBEwsHAS+agW4ocyb53cYyttrX4pN2mtSevSOCAPqrBGb6vgGpiFnUNcCYdmw/N2ny5M1rLXTAA==} dependencies: - '@tarojs/runtime': 3.6.18 - '@tarojs/shared': 3.6.18 + '@tarojs/runtime': 3.6.22 + '@tarojs/shared': 3.6.22 react-reconciler: 0.27.0(react@18.2.0) transitivePeerDependencies: - react - /@tarojs/router@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-J1DVjdPv1uW0ZmiJ2NkdL58LMWm7Q3Xn/fTuPRo5BnMQn26GP11T4PiJUn8Zb3bUBPSs5qidzrYTxWiY0QHCbQ==} + /@tarojs/router@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-T9/nI0SrwOpBIgZxeKBx7cQyIWOpdso7t2tWDhmX1CMUNIXkcI0MOYffD/lYzMaH9W2rC2zzYJo16oASxy6Dyw==} dependencies: - '@tarojs/runtime': 3.6.18 - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/runtime': 3.6.22 + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) dingtalk-jsapi: 2.15.4 history: 5.3.0 mobile-detect: 1.4.5 @@ -4120,27 +4028,28 @@ packages: - postcss - vue - /@tarojs/runner-utils@3.6.18: - resolution: {integrity: sha512-Nvs96XIHLt6eJtfcgITd6rbZyA34FkT4LlLrbUO1qi0/zNH0i8HXar4Q8X8w6FQPhVVyw7y34mFlK2D0mdcBUg==} + /@tarojs/runner-utils@3.6.22: + resolution: {integrity: sha512-ya4nQHS6suXuTAUvn9FrwB7Gz4alcDvFQmI3oxcuKDowbTqWHLnqJGQeDkpyrAAtbSPlqpZZXtEpsscvZHlmUA==} dependencies: - '@tarojs/helper': 3.6.18 + '@tarojs/helper': 3.6.22 scss-bundle: 3.1.2 transitivePeerDependencies: + - '@swc/helpers' - supports-color dev: true - /@tarojs/runtime@3.6.18: - resolution: {integrity: sha512-94xzXGITo/aFc8xvw2C8Rul7rqaIb23VMgE5dMS2hiH2anyBBS8HIyzHyKHNms6uo26P8MO4dMndmh6Jjm3bVw==} + /@tarojs/runtime@3.6.22: + resolution: {integrity: sha512-D8gDrUeqBGE8+a8oVxEPEc1bczoX5H0P2T6AqS0dbELJQkGKWnBTvdRqyADtQXRKj7HXnCY0FuAhPsI4DFHTgg==} dependencies: - '@tarojs/shared': 3.6.18 + '@tarojs/shared': 3.6.22 lodash-es: 4.17.21 - /@tarojs/service@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-8WN/CFOZCUFDa//yzxGxFCrX6plGr7FiNUQpNnxTmhTCS23bPXGMyuHgwDkane4m+V78HOf7ITRL6anV5OTCJw==} + /@tarojs/service@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-L5f2H022fIMSxIo0g9AAXZI8gPhwaDDS5lTD8Aawo5Q7ztROda7ml2FPmauK934WKZm2hd4FAnXSUbOcMDp5hA==} dependencies: - '@tarojs/helper': 3.6.18 - '@tarojs/shared': 3.6.18 - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/helper': 3.6.22 + '@tarojs/shared': 3.6.22 + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) joi: 17.11.0 lodash: 4.17.21 ora: 5.4.1 @@ -4148,6 +4057,7 @@ packages: tapable: 1.1.3 webpack-merge: 4.2.2 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -4155,27 +4065,29 @@ packages: - supports-color - vue - /@tarojs/shared@3.6.18: - resolution: {integrity: sha512-lJtjAK0Ol/SVu65VsMzsqOwfWrShYRBZgp4WLHrA6dJU0fqTvNklXWyDix22S2hkv0LlbRPgWlJbp5k3IkQsZA==} - /@tarojs/shared@3.6.20: resolution: {integrity: sha512-JYi4T9T1M8foB7jnrWBW+ssOMNqA1eR30aY463zsxFGaeU5bn4qihvCOAo//03szVPN7h7L7k0c1Q4GSSWgLaQ==} dev: true - /@tarojs/taro-h5@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-MSn3GN/bHSaHDqgZ6dnseZ+GBsmGE/N8DDjPTgRWXYJSgT7fFQKhQgJT+hqO5Hq9ju188jht/klXCaWgg3K4Tw==} + /@tarojs/shared@3.6.22: + resolution: {integrity: sha512-a6diONs9jVK2BQpu03AO+oa+VWdv54eBoQFMtWTQKP3s6rT0IvRkxIcNbIwOlcyy6MPbLzERt32DIKbm9/IHwg==} + + /@tarojs/taro-h5@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-UDl8O4zX1CDaLsEG6p8fMNfa//FBB++qJycKZV51PYjCeFC9cXqfRpoqwweGjkgu9OjEimbYsC1ZLmCFWussug==} dependencies: - '@tarojs/api': 3.6.18 - '@tarojs/components': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/router': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/runtime': 3.6.18 - '@tarojs/shared': 3.6.18 + '@tarojs/api': 3.6.22 + '@tarojs/components': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/router': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/runtime': 3.6.22 + '@tarojs/shared': 3.6.22 abortcontroller-polyfill: 1.7.5 base64-js: 1.5.1 ics: 3.5.0 intersection-observer: 0.7.0 + is-mobile: 4.0.0 jsonp-retry: 1.0.3 lodash-es: 4.17.21 + platform: 1.3.6 query-string: 7.1.3 whatwg-fetch: 3.6.19 transitivePeerDependencies: @@ -4187,13 +4099,14 @@ packages: - vue dev: false - /@tarojs/taro-loader@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-i56wYuen2vLzmvOpIO7vX5ZgGeVR5tRaePot+Uygw/iNEDWqPIYiHfjBX3BFM560LW89q3grAhga1MvjqDQW6w==} + /@tarojs/taro-loader@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-7ovNaL6TUbxSc/lTRoBbiKVwXGLgC1bKHjq021ZYaI4YSSyfsMZ3+/1c4X4R8XUReZMesFks0X2pqiYchCyl9A==} dependencies: - '@tarojs/helper': 3.6.18 - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/helper': 3.6.22 + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) loader-utils: 1.4.2 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -4202,8 +4115,8 @@ packages: - vue dev: true - /@tarojs/taro@3.6.18(@types/react@18.2.42)(postcss@8.4.32): - resolution: {integrity: sha512-G1BBQcd5YwXPFdX+FtAM4/PnnFKWOBFeVTJY1Y+Lp2urUg2biX5UWAInz6q1lrEVxTXB+/7pu0tXurLtFz02BA==} + /@tarojs/taro@3.6.22(@types/react@18.2.42)(postcss@8.4.32): + resolution: {integrity: sha512-SfmzfAf2JYh4Av4RF2q9WEvgSDDjMjOeQjqCWIsYc36uJCyW+Iq5Is0A7CGWSrnHhjBLpGvv/bHzRwRwCBKilg==} peerDependencies: '@types/react': '*' '@types/webpack': '*' @@ -4222,26 +4135,27 @@ packages: vue: optional: true dependencies: - '@tarojs/api': 3.6.18 - '@tarojs/runtime': 3.6.18 + '@tarojs/api': 3.6.22 + '@tarojs/runtime': 3.6.22 '@types/react': 18.2.42 postcss: 8.4.32 - /@tarojs/webpack5-prebundle@3.6.18(@types/react@18.2.42)(postcss@8.4.32)(webpack@5.89.0): - resolution: {integrity: sha512-pA0qOqagC96ISqIznjqaNLllib5fCidSX79C2HZiJ1uYx0+Lh9aEk7vURE7KgPeqscVR5bQA+SLa0FRReHj1CQ==} + /@tarojs/webpack5-prebundle@3.6.22(@types/react@18.2.42)(postcss@8.4.32)(webpack@5.89.0): + resolution: {integrity: sha512-AEqrZW5j8HGzfGiCFL9L7JVYBEKXKp04/y3TpLyoEXJ2/HUX6N/hmc4PNQa+1QoMCA8Zw0c8L7ZsEtaB5L2JlA==} peerDependencies: webpack: ^5.78.0 dependencies: - '@tarojs/helper': 3.6.18 - '@tarojs/shared': 3.6.18 - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/helper': 3.6.22 + '@tarojs/shared': 3.6.22 + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) enhanced-resolve: 5.15.0 es-module-lexer: 0.10.5 lodash: 4.17.21 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) webpack-chain: 6.5.1 webpack-virtual-modules: 0.5.0 transitivePeerDependencies: + - '@swc/helpers' - '@types/react' - '@types/webpack' - '@types/webpack-dev-server' @@ -4250,35 +4164,35 @@ packages: - vue dev: true - /@tarojs/webpack5-runner@3.6.18(@babel/core@7.23.5)(@swc/core@1.3.23)(@types/react@18.2.42)(postcss@8.4.32)(prettier@3.1.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5)(webpack@5.89.0): - resolution: {integrity: sha512-BYt178vICazDRtNCXMZlmHq4EPWCkSfopIfMsyy/VgtU4Bc6ioRr5ebOxHaM9ACC79yqmtSZ6WUGFUF6XKEVcg==} + /@tarojs/webpack5-runner@3.6.22(@babel/core@7.23.5)(@swc/core@1.3.96)(@types/react@18.2.42)(postcss@8.4.32)(prettier@3.1.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5)(webpack@5.89.0): + resolution: {integrity: sha512-kFbW3eKRq4jWZqqjTarBA7TDLUk4QlWnsFPiWDI3WGnv3oG9SomxSyRFVH1lJp1sXPMLsXpwIAWltpBrevrnew==} peerDependencies: postcss: ^8.4.18 webpack: ^5.78.0 dependencies: '@parcel/css': 1.14.0 - '@tarojs/helper': 3.6.18 - '@tarojs/plugin-platform-alipay': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) - '@tarojs/plugin-platform-jd': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/plugin-platform-qq': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/plugin-platform-swan': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/plugin-platform-tt': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/plugin-platform-weapp': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/runner-utils': 3.6.18 - '@tarojs/runtime': 3.6.18 - '@tarojs/shared': 3.6.18 - '@tarojs/taro': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/taro-loader': 3.6.18(@types/react@18.2.42)(postcss@8.4.32) - '@tarojs/webpack5-prebundle': 3.6.18(@types/react@18.2.42)(postcss@8.4.32)(webpack@5.89.0) + '@tarojs/helper': 3.6.22 + '@tarojs/plugin-platform-alipay': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(react@18.2.0) + '@tarojs/plugin-platform-jd': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/plugin-platform-qq': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/plugin-platform-swan': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/plugin-platform-tt': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/plugin-platform-weapp': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/runner-utils': 3.6.22 + '@tarojs/runtime': 3.6.22 + '@tarojs/shared': 3.6.22 + '@tarojs/taro': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/taro-loader': 3.6.22(@types/react@18.2.42)(postcss@8.4.32) + '@tarojs/webpack5-prebundle': 3.6.22(@types/react@18.2.42)(postcss@8.4.32)(webpack@5.89.0) acorn-walk: 8.3.1 autoprefixer: 9.8.8 babel-loader: 8.2.1(@babel/core@7.23.5)(webpack@5.89.0) copy-webpack-plugin: 10.2.0(webpack@5.89.0) css-loader: 6.8.1(webpack@5.89.0) - css-minimizer-webpack-plugin: 3.4.1(@parcel/css@1.14.0)(csso@5.0.5)(esbuild@0.14.54)(webpack@5.89.0) + css-minimizer-webpack-plugin: 3.4.1(@parcel/css@1.14.0)(csso@5.0.5)(esbuild@0.19.8)(webpack@5.89.0) csso: 5.0.5 detect-port: 1.5.1 - esbuild: 0.14.54 + esbuild: 0.19.8 esbuild-loader: 2.18.0(webpack@5.89.0) file-loader: 6.0.0(webpack@5.89.0) html-minifier: 4.0.0 @@ -4295,11 +4209,11 @@ packages: mkdirp: 1.0.4 ora: 5.4.1 postcss: 8.4.32 - postcss-html-transform: 3.6.18(postcss@8.4.32) + postcss-html-transform: 3.6.22(postcss@8.4.32) postcss-import: 14.1.0(postcss@8.4.32) postcss-loader: 7.3.3(postcss@8.4.32)(typescript@4.9.5)(webpack@5.89.0) - postcss-plugin-constparse: 3.6.18(postcss@8.4.32) - postcss-pxtransform: 3.6.18(postcss@8.4.32) + postcss-plugin-constparse: 3.6.22(postcss@8.4.32) + postcss-pxtransform: 3.6.22(postcss@8.4.32) postcss-url: 10.1.3(postcss@8.4.32) regenerator-runtime: 0.11.1 resolve: 1.22.8 @@ -4310,11 +4224,11 @@ packages: style-loader: 3.3.1(webpack@5.89.0) stylus: 0.55.0 stylus-loader: 6.2.0(stylus@0.55.0)(webpack@5.89.0) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.23)(esbuild@0.14.54)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.96)(esbuild@0.19.8)(webpack@5.89.0) url-loader: 4.1.0(file-loader@6.0.0)(webpack@5.89.0) vm2: 3.9.19 vue-loader: 15.11.1(css-loader@6.8.1)(lodash@4.17.21)(prettier@3.1.0)(react-dom@18.2.0)(react@18.2.0)(webpack@5.89.0) - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) webpack-chain: 6.5.1 webpack-dev-server: 4.11.1(webpack@5.89.0) webpack-format-messages: 2.0.6 @@ -4322,6 +4236,7 @@ packages: transitivePeerDependencies: - '@babel/core' - '@swc/core' + - '@swc/helpers' - '@types/react' - '@types/react-native' - '@types/webpack' @@ -4578,10 +4493,6 @@ packages: /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - /@types/expect@1.20.4: - resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==} - dev: true - /@types/express-serve-static-core@4.17.41: resolution: {integrity: sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==} dependencies: @@ -4767,10 +4678,6 @@ packages: '@types/node': 20.10.4 dev: true - /@types/node@15.14.9: - resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} - dev: true - /@types/node@18.19.3: resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} dependencies: @@ -4930,13 +4837,6 @@ packages: resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} dev: true - /@types/vinyl@2.0.11: - resolution: {integrity: sha512-vPXzCLmRp74e9LsP8oltnWKTH+jBwt86WgRUb4Pc9Lf3pkMVGyvIo2gm9bODeGfCay2DBB/hAWDuvf07JcK4rw==} - dependencies: - '@types/expect': 1.20.4 - '@types/node': 20.10.4 - dev: true - /@types/webpack-env@1.18.4: resolution: {integrity: sha512-I6e+9+HtWADAWeeJWDFQtdk4EVSAbj6Rtz4q8fJ7mSr1M0jzlFcs8/HZ+Xb5SHzVm1dxH7aUiI+A8kA8Gcrm0A==} dev: true @@ -5888,10 +5788,6 @@ packages: resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} dev: false - /async@3.2.5: - resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} - dev: true - /asynciterator.prototype@1.0.0: resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} dependencies: @@ -6020,7 +5916,7 @@ packages: make-dir: 2.1.0 pify: 4.0.1 schema-utils: 2.7.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /babel-plugin-dynamic-import-node@2.3.3: @@ -6115,8 +6011,8 @@ packages: is-invalid-path: 1.0.2 dev: true - /babel-plugin-transform-taroapi@3.6.18: - resolution: {integrity: sha512-gW8zVaQFTpNoUU9FGM4gdraPz7BpCKN9CBKPVrDSdPRQNBxmbXo9AW+U5wWZKch50IUgyyE91SymO5n5XKb+Dw==} + /babel-plugin-transform-taroapi@3.6.22: + resolution: {integrity: sha512-Uuq2yhtONPbgy6YXMPB6t34D1CgyXo9p0xHqTppUdypeANJAr28aFyGMAoA5tGgul5KYeP2uBicIPnfEsHgZuA==} dependencies: lodash: 4.17.21 dev: false @@ -6226,11 +6122,6 @@ packages: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - /binaryextensions@4.19.0: - resolution: {integrity: sha512-DRxnVbOi/1OgA5pA9EDiRT8gvVYeqfuN7TmPfLyt6cyho3KbHCi3EtDQf39TTmGDrR5dZ9CspdXhPkL/j/WGbg==} - engines: {node: '>=0.8'} - dev: true - /bl@1.2.3: resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} dependencies: @@ -6786,11 +6677,6 @@ packages: wrap-ansi: 7.0.0 dev: true - /clone-buffer@1.0.0: - resolution: {integrity: sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==} - engines: {node: '>= 0.10'} - dev: true - /clone-deep@4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} @@ -6824,14 +6710,6 @@ packages: engines: {node: '>=0.8'} dev: true - /cloneable-readable@1.1.3: - resolution: {integrity: sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==} - dependencies: - inherits: 2.0.4 - process-nextick-args: 2.0.1 - readable-stream: 2.3.8 - dev: true - /co@4.6.0: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} @@ -7252,7 +7130,7 @@ packages: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /core-js-compat@3.34.0: @@ -7417,10 +7295,10 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.32) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true - /css-minimizer-webpack-plugin@3.4.1(@parcel/css@1.14.0)(csso@5.0.5)(esbuild@0.14.54)(webpack@5.89.0): + /css-minimizer-webpack-plugin@3.4.1(@parcel/css@1.14.0)(csso@5.0.5)(esbuild@0.19.8)(webpack@5.89.0): resolution: {integrity: sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==} engines: {node: '>= 12.13.0'} peerDependencies: @@ -7442,13 +7320,13 @@ packages: '@parcel/css': 1.14.0 cssnano: 5.1.15(postcss@8.4.32) csso: 5.0.5 - esbuild: 0.14.54 + esbuild: 0.19.8 jest-worker: 27.5.1 postcss: 8.4.32 schema-utils: 4.2.0 serialize-javascript: 6.0.1 source-map: 0.6.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /css-select@4.3.0: @@ -8237,14 +8115,6 @@ packages: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true - /ejs@3.1.9: - resolution: {integrity: sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==} - engines: {node: '>=0.10.0'} - hasBin: true - dependencies: - jake: 10.8.7 - dev: true - /electron-to-chromium@1.4.607: resolution: {integrity: sha512-YUlnPwE6eYxzwBnFmawA8LiLRfm70R2aJRIUv0n03uHt/cUzzYACOogmvk8M2+hVzt/kB80KJXx7d5f5JofPvQ==} @@ -8446,6 +8316,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-arm64@0.14.54: @@ -8454,6 +8325,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-darwin-64@0.14.54: @@ -8462,6 +8334,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-arm64@0.14.54: @@ -8470,6 +8343,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-freebsd-64@0.14.54: @@ -8478,6 +8352,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-arm64@0.14.54: @@ -8486,6 +8361,7 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-linux-32@0.14.54: @@ -8494,6 +8370,7 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-64@0.14.54: @@ -8502,6 +8379,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm64@0.14.54: @@ -8510,6 +8388,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm@0.14.54: @@ -8518,6 +8397,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-mips64le@0.14.54: @@ -8526,6 +8406,7 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-ppc64le@0.14.54: @@ -8534,6 +8415,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-riscv64@0.14.54: @@ -8542,6 +8424,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-s390x@0.14.54: @@ -8550,6 +8433,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-loader@2.18.0(webpack@5.89.0): @@ -8562,7 +8446,7 @@ packages: json5: 2.2.3 loader-utils: 2.0.4 tapable: 2.2.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) webpack-sources: 2.3.1 dev: true @@ -8572,6 +8456,7 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true /esbuild-openbsd-64@0.14.54: @@ -8580,6 +8465,7 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /esbuild-sunos-64@0.14.54: @@ -8588,6 +8474,7 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true /esbuild-windows-32@0.14.54: @@ -8596,6 +8483,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-64@0.14.54: @@ -8604,6 +8492,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-arm64@0.14.54: @@ -8612,6 +8501,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild@0.14.54: @@ -8641,6 +8531,7 @@ packages: esbuild-windows-32: 0.14.54 esbuild-windows-64: 0.14.54 esbuild-windows-arm64: 0.14.54 + dev: true /esbuild@0.19.8: resolution: {integrity: sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==} @@ -8670,7 +8561,6 @@ packages: '@esbuild/win32-arm64': 0.19.8 '@esbuild/win32-ia32': 0.19.8 '@esbuild/win32-x64': 0.19.8 - dev: true /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -9419,7 +9309,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 2.7.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /file-type@3.9.0: @@ -9447,12 +9337,6 @@ packages: engines: {node: '>=6'} dev: true - /filelist@1.0.4: - resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} - dependencies: - minimatch: 5.1.6 - dev: true - /filename-reserved-regex@2.0.0: resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} engines: {node: '>=4'} @@ -9543,13 +9427,6 @@ packages: resolve-dir: 1.0.1 dev: true - /first-chunk-stream@2.0.0: - resolution: {integrity: sha512-X8Z+b/0L4lToKYq+lwnKqi9X/Zek0NibLpsJgVsSxpoYq7JtiCtRb5HqKVEjEw/qAb/4AKKRLOwwKHlWNpm2Eg==} - engines: {node: '>=0.10.0'} - dependencies: - readable-stream: 2.3.8 - dev: true - /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -10401,7 +10278,7 @@ packages: lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /htmlparser2@6.1.0: @@ -11009,6 +10886,10 @@ packages: resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} dev: true + /is-mobile@4.0.0: + resolution: {integrity: sha512-mlcHZA84t1qLSuWkt2v0I2l61PYdyQDt4aG1mLIXF5FDMm4+haBCxCPYSr/uwqQNRk1MiTizn0ypEuRAOLRAew==} + dev: false + /is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} dev: true @@ -11198,10 +11079,6 @@ packages: engines: {node: '>=12'} dev: true - /is-utf8@0.2.1: - resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} - dev: true - /is-valid-glob@1.0.0: resolution: {integrity: sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==} engines: {node: '>=0.10.0'} @@ -11252,11 +11129,6 @@ packages: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true - /isbinaryfile@5.0.0: - resolution: {integrity: sha512-UDdnyGvMajJUWCkib7Cei/dvyJrrvo4FIrsvSFWdPpXSUorzXrDJ0S+X5Q4ZlasfPjca4yqCNNsjbCeiy8FFeg==} - engines: {node: '>= 14.0.0'} - dev: true - /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -11384,17 +11256,6 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true - /jake@10.8.7: - resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==} - engines: {node: '>=10'} - hasBin: true - dependencies: - async: 3.2.5 - chalk: 4.1.2 - filelist: 1.0.4 - minimatch: 3.1.2 - dev: true - /javascript-stringify@2.1.0: resolution: {integrity: sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==} dev: true @@ -11507,7 +11368,7 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@swc/core@1.3.23)(@types/node@20.10.4)(typescript@4.9.5) + ts-node: 10.9.1(@swc/core@1.3.96)(@types/node@20.10.4)(typescript@4.9.5) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -12186,7 +12047,7 @@ packages: dependencies: klona: 2.0.6 less: 4.2.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /less@3.13.1: @@ -12990,38 +12851,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /mem-fs-editor@9.7.0(mem-fs@2.3.0): - resolution: {integrity: sha512-ReB3YD24GNykmu4WeUL/FDIQtkoyGB6zfJv60yfCo3QjKeimNcTqv2FT83bP0ccs6uu+sm5zyoBlspAzigmsdg==} - engines: {node: '>=12.10.0'} - peerDependencies: - mem-fs: ^2.1.0 - peerDependenciesMeta: - mem-fs: - optional: true - dependencies: - binaryextensions: 4.19.0 - commondir: 1.0.1 - deep-extend: 0.6.0 - ejs: 3.1.9 - globby: 11.1.0 - isbinaryfile: 5.0.0 - mem-fs: 2.3.0 - minimatch: 7.4.6 - multimatch: 5.0.0 - normalize-path: 3.0.0 - textextensions: 5.16.0 - dev: true - - /mem-fs@2.3.0: - resolution: {integrity: sha512-GftCCBs6EN8sz3BoWO1bCj8t7YBtT713d8bUgbhg9Iel5kFSqnSvCK06TYIDJAtJ51cSiWkM/YemlT0dfoFycw==} - engines: {node: '>=12'} - dependencies: - '@types/node': 15.14.9 - '@types/vinyl': 2.0.11 - vinyl: 2.2.1 - vinyl-file: 3.0.0 - dev: true - /memfs@3.5.3: resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} engines: {node: '>= 4.0.0'} @@ -13476,7 +13305,7 @@ packages: webpack: ^5.0.0 dependencies: schema-utils: 4.2.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /minimalistic-assert@1.0.1: @@ -13686,7 +13515,7 @@ packages: dependencies: debug: 3.2.7 iconv-lite: 0.6.3 - sax: 1.2.4 + sax: 1.3.0 transitivePeerDependencies: - supports-color dev: true @@ -14461,6 +14290,10 @@ packages: find-up: 5.0.0 dev: true + /platform@1.3.6: + resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} + dev: false + /please-upgrade-node@3.2.0: resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==} dependencies: @@ -14537,8 +14370,8 @@ packages: postcss: 8.4.32 dev: true - /postcss-html-transform@3.6.18(postcss@8.4.32): - resolution: {integrity: sha512-Oj6/mhEwUehn138WDK2frIy73VDIuP04/9Lg7ChTFUeSmuqeVj0V3hSntQbLwxsLvz9ceuo1lsag2ECS5ImvZQ==} + /postcss-html-transform@3.6.22(postcss@8.4.32): + resolution: {integrity: sha512-jJUL7c4cJ7ySf6HSeqi3BP4OSvYEyDR2RWEuDs7DssQTPbxu+sGADOlLAVroFAnLAWteGg7vQNg883EGAw05Fg==} peerDependencies: postcss: ^8.4.18 dependencies: @@ -14580,7 +14413,7 @@ packages: jiti: 1.21.0 postcss: 8.4.32 semver: 7.5.4 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) transitivePeerDependencies: - typescript dev: true @@ -14812,16 +14645,16 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-plugin-constparse@3.6.18(postcss@8.4.32): - resolution: {integrity: sha512-gaPKg38D5AIpA608v/DES/fw8Q7oxyQunh0Nn+B0CNUnb3Z/lCKiKapA0DJDwK06ZxibDqumfbEBzpeHd/hZ+Q==} + /postcss-plugin-constparse@3.6.22(postcss@8.4.32): + resolution: {integrity: sha512-0L/5aQ3D1dErdHYON13PBkCG3LQw4s/Pxr3fgYwEF5sjr/1huFEl22uj7J7eWQZuDOWiv9ksnZjxa7ZzOToxKQ==} peerDependencies: postcss: ^8.4.18 dependencies: postcss: 8.4.32 dev: true - /postcss-pxtransform@3.6.18(postcss@8.4.32): - resolution: {integrity: sha512-fFQH74ZJezshTye5St3cgnz33U5k1RUjjW9nP0zVLDypRQZuI9/bshi6VgurXRYMCVUWitCklzlvqyUUX76abw==} + /postcss-pxtransform@3.6.22(postcss@8.4.32): + resolution: {integrity: sha512-ihKDeZaL6euNOk1w61Rt/oNPPEH/Ts+yixq8HJUzSo5U6QMPnIzmRoml/ysXRd3+4x8TOh7+VF0G7o0tFX0SzA==} peerDependencies: postcss: ^8.4.18 dependencies: @@ -15711,11 +15544,6 @@ packages: strip-ansi: 6.0.1 dev: true - /replace-ext@1.0.1: - resolution: {integrity: sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==} - engines: {node: '>= 0.10'} - dev: true - /replace-ext@2.0.0: resolution: {integrity: sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==} engines: {node: '>= 10'} @@ -16042,7 +15870,7 @@ packages: klona: 2.0.6 neo-async: 2.6.2 sass: 1.50.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /sass@1.50.0: @@ -16755,28 +16583,6 @@ packages: ansi-regex: 6.0.1 dev: true - /strip-bom-buf@1.0.0: - resolution: {integrity: sha512-1sUIL1jck0T1mhOLP2c696BIznzT525Lkub+n4jjMHjhjhoAQA6Ye659DxdlZBr0aLDMQoTxKIpnlqxgtwjsuQ==} - engines: {node: '>=4'} - dependencies: - is-utf8: 0.2.1 - dev: true - - /strip-bom-stream@2.0.0: - resolution: {integrity: sha512-yH0+mD8oahBZWnY43vxs4pSinn8SMKAdml/EOGBewoe1Y0Eitd0h2Mg3ZRiXruUW6L4P+lvZiEgbh0NgUGia1w==} - engines: {node: '>=0.10.0'} - dependencies: - first-chunk-stream: 2.0.0 - strip-bom: 2.0.0 - dev: true - - /strip-bom@2.0.0: - resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} - engines: {node: '>=0.10.0'} - dependencies: - is-utf8: 0.2.1 - dev: true - /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -16838,7 +16644,7 @@ packages: peerDependencies: webpack: ^5.0.0 dependencies: - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /style-to-object@1.0.5: @@ -16917,7 +16723,7 @@ packages: klona: 2.0.6 normalize-path: 3.0.0 stylus: 0.55.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /stylus@0.55.0: @@ -17055,7 +16861,7 @@ packages: dependencies: rimraf: 2.6.3 - /terser-webpack-plugin@5.3.9(@swc/core@1.3.23)(esbuild@0.14.54)(webpack@5.89.0): + /terser-webpack-plugin@5.3.9(@swc/core@1.3.96)(esbuild@0.19.8)(webpack@5.89.0): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -17072,13 +16878,13 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.20 - '@swc/core': 1.3.23 - esbuild: 0.14.54 + '@swc/core': 1.3.96 + esbuild: 0.19.8 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.25.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) /terser@5.25.0: resolution: {integrity: sha512-we0I9SIsfvNUMP77zC9HG+MylwYYsGFSBG8qm+13oud2Yh+O104y614FRbyjpxys16jZwot72Fpi827YvGzuqg==} @@ -17108,11 +16914,6 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /textextensions@5.16.0: - resolution: {integrity: sha512-7D/r3s6uPZyU//MCYrX6I14nzauDwJ5CxazouuRGNuvSCihW87ufN6VLoROLCrHg6FblLuJrT6N2BVaPVzqElw==} - engines: {node: '>=0.8'} - dev: true - /thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -17303,7 +17104,7 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.1(@swc/core@1.3.23)(@types/node@20.10.4)(typescript@4.9.5): + /ts-node@10.9.1(@swc/core@1.3.96)(@types/node@20.10.4)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -17318,7 +17119,7 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.3.23 + '@swc/core': 1.3.96 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 @@ -17747,7 +17548,7 @@ packages: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 2.7.1 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /url-parse-lax@3.0.0: @@ -17883,17 +17684,6 @@ packages: vinyl: 3.0.0 dev: true - /vinyl-file@3.0.0: - resolution: {integrity: sha512-BoJDj+ca3D9xOuPEM6RWVtWQtvEPQiQYn82LvdxhLWplfQsBzBqtgK0yhCP0s1BNTi6dH9BO+dzybvyQIacifg==} - engines: {node: '>=4'} - dependencies: - graceful-fs: 4.2.11 - pify: 2.3.0 - strip-bom-buf: 1.0.0 - strip-bom-stream: 2.0.0 - vinyl: 2.2.1 - dev: true - /vinyl-fs@4.0.0: resolution: {integrity: sha512-7GbgBnYfaquMk3Qu9g22x000vbYkOex32930rBnc3qByw6HfMEAoELjCjoJv4HuEQxHAurT+nvMHm6MnJllFLw==} engines: {node: '>=10.13.0'} @@ -17926,18 +17716,6 @@ packages: vinyl-contents: 2.0.0 dev: true - /vinyl@2.2.1: - resolution: {integrity: sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==} - engines: {node: '>= 0.10'} - dependencies: - clone: 2.1.2 - clone-buffer: 1.0.0 - clone-stats: 1.0.0 - cloneable-readable: 1.1.3 - remove-trailing-separator: 1.1.0 - replace-ext: 1.0.1 - dev: true - /vinyl@3.0.0: resolution: {integrity: sha512-rC2VRfAVVCGEgjnxHUnpIVh3AGuk62rP3tqVrn+yab0YH7UULisC085+NYH+mnqf3Wx4SpSi1RQMwudL89N03g==} engines: {node: '>=10.13.0'} @@ -18050,7 +17828,7 @@ packages: prettier: 3.1.0 vue-hot-reload-api: 2.3.4 vue-style-loader: 4.1.3 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) transitivePeerDependencies: - arc-templates - atpl @@ -18197,7 +17975,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /webpack-dev-server@4.11.1(webpack@5.89.0): @@ -18238,7 +18016,7 @@ packages: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) webpack-dev-middleware: 5.3.3(webpack@5.89.0) ws: 8.14.2 transitivePeerDependencies: @@ -18276,7 +18054,7 @@ packages: resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} dev: true - /webpack@5.89.0(@swc/core@1.3.23): + /webpack@5.89.0(@swc/core@1.3.96): resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} hasBin: true @@ -18307,7 +18085,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.23)(esbuild@0.14.54)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.96)(esbuild@0.19.8)(webpack@5.89.0) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -18325,7 +18103,7 @@ packages: consola: 2.15.3 pretty-time: 1.1.0 std-env: 3.6.0 - webpack: 5.89.0(@swc/core@1.3.23) + webpack: 5.89.0(@swc/core@1.3.96) dev: true /websocket-driver@0.7.4: diff --git a/src/packages/imagepreview/demo.taro.tsx b/src/packages/imagepreview/demo.taro.tsx index 515b843c8d..2a035dc540 100644 --- a/src/packages/imagepreview/demo.taro.tsx +++ b/src/packages/imagepreview/demo.taro.tsx @@ -187,7 +187,10 @@ const ImagePreviewDemo = () => { value={init5} defaultValue={init5} indicator - onChange={(value) => setInit5(value)} + onChange={(value) => { + console.log('demo onChange', value) + setInit5(value) + }} onClose={hideFn5} /> void` | `-` | | onClose | Emitted when closing ImagePreview | `() => void` | `-` | \ No newline at end of file diff --git a/src/packages/imagepreview/doc.md b/src/packages/imagepreview/doc.md index 62bd70eb28..82984f4562 100644 --- a/src/packages/imagepreview/doc.md +++ b/src/packages/imagepreview/doc.md @@ -344,4 +344,5 @@ export default App; | indicator | 分页指示器是否展示 | `boolean` | `false` | | indicatorColor | 分页指示器选中的颜色 | `string` | `#fff` | | closeOnContentClick | 点击图片可以退出预览 | `boolean` | `false` | +| onChange | 切换时触发 | `(value:number) => void` | `-` | | onClose | 点击遮罩关闭图片预览时触发 | `() => void` | `-` | \ No newline at end of file diff --git a/src/packages/imagepreview/doc.taro.md b/src/packages/imagepreview/doc.taro.md index df6e01f6c3..e70c11f484 100644 --- a/src/packages/imagepreview/doc.taro.md +++ b/src/packages/imagepreview/doc.taro.md @@ -345,4 +345,5 @@ export default App; | indicatorColor | 分页指示器选中的颜色 | `string` | `#fff` | | showMenuByLongpress | 开启长按图片显示识别小程序码菜单 | `boolean` | `false` | | closeOnContentClick | 点击图片可以退出预览 | `boolean` | `false` | +| onChange | 切换时触发 | `(value:number) => void` | `-` | | onClose | 点击遮罩关闭图片预览时触发 | `() => void` | `-` | \ No newline at end of file diff --git a/src/packages/imagepreview/doc.zh-TW.md b/src/packages/imagepreview/doc.zh-TW.md index 9c6f3f4b65..2b56c1046d 100644 --- a/src/packages/imagepreview/doc.zh-TW.md +++ b/src/packages/imagepreview/doc.zh-TW.md @@ -344,4 +344,5 @@ export default App; | indicator | 分頁指示器是否展示 | `boolean` | `false` | | indicatorColor | 分頁指示器選中的顏色 | `string` | `#fff` | | closeOnContentClick | 點擊圖片可以退出預覽 | `boolean` | `false` | +| onChange | 切換時觸發 | `(value:number) => void` | `-` | | onClose | 點擊遮罩關閉圖片預覽時觸發 | `() => void` | `-` | \ No newline at end of file diff --git a/src/packages/imagepreview/imagepreview.taro.tsx b/src/packages/imagepreview/imagepreview.taro.tsx index d16356c9e1..b01b82acfb 100644 --- a/src/packages/imagepreview/imagepreview.taro.tsx +++ b/src/packages/imagepreview/imagepreview.taro.tsx @@ -229,6 +229,7 @@ export const ImagePreview: FunctionComponent> = ( const slideChangeEnd = (page: number) => { setActive(page + 1) + props.onChange?.(page + 1) } const onCloseInner = () => { setShowPop(false) @@ -309,7 +310,7 @@ export const ImagePreview: FunctionComponent> = ( )} diff --git a/src/packages/imagepreview/imagepreview.tsx b/src/packages/imagepreview/imagepreview.tsx index 6ee468736d..6850871aa5 100644 --- a/src/packages/imagepreview/imagepreview.tsx +++ b/src/packages/imagepreview/imagepreview.tsx @@ -227,6 +227,7 @@ export const ImagePreview: FunctionComponent> = ( const slideChangeEnd = (page: number) => { setActive(page + 1) + props.onChange?.(page + 1) } const onCloseInner = () => { From 4b6e42ddbf017bb89c78bbbdc7aa93ac1847b926 Mon Sep 17 00:00:00 2001 From: oasis <12181600+oasis-cloud@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:42:41 +0800 Subject: [PATCH 026/275] feat(tag): image text (#1851) --- src/packages/tag/demo.taro.tsx | 18 ++++++++++++++++++ src/packages/tag/demo.tsx | 19 +++++++++++++++++++ src/packages/tag/doc.en-US.md | 29 +++++++++++++++++++++++++++++ src/packages/tag/doc.md | 29 +++++++++++++++++++++++++++++ src/packages/tag/doc.taro.md | 28 ++++++++++++++++++++++++++++ 5 files changed, 123 insertions(+) diff --git a/src/packages/tag/demo.taro.tsx b/src/packages/tag/demo.taro.tsx index c2dc3abd4b..bda1729b5b 100644 --- a/src/packages/tag/demo.taro.tsx +++ b/src/packages/tag/demo.taro.tsx @@ -19,6 +19,7 @@ const TagDemo = () => { backgroundColor: '背景颜色', textColor: '文字颜色', plainColor: '空心颜色', + imageText: '图文', }, 'en-US': { tag: 'Tag', @@ -32,6 +33,7 @@ const TagDemo = () => { backgroundColor: 'Background Color', textColor: 'Text Color', plainColor: 'Plain Color', + imageText: 'image-text', }, }) return ( @@ -127,6 +129,22 @@ const TagDemo = () => { } /> +

    {translated.imageText}

    + +
    + + {translated.tag} +
    + + } + />
    ) diff --git a/src/packages/tag/demo.tsx b/src/packages/tag/demo.tsx index d074207f03..7d36f503b9 100644 --- a/src/packages/tag/demo.tsx +++ b/src/packages/tag/demo.tsx @@ -18,6 +18,7 @@ const TagDemo = () => { backgroundColor: '背景颜色', textColor: '文字颜色', plainColor: '空心颜色', + imageText: '图文', }, 'en-US': { tag: 'Tag', @@ -31,6 +32,7 @@ const TagDemo = () => { backgroundColor: 'Background Color', textColor: 'Text Color', plainColor: 'Plain Color', + imageText: 'image-text', }, }) return ( @@ -43,6 +45,7 @@ const TagDemo = () => { extra={{translated.tag}} /> {translated.tag}} /> + {translated.tag}} @@ -125,6 +128,22 @@ const TagDemo = () => { } /> +

    {translated.imageText}

    + +
    + + {translated.tag} +
    + + } + />
    ) diff --git a/src/packages/tag/doc.en-US.md b/src/packages/tag/doc.en-US.md index d2eddb69c2..0e9a7b70af 100644 --- a/src/packages/tag/doc.en-US.md +++ b/src/packages/tag/doc.en-US.md @@ -137,6 +137,35 @@ export default App; ::: +### image-text + +:::demo + +```tsx +import React from "react"; +import { Tag } from '@nutui/nutui-react'; + +const App = () => { + return ( + <> + +
    + + {translated.tag} +
    +
    + + ) +} +export default App; +``` + +::: + ## Tag ### Props diff --git a/src/packages/tag/doc.md b/src/packages/tag/doc.md index 063aebc19c..23a8fdb1fe 100644 --- a/src/packages/tag/doc.md +++ b/src/packages/tag/doc.md @@ -89,6 +89,35 @@ export default App; ::: +### 图文 + +:::demo + +```tsx +import React from "react"; +import { Tag } from '@nutui/nutui-react'; + +const App = () => { + return ( + <> + +
    + + {translated.tag} +
    +
    + + ) +} +export default App; +``` + +::: + ## Tag diff --git a/src/packages/tag/doc.taro.md b/src/packages/tag/doc.taro.md index 1eb5f805d4..f242356b30 100644 --- a/src/packages/tag/doc.taro.md +++ b/src/packages/tag/doc.taro.md @@ -89,6 +89,34 @@ export default App; ::: +### 自定义颜色 + +:::demo + +```tsx +import React from "react"; +import { Tag } from '@nutui/nutui-react-taro'; + +const App = () => { + return ( + <> + +
    + + {translated.tag} +
    +
    + + ) +} +export default App; +``` + +::: ## Tag From 52fd3e893c785ae06e1ffbd543fbd5923762a699 Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:56:55 +0800 Subject: [PATCH 027/275] fix: fix some components display bad with the white screen at taro when is development (#1852) --- .../calendarcard/calendarcard.taro.tsx | 4 +- src/packages/form/useform.taro.ts | 69 ++++++++++--------- src/packages/formitem/formitem.taro.tsx | 2 +- 3 files changed, 40 insertions(+), 35 deletions(-) diff --git a/src/packages/calendarcard/calendarcard.taro.tsx b/src/packages/calendarcard/calendarcard.taro.tsx index e9c03eefc3..2a552e3515 100644 --- a/src/packages/calendarcard/calendarcard.taro.tsx +++ b/src/packages/calendarcard/calendarcard.taro.tsx @@ -197,8 +197,8 @@ export const CalendarCard = React.forwardRef< const isActive = (day: CalendarCardDay) => { if (type === 'single' || type === 'multiple') { - for (const val of innerValue) { - if (isSameDay(day, val)) { + for (const val in innerValue) { + if (isSameDay(day, innerValue[val])) { return true } } diff --git a/src/packages/form/useform.taro.ts b/src/packages/form/useform.taro.ts index 373ed2a9ba..5cfc7a8334 100644 --- a/src/packages/form/useform.taro.ts +++ b/src/packages/form/useform.taro.ts @@ -104,9 +104,41 @@ class FormStore { } } + validateEntities = async (entity: FieldEntity, errs: any[]) => { + const { name, rules = [] } = entity.props + const descriptor: any = {} + if (rules.length) { + // 多条校验规则 + if (rules.length > 1) { + descriptor[name] = [] + rules.forEach((v: any) => { + descriptor[name].push(v) + }) + } else { + descriptor[name] = rules[0] + } + } + const validator = new Schema(descriptor) + // 此处合并无值message 没有意义? + // validator.messages() + try { + await validator.validate({ [name]: this.store?.[name] }) + } catch ({ errors }) { + if (errors) { + errs.push(...(errors as any[])) + this.errors[name] = errors + } + } finally { + if (!errs || errs.length === 0) { + this.errors[name] = [] + } + } + + entity.onStoreChange('validate') + } + validateFields = async (nameList?: NamePath[]) => { let filterEntities = [] - const errs = [] this.errors.length = 0 if (!nameList || nameList.length === 0) { filterEntities = this.fieldEntities @@ -115,37 +147,10 @@ class FormStore { nameList.includes(name) ) } - for (const entity of filterEntities) { - const { name, rules = [] } = entity.props - const descriptor: any = {} - if (rules.length) { - // 多条校验规则 - if (rules.length > 1) { - descriptor[name] = [] - rules.forEach((v: any) => { - descriptor[name].push(v) - }) - } else { - descriptor[name] = rules[0] - } - } - const validator = new Schema(descriptor) - // 此处合并无值message 没有意义? - // validator.messages() - try { - await validator.validate({ [name]: this.store?.[name] }) - } catch ({ errors }) { - if (errors) { - errs.push(...(errors as any[])) - this.errors[name] = errors - } - } finally { - if (!errs || errs.length === 0) { - this.errors[name] = [] - } - } - entity.onStoreChange('validate') - } + const errs: any[] = [] + filterEntities.forEach((entity) => { + this.validateEntities(entity, errs) + }) return errs } diff --git a/src/packages/formitem/formitem.taro.tsx b/src/packages/formitem/formitem.taro.tsx index 47cfa737b0..5ab185bd9e 100644 --- a/src/packages/formitem/formitem.taro.tsx +++ b/src/packages/formitem/formitem.taro.tsx @@ -4,7 +4,7 @@ import { Context } from '../form/context' import Cell from '@/packages/cell/index.taro' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { isForwardRefComponent } from '@/utils/is-forward-ref-component' -import { SECRET } from '@/packages/form/useform' +import { SECRET } from '@/packages/form/useform.taro' type TextAlign = | 'start' From 58996daa1acc44444397bc0631943e2ac184b982 Mon Sep 17 00:00:00 2001 From: oasis <12181600+oasis-cloud@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:57:13 +0800 Subject: [PATCH 028/275] chore(deps): update icons to v1.0.2 (#1853) --- .npmrc | 2 +- package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.npmrc b/.npmrc index 08b2f83185..0580b35957 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,3 @@ -registry=https://registry.npmmirror.com/ +registry=https://registry.npmjs.org/ engine-strict=true strict-peer-dependencies=false diff --git a/package.json b/package.json index 87fb408ebd..7716ccbd1d 100644 --- a/package.json +++ b/package.json @@ -92,8 +92,8 @@ }, "dependencies": { "@babel/runtime": "^7.21.0", - "@nutui/icons-react": "^1.0.1", - "@nutui/icons-react-taro": "^1.0.1", + "@nutui/icons-react": "^1.0.2", + "@nutui/icons-react-taro": "^1.0.2", "@nutui/touch-emulator": "^1.0.0", "@react-spring/web": "~9.6.1", "@use-gesture/react": "10.2.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bac8882017..34ac1626ec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,11 +16,11 @@ importers: specifier: ^7.21.0 version: 7.23.5 '@nutui/icons-react': - specifier: ^1.0.1 - version: 1.0.1 + specifier: ^1.0.2 + version: 1.0.2 '@nutui/icons-react-taro': - specifier: ^1.0.1 - version: 1.0.1 + specifier: ^1.0.2 + version: 1.0.2 '@nutui/touch-emulator': specifier: ^1.0.0 version: 1.0.0 @@ -2791,12 +2791,12 @@ packages: fastq: 1.15.0 dev: true - /@nutui/icons-react-taro@1.0.1: - resolution: {integrity: sha512-9eJqzv/a4JjyEm5Q64k4FAG9B4UmvQ9DGwtcC2apKTrJDCDJ+3XzEvTKIwYjCyatgW7FRwYwOA0wTmHhXxSzYw==} + /@nutui/icons-react-taro@1.0.2: + resolution: {integrity: sha512-qn5rBdsPleejZ+5u/gTUoi9vPY32UCTnpxuArha1ZL7LS+kk/5E1ECKLDv0Sh5q87PaCpYfe9wMyGENREnHBgw==} dev: false - /@nutui/icons-react@1.0.1: - resolution: {integrity: sha512-i7Y4Z8/n/nij4da8/GfHgMYaro8+4N/27cxlE6hMtUErzYbf/iBQbgzeqbF/9l6pSWi2cH22PMWBJY2NT/YBAw==} + /@nutui/icons-react@1.0.2: + resolution: {integrity: sha512-hyjErskjGGqe5ROrb9z5yauBvHYUQQOLQnPDPqvwN210YR8ARwcBpnW+kUvCw/3ONZuS8Vgh+3CA+SM1qip5/Q==} dev: false /@nutui/touch-emulator@1.0.0: From 2ab340018bf3e70812b95e41239cd7e8f6be265a Mon Sep 17 00:00:00 2001 From: "Alex.huxiyang" <99181718+Alexx12321@users.noreply.github.com> Date: Fri, 12 Jan 2024 11:05:39 +0800 Subject: [PATCH 029/275] feat(space): update demos and docs of justify and align (#1856) --- src/packages/space/demo.taro.tsx | 19 +++++++++++ src/packages/space/demo.tsx | 27 ++++++++++++++++ src/packages/space/doc.en-US.md | 54 ++++++++++++++++++++++++++++++-- src/packages/space/doc.md | 42 +++++++++++++++++++++++++ src/packages/space/doc.taro.md | 52 +++++++++++++++++++++++++++++- src/packages/space/doc.zh-TW.md | 52 +++++++++++++++++++++++++++++- 6 files changed, 242 insertions(+), 4 deletions(-) diff --git a/src/packages/space/demo.taro.tsx b/src/packages/space/demo.taro.tsx index 84175b2c0f..3edc3e4788 100644 --- a/src/packages/space/demo.taro.tsx +++ b/src/packages/space/demo.taro.tsx @@ -112,6 +112,25 @@ const SpaceDemo = () => { + +

    主轴对齐方式

    + + + + + + + + + +

    交叉轴对齐方式

    + + + + + + +
    ) diff --git a/src/packages/space/demo.tsx b/src/packages/space/demo.tsx index 3aa7dd1b98..32d67fc2c0 100644 --- a/src/packages/space/demo.tsx +++ b/src/packages/space/demo.tsx @@ -18,6 +18,8 @@ interface T extends Button { wrap: string direction: string spaceGap: string + mainAxisAlign: string + crossAxisAlign: string } const SpaceDemo = () => { const [translated] = useTranslate({ @@ -32,6 +34,8 @@ const SpaceDemo = () => { button4: '按钮4', button5: '按钮5', button6: '按钮6', + mainAxisAlign: '主轴对齐方式', + crossAxisAlign: '交叉轴对齐方式', }, 'zh-TW': { basic: '基本用法', @@ -44,6 +48,8 @@ const SpaceDemo = () => { button4: '按钮4', button5: '按钮5', button6: '按钮6', + mainAxisAlign: '主軸對齊方式', + crossAxisAlign: '交叉軸對齊方式', }, 'en-US': { basic: 'Basic Usage', @@ -56,6 +62,8 @@ const SpaceDemo = () => { button4: 'button4', button5: 'button5', button6: 'button6', + mainAxisAlign: 'MainAxis Alignment', + crossAxisAlign: 'CrossAxis Alignment', }, }) @@ -106,6 +114,25 @@ const SpaceDemo = () => { + +

    {translated.mainAxisAlign}

    + + + + + + + + + +

    {translated.crossAxisAlign}

    + + + + + + +
    ) diff --git a/src/packages/space/doc.en-US.md b/src/packages/space/doc.en-US.md index 0fc9608618..9ca6bdd3a1 100644 --- a/src/packages/space/doc.en-US.md +++ b/src/packages/space/doc.en-US.md @@ -4,7 +4,7 @@ Maintain the same width in the arrangement of elements. -## Install +## Install ```tsx import { Space } from '@nutui/nutui-react'; @@ -33,7 +33,9 @@ import { Space, Button } from '@nutui/nutui-react'; export default App; ``` + ::: + ### Wrap :::demo @@ -57,7 +59,9 @@ const App = () => { export default App; ``` + ::: + ### Direction :::demo @@ -78,7 +82,9 @@ const App = () => { export default App; ``` + ::: + ### Gap :::demo @@ -105,7 +111,51 @@ const App = () => { export default App; ``` + +### MainAxis alignment + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + +### CrossAxis alignment + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + ::: + ## Space ### Props @@ -126,4 +176,4 @@ to [ConfigProvider component](#/en-US/component/configprovider). | Name | Description | Default | | --- | --- |--------------| -| \--nutui-space-gap | `8px` | spacing size | \ No newline at end of file +| \--nutui-space-gap | `8px` | spacing size | diff --git a/src/packages/space/doc.md b/src/packages/space/doc.md index 8253ac0b72..12f0281ced 100644 --- a/src/packages/space/doc.md +++ b/src/packages/space/doc.md @@ -112,6 +112,48 @@ export default App; ``` +### 主轴对齐方式 + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + +### 交叉轴对齐方式 + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + ::: ## Space diff --git a/src/packages/space/doc.taro.md b/src/packages/space/doc.taro.md index caaa2475cc..c5d26cceed 100644 --- a/src/packages/space/doc.taro.md +++ b/src/packages/space/doc.taro.md @@ -33,7 +33,9 @@ import { Space, Button } from '@nutui/nutui-react-taro'; export default App; ``` + ::: + ### 换行 :::demo @@ -57,7 +59,9 @@ const App = () => { export default App; ``` + ::: + ### 垂直 :::demo @@ -78,7 +82,9 @@ const App = () => { export default App; ``` + ::: + ### 间距大小 :::demo @@ -105,7 +111,51 @@ const App = () => { export default App; ``` + +### 主轴对齐方式 + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react-taro'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + +### 交叉轴对齐方式 + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react-taro'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + ::: + ## Space ### Props @@ -125,4 +175,4 @@ export default App; | 名称 | 默认值 | 描述 | | --- | --- | --- | -| \--nutui-space-gap | `8px` | 间距大小 | \ No newline at end of file +| \--nutui-space-gap | `8px` | 间距大小 | diff --git a/src/packages/space/doc.zh-TW.md b/src/packages/space/doc.zh-TW.md index e5f0b2a676..86dc032782 100644 --- a/src/packages/space/doc.zh-TW.md +++ b/src/packages/space/doc.zh-TW.md @@ -33,7 +33,9 @@ import { Space, Button } from '@nutui/nutui-react'; export default App; ``` + ::: + ### 換行 :::demo @@ -57,7 +59,9 @@ const App = () => { export default App; ``` + ::: + ### 垂直 :::demo @@ -78,7 +82,9 @@ const App = () => { export default App; ``` + ::: + ### 間距大小 :::demo @@ -105,7 +111,51 @@ const App = () => { export default App; ``` + +### 主軸對齊方式 + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + +### 交叉軸對齊方式 + +:::demo + +```tsx +import React from 'react'; +import { Space, Button } from '@nutui/nutui-react'; + +const App = () => { + return ( + + + + + + ); +}; +export default App; + +``` + ::: + ## Space ### Props @@ -125,4 +175,4 @@ export default App; | 名稱 | 默認值 | 說明 | | --- | --- | --- | -| \--nutui-space-gap | `8px` | 间距大小 | \ No newline at end of file +| \--nutui-space-gap | `8px` | 间距大小 | From 2bccea486aa6ea0e5634d525da6118e8e0b10486 Mon Sep 17 00:00:00 2001 From: oasis-cloud Date: Fri, 12 Jan 2024 15:53:06 +0800 Subject: [PATCH 030/275] chore(release): v2.3.6 --- CHANGELOG.md | 11 +++++++++++ package.json | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8ac4e1c3b..08d7e1c2a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# v2.3.6 +`2024-01-12` + +* :sparkles: feat(space): update demos and docs of justify and align (#1856) @Alex.huxiyang +* :sparkles: feat(tag): image text (#1851) @oasis +* :sparkles: feat: doc文档优化 (#1850) @Alex.huxiyang +* :bug: fix(swiper): fix props of saving image at taro, fix parameter of onChange, update taro version to 3.6.22 (#1847) @xiaoyatong +* :bug: fix: fix some components display bad with the white screen at taro when is development (#1852) @xiaoyatong +* 🔨 chore(deps): update icons to v1.0.2 (#1853) @oasis + + # v2.3.5 `2024-01-05` diff --git a/package.json b/package.json index 7716ccbd1d..8c9191a561 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@nutui/nutui-react", - "version": "2.3.5", + "name": "@nutui/nutui-react-taro", + "version": "2.3.6", "style": "dist/style.css", "main": "dist/nutui.react.umd.js", "module": "dist/esm/nutui-react.es.js", From 84729039aa28f50f080d9fd3edef63c5481c15cf Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:36:01 +0800 Subject: [PATCH 031/275] fix(uploader): fix the styles when custom progress (#1863) --- src/packages/uploader/demo.taro.tsx | 17 +++-------------- src/packages/uploader/demo.tsx | 8 ++------ src/packages/uploader/preview.taro.tsx | 2 +- src/packages/uploader/preview.tsx | 2 +- src/packages/uploader/uploader.scss | 10 ++++------ 5 files changed, 11 insertions(+), 28 deletions(-) diff --git a/src/packages/uploader/demo.taro.tsx b/src/packages/uploader/demo.taro.tsx index 9ffbfe0407..23207f4d36 100644 --- a/src/packages/uploader/demo.taro.tsx +++ b/src/packages/uploader/demo.taro.tsx @@ -25,7 +25,6 @@ interface T { uploadProgressAction: string '84aa6bce': string uploadListDefault: string - uploadListShow: string uploadDefaultProgress: string a4afedb5: string '37c65f47': string @@ -46,7 +45,7 @@ interface T { const UploaderDemo = () => { const [translated] = useTranslate({ 'zh-CN': { - '6114cef1': '文件文件文件文件1.png', + '6114cef1': '文件文件文件文件1文件文件文件文件1文件文件文件文件1.png', '844759c9': '上传成功', df9128ec: '文件2.png', '219481a6': '上传失败', @@ -58,7 +57,6 @@ const UploaderDemo = () => { uploadProgressAction: 'progress事件触发', '84aa6bce': '基础用法', uploadListDefault: '基础用法-上传列表展示', - uploadListShow: '自定义上传按钮', uploadDefaultProgress: '自定义上传使用默认进度条', a4afedb5: '上传状态', '37c65f47': '自定义上传样式', @@ -88,7 +86,6 @@ const UploaderDemo = () => { uploadProgressAction: 'progress事件觸發', '84aa6bce': '基础用法', uploadListDefault: '基础用法-上傳列表展示', - uploadListShow: '自定義上傳按钮', uploadDefaultProgress: '自定義上傳使用默認進度條', a4afedb5: '上傳狀態', '37c65f47': '自定義上傳樣式', @@ -118,7 +115,6 @@ const UploaderDemo = () => { uploadProgressAction: 'The progress event is triggered', '84aa6bce': 'Basic usage', uploadListDefault: 'Basic usage - upload list dispaly', - uploadListShow: 'Custom Upload Area', uploadDefaultProgress: 'Custom upload uses default progress bar', a4afedb5: 'Upload status', '37c65f47': 'Customize the upload style', @@ -290,7 +286,7 @@ const UploaderDemo = () => { uploadIcon={} /> -

    {translated.uploadListShow}

    +

    {translated.uploadListDefault}

    { -

    {translated['37c65f47']}

    - - - -

    {translated.uploadDefaultProgress}

    diff --git a/src/packages/shortpassword/demo.tsx b/src/packages/shortpassword/demo.tsx index fd63e4b468..ad2b7f5845 100644 --- a/src/packages/shortpassword/demo.tsx +++ b/src/packages/shortpassword/demo.tsx @@ -79,6 +79,7 @@ const ShortPasswordDemo = () => { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} />

    {translated.displayPlain}

    @@ -93,6 +94,7 @@ const ShortPasswordDemo = () => { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} />

    {translated.displayButton}

    @@ -118,6 +120,7 @@ const ShortPasswordDemo = () => { onChange={(value) => setValue(value)} onConfirm={() => setVisible3(false)} onCancel={() => setVisible3(false)} + onComplete={() => setVisible(false)} />

    {translated.customLength}

    @@ -131,6 +134,7 @@ const ShortPasswordDemo = () => { setValue0('') }} onChange={(value) => setValue0(value)} + onComplete={() => setVisible0(false)} length={4} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} onTips={() => onTips()} /> @@ -168,6 +173,7 @@ const ShortPasswordDemo = () => { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} autoFocus />
    diff --git a/src/packages/shortpassword/doc.en-US.md b/src/packages/shortpassword/doc.en-US.md index e7f5b6ce11..a691ddb1e9 100644 --- a/src/packages/shortpassword/doc.en-US.md +++ b/src/packages/shortpassword/doc.en-US.md @@ -42,6 +42,7 @@ const App = () => { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { onChange={(value) => setValue(value)} onConfirm={() => setVisible3(false)} onCancel={() => setVisible3(false)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} length={4} /> { }} onChange={(value) => setValue(value)} onTips={() => onTips()} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} autoFocus /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { onChange={(value) => setValue(value)} onConfirm={() => setVisible3(false)} onCancel={() => setVisible3(false)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} length={4} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} onTips={() => onTips()} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} autoFocus /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { onChange={(value) => setValue(value)} onConfirm={() => setVisible3(false)} onCancel={() => setVisible3(false)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} length={4} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} onTips={() => onTips()} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} autoFocus /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} /> { onChange={(value) => setValue(value)} onConfirm={() => setVisible3(false)} onCancel={() => setVisible3(false)} + onComplete={() => setVisible(false)} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} length={4} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} onTips={() => onTips()} /> { setValue('') }} onChange={(value) => setValue(value)} + onComplete={() => setVisible(false)} autoFocus /> void` | `-` | | onFocus | 輸入框聚焦 | `() => void` | `-` | -## 主題定制 +## 主題定製 ### 樣式變量 From c1e9afc53349d85c630552066304bee709775560 Mon Sep 17 00:00:00 2001 From: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:52:59 +0800 Subject: [PATCH 033/275] fix(table): fixed sticky css (#1866) --- src/packages/table/demo.taro.tsx | 35 ++++-------- src/packages/table/demo.tsx | 31 ++++------ src/packages/table/doc.en-US.md | 9 +-- src/packages/table/doc.md | 11 +--- src/packages/table/doc.taro.md | 9 +-- src/packages/table/doc.zh-TW.md | 95 ++++++++++++++----------------- src/packages/table/table.scss | 13 ++++- src/packages/table/table.taro.tsx | 9 ++- src/packages/table/table.tsx | 9 ++- 9 files changed, 96 insertions(+), 125 deletions(-) diff --git a/src/packages/table/demo.taro.tsx b/src/packages/table/demo.taro.tsx index e86875e24c..75861ac023 100644 --- a/src/packages/table/demo.taro.tsx +++ b/src/packages/table/demo.taro.tsx @@ -1,8 +1,8 @@ import React, { useState } from 'react' import Taro from '@tarojs/taro' import { Star, TriangleDown } from '@nutui/icons-react-taro' -import { useTranslate } from '@/sites/assets/locale/taro' import { Button, Toast, Table } from '@/packages/nutui.react.taro' +import { useTranslate } from '@/sites/assets/locale/taro' import Header from '@/sites/components/header' import { TableColumnProps } from './types' @@ -64,7 +64,7 @@ const TableDemo = () => { }, }) - const [columns1, setColumns1] = useState>([ + const [columns1] = useState>([ { title: 'ID', key: 'id', @@ -92,7 +92,7 @@ const TableDemo = () => { key: 'record', }, ]) - const [columns2, setColumns2] = useState>([ + const [columns2] = useState>([ { title: '姓名', key: 'name', @@ -108,7 +108,7 @@ const TableDemo = () => { }, ]) - const [columns4, setColumns4] = useState>([ + const [columns4] = useState>([ { title: '姓名', key: 'name', @@ -128,7 +128,7 @@ const TableDemo = () => { }, ]) - const [columns5, setColumns5] = useState>([ + const [columns5] = useState>([ { title: '姓名', key: 'name', @@ -152,7 +152,7 @@ const TableDemo = () => { }, ]) - const [columns6, setColumns6] = useState>([ + const [columns6] = useState>([ { title: '姓名', key: 'name', @@ -176,9 +176,7 @@ const TableDemo = () => { }, ]) - const [columnsStickRight, setColumnsStickRight] = useState< - Array - >([ + const [columnsStickRight] = useState>([ { title: '姓名', key: 'name', @@ -204,24 +202,16 @@ const TableDemo = () => { title: '年龄', key: 'age', fixed: 'right', - width: 100, - render: () => { - return ( - - ) - }, + width: 60, }, ]) - const [columnsStickLeft, setColumnsStickLeft] = useState< - Array - >([ + const [columnsStickLeft] = useState>([ { title: '姓名', key: 'name', align: 'center', + fixed: 'left', width: 100, }, { @@ -242,11 +232,11 @@ const TableDemo = () => { { title: '年龄', key: 'age', - width: 100, + width: 60, }, ]) - const [data1, setData1] = useState([ + const [data1] = useState([ { name: 'Tom', sex: '男', @@ -275,7 +265,6 @@ const TableDemo = () => { return ( - ) - }, + width: 60, }, ]) - const [columnsStickLeft, setColumnsStickLeft] = useState< - Array - >([ + const [columnsStickLeft] = useState>([ { title: '姓名', key: 'name', @@ -243,11 +232,11 @@ const TableDemo = () => { { title: '年龄', key: 'age', - width: 100, + width: 60, }, ]) - const [data1, setData1] = useState([ + const [data1] = useState([ { name: 'Tom', sex: '男', diff --git a/src/packages/table/doc.en-US.md b/src/packages/table/doc.en-US.md index d9bd8cecfd..881ff0a836 100644 --- a/src/packages/table/doc.en-US.md +++ b/src/packages/table/doc.en-US.md @@ -922,14 +922,7 @@ const App = () => { title: '年龄', key: 'age', fixed: 'right', - width: 100, - render: () => { - return ( - - ) - }, + width: 60, }, ]) diff --git a/src/packages/table/doc.md b/src/packages/table/doc.md index 21fe5da73f..1ac2ea1c43 100644 --- a/src/packages/table/doc.md +++ b/src/packages/table/doc.md @@ -845,7 +845,7 @@ const App = () => { { title: '年龄', key: 'age', - width: 100, + width: 60, }, ]) @@ -931,14 +931,7 @@ const App = () => { title: '年龄', key: 'age', fixed: 'right', - width: 100, - render: () => { - return ( - - ) - }, + width: 60 }, ]) diff --git a/src/packages/table/doc.taro.md b/src/packages/table/doc.taro.md index 003ccc040c..d76db4542f 100644 --- a/src/packages/table/doc.taro.md +++ b/src/packages/table/doc.taro.md @@ -933,14 +933,7 @@ const App = () => { title: '年龄', key: 'age', fixed: 'right', - width: 100, - render: () => { - return ( - - ) - }, + width: 60, }, ]) diff --git a/src/packages/table/doc.zh-TW.md b/src/packages/table/doc.zh-TW.md index 85e14a594d..7b119d97dc 100644 --- a/src/packages/table/doc.zh-TW.md +++ b/src/packages/table/doc.zh-TW.md @@ -2,7 +2,7 @@ ## 介紹 -用於展示基礎錶格 +用於展示基礎表格 ## 安裝 @@ -53,7 +53,7 @@ const App = () => { }, }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -111,7 +111,7 @@ const App = () => { key: 'sex', }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -179,7 +179,7 @@ const App = () => { }, }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -247,7 +247,7 @@ const App = () => { }, }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -281,7 +281,7 @@ export default App; ::: -### 隱藏錶頭 +### 隱藏表頭 :::demo @@ -315,7 +315,7 @@ const App = () => { }, }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -383,7 +383,7 @@ const App = () => { }, }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -427,7 +427,7 @@ const App = () => { key: 'sex', }, { - title: '學歴', + title: '學歷', key: 'record', }, { @@ -531,7 +531,7 @@ const App = () => { }, }, { - title: '學歴', + title: '學歷', key: 'record', }, ]) @@ -589,7 +589,7 @@ const App = () => { key: 'sex', }, { - title: '學歴', + title: '學歷', key: 'record', }, { @@ -660,7 +660,7 @@ const App = () => { key: 'sex', }, { - title: '學歴', + title: '學歷', key: 'record', }, { @@ -689,10 +689,7 @@ export default App; ::: - -::: - -### 固定錶頭 +### 固定表頭 :::demo @@ -705,7 +702,7 @@ const App = () => { { name: 'Tom', sex: '男', - record: '小学', + record: '小學', birthday: '2010-01-01', age: 10, }, @@ -733,7 +730,7 @@ const App = () => { { name: 'Frank', sex: '男', - record: '幼儿园', + record: '幼兒園', birthday: '2020-01-01', age: 3, }, @@ -746,11 +743,11 @@ const App = () => { align: 'center', }, { - title: '性别', + title: '性別', key: 'sex', }, { - title: '学历', + title: '學歷', key: 'record', }, { @@ -758,7 +755,7 @@ const App = () => { key: 'birthday', }, { - title: '年龄', + title: '年齡', key: 'age', }, ]) @@ -786,7 +783,7 @@ const App = () => { { name: 'Tom', sex: '男', - record: '小学', + record: '小學', birthday: '2010-01-01', age: 10, }, @@ -814,7 +811,7 @@ const App = () => { { name: 'Frank', sex: '男', - record: '幼儿园', + record: '幼兒園', birthday: '2020-01-01', age: 3, }, @@ -831,12 +828,12 @@ const App = () => { width: 100, }, { - title: '性别', + title: '性別', key: 'sex', width: 60, }, { - title: '学历', + title: '學歷', key: 'record', width: 100, }, @@ -846,9 +843,9 @@ const App = () => { width: 100, }, { - title: '年龄', + title: '年齡', key: 'age', - width: 100, + width: 60, }, ]) @@ -872,7 +869,7 @@ const App = () => { { name: 'Tom', sex: '男', - record: '小学', + record: '小學', birthday: '2010-01-01', age: 10, }, @@ -900,7 +897,7 @@ const App = () => { { name: 'Frank', sex: '男', - record: '幼儿园', + record: '幼兒園', birthday: '2020-01-01', age: 3, }, @@ -916,12 +913,12 @@ const App = () => { width: 100, }, { - title: '性别', + title: '性別', key: 'sex', width: 60, }, { - title: '学历', + title: '學歷', key: 'record', width: 100, }, @@ -931,17 +928,10 @@ const App = () => { width: 100, }, { - title: '年龄', + title: '年齡', key: 'age', fixed: 'right', - width: 100, - render: () => { - return ( - - ) - }, + width: 60 }, ]) @@ -959,11 +949,11 @@ export default App; | 屬性 | 說明 | 類型 | 默認值 | | --- | --- | --- | --- | | bordered | 是否顯示邊框 | `boolean` | `true` | -| columns | 錶頭數據 | `TableColumnProps[]` | `[]` | -| data | 錶格數據 | `Object[]` | `[]` | +| columns | 表頭數據 | `TableColumnProps[]` | `[]` | +| data | 表格數據 | `Object[]` | `[]` | | summary | 是否顯示簡介 | `ReactNode` | `-` | | striped | 條紋是否明暗交替 | `boolean` | `false` | -| showHeader | 是否顯示錶頭 | `boolean` | `true` | +| showHeader | 是否顯示表頭 | `boolean` | `true` | | noData | 自定義無數據 | `ReactNode` | `-` | | onSort | 點擊排序按鈕觸發 | `item: TableColumnProps, data: Array` | `-` | @@ -972,16 +962,15 @@ export default App; | 屬性 | 說明 | 類型 | 默認值 | | --- | --- | --- | --- | | key | 列的唯一標識 | `string` | `-` | -| title | 錶頭標題 | `string` | `-` | +| title | 表頭標題 | `string` | `-` | | align | 列的對齊方式 | `left` \| `center` \| `right` | `left` | -| sorter | 排序,可選值有 true,function, default, 其中 default錶示點擊之後可能會依賴接口, function可以返回具體的排序函數, default錶示採用默認的排序算法 | `boolean` \| `Function` \| `string` | `-` | +| sorter | 排序,可選值有 true,function, default, 其中 default表示點擊之後可能會依賴接口, function可以返回具體的排序函數, default表示采用默認的排序算法 | `boolean` \| `Function` \| `string` | `-` | | render | 自定義渲染列數據,優先級高 | `Function(record)` | `-` | | sorterIcon | 排序 icon | `ReactNode` | `` | | width | 列寬度 | `number` | `auto` | | fixed | 固定位置 | `left` \| `right` | `-` | - -## 主題定制 +## 主題定製 ### 樣式變量 @@ -989,9 +978,9 @@ export default App; | 名稱 | 說明 | 默認值 | | --- | --- | --- | -| \--nutui-table-border-color | 錶格的邊框色值 | `#ececec` | -| \--nutui-table-cols-padding | 錶格列的padding值 | `10px` | -| \--nutui-table-tr-even-background-color | 錶格偶數行的背景色 | `$color-background` | -| \--nutui-table-tr-odd-background-color | 錶格奇數行的背景色 | `$white` | -| \--nutui-table-sticky-left-shadow | 錶格左側固定陰影 | `4px 0 8px 0 rgba(0, 0, 0, 0.1)` | -| \--nutui-table-sticky-right-shadow | 錶格右側固定陰影 | `-4px 0 8px 0 rgba(0, 0, 0, 0.1)` | \ No newline at end of file +| \--nutui-table-border-color | 表格的邊框色值 | `#ececec` | +| \--nutui-table-cols-padding | 表格列的padding值 | `10px` | +| \--nutui-table-tr-even-background-color | 表格偶數行的背景色 | `$color-background` | +| \--nutui-table-tr-odd-background-color | 表格奇數行的背景色 | `$white` | +| \--nutui-table-sticky-left-shadow | 表格左側固定陰影 | `4px 0 8px 0 rgba(0, 0, 0, 0.1)` | +| \--nutui-table-sticky-right-shadow | 表格右側固定陰影 | `-4px 0 8px 0 rgba(0, 0, 0, 0.1)` | \ No newline at end of file diff --git a/src/packages/table/table.scss b/src/packages/table/table.scss index 68983128cf..5b7eb4e71d 100644 --- a/src/packages/table/table.scss +++ b/src/packages/table/table.scss @@ -8,9 +8,14 @@ flex-direction: column; font-size: $font-size-base; color: $color-title; - overflow: auto; + overflow-y: auto; + overflow-x: hidden; position: relative; border: 1px solid $table-border-color; + + &-sticky { + overflow-x: auto; + } } &-main { @@ -61,6 +66,7 @@ &-th { display: table-cell; padding: $table-cols-padding; + table-layout: fixed; background: inherit; position: sticky; top: 0; @@ -77,6 +83,7 @@ &-td { display: table-cell; padding: $table-cols-padding; + table-layout: fixed; background: inherit; &:last-child { @@ -149,6 +156,10 @@ &-fixed-right { position: sticky; z-index: 2; + &.h5-div { + // 临时方案,小程序下,width包含了padding值。 + padding: $table-cols-padding 0; + } } &-fixed-left-last { border-right: none; diff --git a/src/packages/table/table.taro.tsx b/src/packages/table/table.taro.tsx index c4ddc58fc2..e7d419097c 100644 --- a/src/packages/table/table.taro.tsx +++ b/src/packages/table/table.taro.tsx @@ -154,7 +154,14 @@ export const Table: FunctionComponent< return (
    -
    +
    -
    +
    Date: Wed, 17 Jan 2024 16:53:20 +0800 Subject: [PATCH 034/275] feat: support debugging RTL in the H5 development environment (#1865) Co-authored-by: xiaoyatong <84436086+xiaoyatong@users.noreply.github.com> --- demo.html | 2 +- package.json | 2 ++ pnpm-lock.yaml | 24 ++++++++++++++++++++++++ vite.config.ts | 10 +++++++--- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/demo.html b/demo.html index 9161262071..1c4700ecf7 100644 --- a/demo.html +++ b/demo.html @@ -1,5 +1,5 @@ - + diff --git a/package.json b/package.json index 8c9191a561..4a3606a99f 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "generate:themes-dev": "node scripts/generate-themes-dev.js", "checked": "npm run generate:file && tsc --project ./tsconfig.h5.json", "dev": "vite --open --force", + "dev:rtl": "VITE_RTL=rtl vite --open --force", "dev:jmapp": "VITE_APP_PROJECT_ID=jmapp vite --open --force", "dev:theme": "npm run generate:themes-dev && npm run checked && vite --force --config vite.config.theme.ts", "replace:scss": "node scripts/replace-scss-alias.js", @@ -173,6 +174,7 @@ "postcss": "^8.4.21", "postcss-import": "^15.0.0", "postcss-modules": "^6.0.0", + "postcss-rtlcss": "^5.1.0", "prettier": "^3.0.0", "react": "^18.2.0", "react-color": "^2.19.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34ac1626ec..1afce6a7e0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -253,6 +253,9 @@ importers: postcss-modules: specifier: ^6.0.0 version: 6.0.0(postcss@8.4.32) + postcss-rtlcss: + specifier: ^5.1.0 + version: 5.1.0(postcss@8.4.32) prettier: specifier: ^3.0.0 version: 3.1.0 @@ -14686,6 +14689,16 @@ packages: resolution: {integrity: sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==} dev: true + /postcss-rtlcss@5.1.0(postcss@8.4.32): + resolution: {integrity: sha512-FjZ8HPwr6dWR1Jzzz+TZqkEhkfLiR7sKgsHTDqrYGd51KtZdaDpdJ5aqHmqWoXZsSyJgBIkwZPt5JoEPvkX3Nw==} + engines: {node: '>=18.0.0'} + peerDependencies: + postcss: ^8.4.21 + dependencies: + postcss: 8.4.32 + rtlcss: 4.1.1 + dev: true + /postcss-safe-parser@7.0.0(postcss@8.4.32): resolution: {integrity: sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==} engines: {node: '>=18.0'} @@ -15786,6 +15799,17 @@ packages: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} dev: true + /rtlcss@4.1.1: + resolution: {integrity: sha512-/oVHgBtnPNcggP2aVXQjSy6N1mMAfHg4GSag0QtZBlD5bdDgAHwr4pydqJGd+SUCu9260+Pjqbjwtvu7EMH1KQ==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + escalade: 3.1.1 + picocolors: 1.0.0 + postcss: 8.4.32 + strip-json-comments: 3.1.1 + dev: true + /run-applescript@5.0.0: resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} engines: {node: '>=12'} diff --git a/vite.config.ts b/vite.config.ts index 992699cf87..0ffe6d33fa 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from 'vite' import reactRefresh from '@vitejs/plugin-react' import path from 'path' import atImport from 'postcss-import' +import rtl from 'postcss-rtlcss' const projectID = process.env.VITE_APP_PROJECT_ID @@ -28,9 +29,12 @@ export default defineConfig({ // dont need include file extend .scss additionalData: fileStr, }, - postcss: { - plugins: [atImport({ path: path.join(__dirname, 'src`') })], - }, + }, + postcss: { + plugins: [ + atImport({ path: path.join(__dirname, 'src') }), + process.env.VITE_RTL === 'rtl' ? rtl() : () => {}, + ], }, }, plugins: [reactRefresh()], From 6af370afcb3502eb86a5c3f7ca5f2b65074ce9e1 Mon Sep 17 00:00:00 2001 From: songsong <353833373@qq.com> Date: Wed, 17 Jan 2024 20:09:37 +0800 Subject: [PATCH 035/275] =?UTF-8?q?fix(tabs):=20=E7=BA=B5=E5=90=91?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=9C=AA=E5=AF=B9=E9=BD=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1868)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(tabs): 纵向图标未对齐问题 * fix(tabs): 纵向图标未对齐问题-taro同步 * fix(tabs): 溢出隐藏类名样式修改 --- src/packages/tabs/tabs.scss | 17 ++++++++++++++++- src/packages/tabs/tabs.taro.tsx | 12 ++++++++---- src/packages/tabs/tabs.tsx | 8 ++++---- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/packages/tabs/tabs.scss b/src/packages/tabs/tabs.scss index df6e225228..f19baeafdd 100644 --- a/src/packages/tabs/tabs.scss +++ b/src/packages/tabs/tabs.scss @@ -199,6 +199,12 @@ flex-direction: row; width: 100%; + .nut-tabs-ellipsis { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + .nut-tabs-titles { box-sizing: border-box; flex-direction: column; @@ -213,6 +219,12 @@ flex-direction: column; flex-shrink: 0; } + + &-line { + .nut-tabs-titles-item { + padding-left: 14px; + } + } } .nut-tabs-titles-scrollable { @@ -236,6 +248,9 @@ height: 0; transform: translate(0, -50%); transition: height 0.3s ease; + &-vertical { + top: 50%; + } } &-active { @@ -249,7 +264,7 @@ } .nut-tabs-titles-item-smile { - right: -6px; + right: -12px; bottom: -2%; left: auto; width: 40px; diff --git a/src/packages/tabs/tabs.taro.tsx b/src/packages/tabs/tabs.taro.tsx index 9b9773188b..d6ba66ddbd 100644 --- a/src/packages/tabs/tabs.taro.tsx +++ b/src/packages/tabs/tabs.taro.tsx @@ -281,7 +281,13 @@ export const Tabs: FunctionComponent> & { > {activeType === 'line' && ( )} @@ -295,9 +301,7 @@ export const Tabs: FunctionComponent> & { )} diff --git a/src/packages/tabs/tabs.tsx b/src/packages/tabs/tabs.tsx index 8a4db2003c..ff9304cf35 100644 --- a/src/packages/tabs/tabs.tsx +++ b/src/packages/tabs/tabs.tsx @@ -207,7 +207,9 @@ export const Tabs: FunctionComponent> & { > {activeType === 'line' && (
    )} @@ -221,9 +223,7 @@ export const Tabs: FunctionComponent> & { )}
    From 57c66f618956a812dc0d0be2daf895ef9ae2cf3f Mon Sep 17 00:00:00 2001 From: oasis <12181600+oasis-cloud@users.noreply.github.com> Date: Thu, 18 Jan 2024 09:33:51 +0800 Subject: [PATCH 036/275] demo(Avatar): add list display mode (#1862) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * demo: add list display mode * fix: 修改为独立 demo --- src/packages/avatar/demo.taro.tsx | 25 ++++++++++++++++++++++ src/packages/avatar/demo.tsx | 26 +++++++++++++++++++++++ src/packages/avatar/doc.en-US.md | 35 +++++++++++++++++++++++++++++-- src/packages/avatar/doc.md | 33 ++++++++++++++++++++++++++++- src/packages/avatar/doc.taro.md | 33 ++++++++++++++++++++++++++++- src/packages/avatar/doc.zh-TW.md | 33 ++++++++++++++++++++++++++++- 6 files changed, 180 insertions(+), 5 deletions(-) diff --git a/src/packages/avatar/demo.taro.tsx b/src/packages/avatar/demo.taro.tsx index 9f64a793f1..01d015d4fb 100644 --- a/src/packages/avatar/demo.taro.tsx +++ b/src/packages/avatar/demo.taro.tsx @@ -16,6 +16,9 @@ interface T { e981579e: string f645fc65: string '43f00872': string + f645fc66: string + f645fc67: string + f645fc68: string } const AvatarDemo = () => { const [translated] = useTranslate({ @@ -29,6 +32,9 @@ const AvatarDemo = () => { e981579e: '头像组合展现', f645fc65: '组合头像可控制层级方向', '43f00872': '点击头像触发事件', + f645fc66: '列表展示', + f645fc67: '标题', + f645fc68: '描述信息', }, 'zh-TW': { b040e71e: '觸發點擊頭像', @@ -40,6 +46,9 @@ const AvatarDemo = () => { e981579e: '頭像組合展現', f645fc65: '組合頭像可控制層級方向', '43f00872': '點擊頭像觸發事件', + f645fc66: '列表展示', + f645fc67: '標題', + f645fc68: '描述信息', }, 'en-US': { b040e71e: 'Trigger click on avatar', @@ -52,6 +61,9 @@ const AvatarDemo = () => { e981579e: 'Avatar combination display', f645fc65: 'Combining avatars to control hierarchy direction', '43f00872': 'Click on the avatar to trigger the event', + f645fc66: 'list', + f645fc67: 'Title', + f645fc68: 'Description', }, }) @@ -81,6 +93,7 @@ const AvatarDemo = () => { src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png" /> +

    {translated['3928b17e']}

    } shape="square" /> @@ -160,6 +173,18 @@ const AvatarDemo = () => { } onClick={activeAvatar} /> +

    {translated.f645fc66}

    + + +
    +
    {translated.f645fc67}
    +
    {translated.f645fc68}
    +
    +
    ) diff --git a/src/packages/avatar/demo.tsx b/src/packages/avatar/demo.tsx index 3622059671..33739015d5 100644 --- a/src/packages/avatar/demo.tsx +++ b/src/packages/avatar/demo.tsx @@ -17,7 +17,11 @@ interface T { e981579e: string f645fc65: string '43f00872': string + f645fc66: string + f645fc67: string + f645fc68: string } + const AvatarDemo = () => { const [translated] = useTranslate({ 'zh-CN': { @@ -30,6 +34,9 @@ const AvatarDemo = () => { e981579e: '头像组合展现', f645fc65: '组合头像可控制层级方向', '43f00872': '点击头像触发事件', + f645fc66: '列表展示', + f645fc67: '标题', + f645fc68: '描述信息', }, 'zh-TW': { b040e71e: '觸發點擊頭像', @@ -41,6 +48,9 @@ const AvatarDemo = () => { e981579e: '頭像組合展現', f645fc65: '組合頭像可控制層級方向', '43f00872': '點擊頭像觸發事件', + f645fc66: '列表展示', + f645fc67: '標題', + f645fc68: '描述信息', }, 'en-US': { b040e71e: 'Trigger click on avatar', @@ -53,6 +63,9 @@ const AvatarDemo = () => { e981579e: 'Avatar combination display', f645fc65: 'Combining avatars to control hierarchy direction', '43f00872': 'Click on the avatar to trigger the event', + f645fc66: 'list', + f645fc67: 'Title', + f645fc68: 'Description', }, }) @@ -77,6 +90,7 @@ const AvatarDemo = () => { src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png" /> +

    {translated['3928b17e']}

    } shape="square" /> @@ -156,6 +170,18 @@ const AvatarDemo = () => { } onClick={activeAvatar} /> +

    {translated.f645fc66}

    + + +
    +
    {translated.f645fc67}
    +
    {translated.f645fc68}
    +
    +
    ) diff --git a/src/packages/avatar/doc.en-US.md b/src/packages/avatar/doc.en-US.md index 854eeb7d1b..e70d93c019 100644 --- a/src/packages/avatar/doc.en-US.md +++ b/src/packages/avatar/doc.en-US.md @@ -20,7 +20,7 @@ Support three sizes:small、normal、large ```tsx import React from "react"; -import { Avatar } from '@nutui/nutui-react'; +import { Avatar, Cell } from '@nutui/nutui-react'; const App = () => { return ( @@ -36,7 +36,7 @@ const App = () => { + /> ) } @@ -237,6 +237,37 @@ export default App; ::: +### list + +:::demo + +```tsx +import React from "react"; +import { Avatar, Toast, Cell } from '@nutui/nutui-react'; +import { User } from '@nutui/icons-react'; + +const App = () => { + return ( + <> + + +
    +
    Title
    +
    Description
    +
    +
    + + ) +} +export default App; +``` + +::: + ## Avatar ### Props diff --git a/src/packages/avatar/doc.md b/src/packages/avatar/doc.md index cde7f9ba05..0e47aca059 100644 --- a/src/packages/avatar/doc.md +++ b/src/packages/avatar/doc.md @@ -21,7 +21,7 @@ import { Avatar } from '@nutui/nutui-react'; ```tsx import React from "react"; -import { Avatar } from '@nutui/nutui-react'; +import { Avatar, Cell } from '@nutui/nutui-react'; const App = () => { return ( @@ -240,6 +240,37 @@ export default App; ::: +### 列表展示 + +:::demo + +```tsx +import React from "react"; +import { Avatar, Toast, Cell } from '@nutui/nutui-react'; +import { User } from '@nutui/icons-react'; + +const App = () => { + return ( + <> + + +
    +
    标题
    +
    描述信息
    +
    +
    + + ) +} +export default App; +``` + +::: + ## Avatar ### Props diff --git a/src/packages/avatar/doc.taro.md b/src/packages/avatar/doc.taro.md index 90d0f15162..73488763f8 100644 --- a/src/packages/avatar/doc.taro.md +++ b/src/packages/avatar/doc.taro.md @@ -20,7 +20,7 @@ import { Avatar } from '@nutui/nutui-react-taro'; ```tsx import React from "react"; -import { Avatar } from '@nutui/nutui-react-taro'; +import { Avatar, Cell } from '@nutui/nutui-react-taro'; const App = () => { return ( @@ -238,6 +238,37 @@ export default App; ::: +### 列表展示 + +:::demo + +```tsx +import React from "react"; +import { Avatar, Toast, Cell } from '@nutui/nutui-react-taro'; +import { User } from '@nutui/icons-react-taro'; + +const App = () => { + return ( + <> + + +
    +
    标题
    +
    描述信息
    +
    +
    + + ) +} +export default App; +``` + +::: + ## Avatar ### Props diff --git a/src/packages/avatar/doc.zh-TW.md b/src/packages/avatar/doc.zh-TW.md index e991f6dd6d..ff895572a4 100644 --- a/src/packages/avatar/doc.zh-TW.md +++ b/src/packages/avatar/doc.zh-TW.md @@ -21,7 +21,7 @@ import { Avatar } from '@nutui/nutui-react'; ```tsx import React from "react"; -import { Avatar } from '@nutui/nutui-react'; +import { Avatar, Cell } from '@nutui/nutui-react'; const App = () => { return ( @@ -240,6 +240,37 @@ export default App; ::: +### 列表展示 + +:::demo + +```tsx +import React from "react"; +import { Avatar, Toast, Cell } from '@nutui/nutui-react'; +import { User } from '@nutui/icons-react'; + +const App = () => { + return ( + <> + + +
    +
    标题
    +
    描述信息
    +
    +
    + + ) +} +export default App; +``` + +::: + ## Avatar ### Props From 3a933ef5bdbd18a4825471725b6d7371295087b7 Mon Sep 17 00:00:00 2001 From: "Alex.huxiyang" <99181718+Alexx12321@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:36:42 +0800 Subject: [PATCH 037/275] =?UTF-8?q?=20fix(space):=20=E4=B8=BB/=E4=BA=A4?= =?UTF-8?q?=E5=8F=89=E8=BD=B4=E7=9A=84=20demo=20=E4=B8=8E=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E6=94=B9=E8=BF=9B=20(#1867)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: space demo优化 * fix: space demo简化与国际化优化 * fix: space demo边距、文档更新与规范 * fix: 去除冗余代码 --- src/packages/space/demo.taro.tsx | 83 ++++++++++++++++++++++---------- src/packages/space/demo.tsx | 40 ++++++++++++--- src/packages/space/doc.en-US.md | 48 ++++++++++++------ src/packages/space/doc.md | 48 ++++++++++++------ src/packages/space/doc.taro.md | 32 ++++++++---- src/packages/space/doc.zh-TW.md | 36 ++++++++++---- 6 files changed, 207 insertions(+), 80 deletions(-) diff --git a/src/packages/space/demo.taro.tsx b/src/packages/space/demo.taro.tsx index 3edc3e4788..5503f29700 100644 --- a/src/packages/space/demo.taro.tsx +++ b/src/packages/space/demo.taro.tsx @@ -22,6 +22,8 @@ interface T extends Button { wrap: string direction: string spaceGap: string + mainAxisAlign: string + crossAxisAlign: string } const SpaceDemo = () => { @@ -37,6 +39,8 @@ const SpaceDemo = () => { button4: '按钮4', button5: '按钮5', button6: '按钮6', + mainAxisAlign: '主轴对齐方式', + crossAxisAlign: '交叉轴对齐方式', }, 'zh-TW': { basic: '基本用法', @@ -49,6 +53,8 @@ const SpaceDemo = () => { button4: '按钮4', button5: '按钮5', button6: '按钮6', + mainAxisAlign: '主軸對齊方式', + crossAxisAlign: '交叉軸對齊方式', }, 'en-US': { basic: 'Basic Usage', @@ -61,6 +67,8 @@ const SpaceDemo = () => { button4: 'button4', button5: 'button5', button6: 'button6', + mainAxisAlign: 'MainAxis Alignment', + crossAxisAlign: 'CrossAxis Alignment', }, }) @@ -71,30 +79,30 @@ const SpaceDemo = () => {

    {translated.basic}

    - - - + + +

    {translated.wrap}

    - - - - - - + + + + + +

    {translated.direction}

    - - - + + + @@ -106,29 +114,54 @@ const SpaceDemo = () => { }} > - - - + + + -

    主轴对齐方式

    - +

    {translated.mainAxisAlign}

    - - - - + + +
    + + +
    +
    + + + +
    -

    交叉轴对齐方式

    +

    {translated.crossAxisAlign}

    - - - + +
    + + +
    +
    + + + +
    diff --git a/src/packages/space/demo.tsx b/src/packages/space/demo.tsx index 32d67fc2c0..fd041238b1 100644 --- a/src/packages/space/demo.tsx +++ b/src/packages/space/demo.tsx @@ -118,19 +118,45 @@ const SpaceDemo = () => {

    {translated.mainAxisAlign}

    - - - - + + +
    + + +
    +
    + + + +

    {translated.crossAxisAlign}

    - - - + +
    + + +
    +
    + + + +
    diff --git a/src/packages/space/doc.en-US.md b/src/packages/space/doc.en-US.md index 9ca6bdd3a1..ed24f48b45 100644 --- a/src/packages/space/doc.en-US.md +++ b/src/packages/space/doc.en-US.md @@ -112,6 +112,8 @@ export default App; ``` +::: + ### MainAxis alignment :::demo @@ -122,17 +124,26 @@ import { Space, Button } from '@nutui/nutui-react'; const App = () => { return ( - - - - - + + +
    + + +
    +
    + + + +
    +
    ); }; export default App; ``` +::: + ### CrossAxis alignment :::demo @@ -144,10 +155,17 @@ import { Space, Button } from '@nutui/nutui-react'; const App = () => { return ( - - - - + +
    + + +
    +
    + + + +
    + ); }; export default App; @@ -160,12 +178,12 @@ export default App; ### Props -| Property | Description | Type | Default | -| --- |------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------| -| direction | space direction | `vertical \| horizontal` | `horizontal` | -| align | space align | `start \| end \|center \| baseline` | `-` | -| justify | space justify | `start \| end \| center \| between \| around \| evenly \| stretch` | `-` | -| wrap | space wrap,Only valid when horizontal | `boolean` | `false` | +| Property | Description | Type | Default | +| --- | --- | --- | --- | +| direction | space direction | `vertical \| horizontal` | `horizontal` | +| align | space align | `start \| end \|center \| baseline` | `-` | +| justify | space justify | `start \| end \| center \| between \| around \| evenly \| stretch` | `-` | +| wrap | space wrap,Only valid when horizontal | `boolean` | `false` | ## Theming diff --git a/src/packages/space/doc.md b/src/packages/space/doc.md index 12f0281ced..9ee651285e 100644 --- a/src/packages/space/doc.md +++ b/src/packages/space/doc.md @@ -112,6 +112,8 @@ export default App; ``` +::: + ### 主轴对齐方式 :::demo @@ -122,17 +124,26 @@ import { Space, Button } from '@nutui/nutui-react'; const App = () => { return ( - - - - - + + +
    + + +
    +
    + + + +
    +
    ); }; export default App; ``` +::: + ### 交叉轴对齐方式 :::demo @@ -144,10 +155,17 @@ import { Space, Button } from '@nutui/nutui-react'; const App = () => { return ( - - - - + +
    + + +
    +
    + + + +
    + ); }; export default App; @@ -160,12 +178,12 @@ export default App; ### Props -| 属性 | 说明 | 类型 | 默认值 | -| --- |--------------------------|---------------------------------------------------------------------|--------------------------------| -| direction | 间距方向 | `vertical \| horizontal` | `horizontal` | -| align | 交叉轴对齐方式 | `start \| end \|center \| baseline` | `-` | -| justify | 主轴对齐方式 | `start \| end \| center \| between \| around \| evenly \| stretch` | `-` | -| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean` | `false` | +| 属性 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| direction | 间距方向 | `'vertical'| 'horizontal'` | `'horizontal'` | +| align | 交叉轴对齐方式 | `'start'|'end'|'center'|'baseline'` | `-` | +| justify | 主轴对齐方式 | `'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch'` | `-` | +| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean` | `false` | ## 主题定制 diff --git a/src/packages/space/doc.taro.md b/src/packages/space/doc.taro.md index c5d26cceed..f13581a6de 100644 --- a/src/packages/space/doc.taro.md +++ b/src/packages/space/doc.taro.md @@ -122,11 +122,18 @@ import { Space, Button } from '@nutui/nutui-react-taro'; const App = () => { return ( - - - - - + + +
    + + +
    +
    + + + +
    +
    ); }; export default App; @@ -144,10 +151,17 @@ import { Space, Button } from '@nutui/nutui-react-taro'; const App = () => { return ( - - - - + +
    + + +
    +
    + + + +
    + ); }; export default App; diff --git a/src/packages/space/doc.zh-TW.md b/src/packages/space/doc.zh-TW.md index 86dc032782..4eccd180c0 100644 --- a/src/packages/space/doc.zh-TW.md +++ b/src/packages/space/doc.zh-TW.md @@ -112,6 +112,8 @@ export default App; ``` +::: + ### 主軸對齊方式 :::demo @@ -122,17 +124,26 @@ import { Space, Button } from '@nutui/nutui-react'; const App = () => { return ( - - - - - + + +
    + + +
    +
    + + + +
    +
    ); }; export default App; ``` +::: + ### 交叉軸對齊方式 :::demo @@ -144,10 +155,17 @@ import { Space, Button } from '@nutui/nutui-react'; const App = () => { return ( - - - - + +
    + + +
    +
    + + + +
    + ); }; export default App; From 0982f8b7b9ff267177adf8ae63694e00962da61e Mon Sep 17 00:00:00 2001 From: songsong <353833373@qq.com> Date: Thu, 18 Jan 2024 16:25:57 +0800 Subject: [PATCH 038/275] =?UTF-8?q?fix(Textarea):=20=E6=96=87=E6=A1=A3demo?= =?UTF-8?q?=E4=B8=ADprops=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20(#1874)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/textarea/doc.md | 2 +- src/packages/textarea/doc.taro.md | 2 +- src/packages/textarea/doc.zh-TW.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/packages/textarea/doc.md b/src/packages/textarea/doc.md index 97f3ebbf72..8db9dfb52a 100644 --- a/src/packages/textarea/doc.md +++ b/src/packages/textarea/doc.md @@ -23,7 +23,7 @@ import { TextArea } from '@nutui/nutui-react'; const App = () => { return (