Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cp taro #2906

Merged
merged 3 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/packages/address/address.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ArrowLeft } from '@nutui/icons-react-taro'
import Popup from '@/packages/popup/index.taro'
import { ExistRender } from './existRender.taro'
import { CustomRender } from './customRender.taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { AddressList } from './types'
import {
CascaderOption,
Expand Down
2 changes: 1 addition & 1 deletion src/packages/address/existRender.taro.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent, ReactNode } from 'react'
import { Check, Location } from '@nutui/icons-react-taro'
import { ScrollView, View, ITouchEvent } from '@tarojs/components'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { AddressList } from './types'

export interface ExistRenderProps {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/audio/audio.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Service } from '@nutui/icons-react-taro'
import { View } from '@tarojs/components'
import Range from '@/packages/range/index.taro'
import Button from '@/packages/button/index.taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'

export interface AudioProps extends BasicComponent {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/avatarcropper/avatarcropper.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import classNames from 'classnames'
import { Canvas, CommonEventFunction, View } from '@tarojs/components'
import { Button } from '@/packages/button/button.taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'

import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { useTouch } from '@/utils/use-touch'
Expand Down Expand Up @@ -173,7 +173,7 @@
...canvasAll,
cropperCanvasContext: Taro.createCanvasContext(canvasAll.canvasId),
})
}, [])

Check warning on line 176 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'canvasAll'. Either include it or remove the dependency array. You can also do a functional update 'setCanvasAll(c => ...)' if you only need 'canvasAll' in the 'setCanvasAll' call

const touch = useTouch()

Expand All @@ -185,7 +185,7 @@
height,
borderRadius: shape === 'round' ? '50%' : '',
}
}, [pixelRatio, state.cropperWidth])

Check warning on line 188 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useMemo has a missing dependency: 'shape'. Either include it or remove the dependency array

// 是否是横向
const isAngle = useMemo(() => {
Expand Down Expand Up @@ -267,7 +267,7 @@
ctx.scale(scale, scale)
ctx.drawImage(src as HTMLImageElement, x, y, width, height)
},
[drawImage, state]

Check warning on line 270 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'pixelRatio' and 'space'. Either include them or remove the dependency array
)

// web绘制
Expand All @@ -284,7 +284,7 @@
canvas.height = state.displayHeight
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D
canvas2dDraw(ctx)
}, [canvas2dDraw])

Check warning on line 287 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'canvasAll.canvasId', 'state.displayHeight', and 'state.displayWidth'. Either include them or remove the dependency array

const alipayDraw = useCallback(() => {
const ctx = canvasAll.cropperCanvas.getContext(
Expand Down Expand Up @@ -341,7 +341,7 @@
ctx.scale(scale, scale)
ctx.drawImage(src as string, x, y, width, height)
ctx.draw()
}, [drawImage, state.scale, state.angle, state.moveX, state.moveY])

Check warning on line 344 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'alipayDraw', 'canvasAll', 'showAlipayCanvas2D', 'space', 'state', and 'webDraw'. Either include them or remove the dependency array

useEffect(() => {
if (Math.abs(state.moveX) > maxMoveX) {
Expand Down
3 changes: 3 additions & 0 deletions src/packages/backtop/backtop.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@import '../hoverbutton/hoverbutton.scss';
@import '../hoverbuttonitem/hoverbuttonitem.scss';

.nut-backtop {
display: none;

Expand Down
2 changes: 1 addition & 1 deletion src/packages/calendar/calendar.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useRef, ReactNode } from 'react'
import Popup from '@/packages/popup/index.taro'
import CalendarItem from '@/packages/calendaritem/index.taro'
import { Utils } from '@/utils/date'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import type { CalendarDay, CalendarType, CalendarRef } from './types'
import { ComponentDefaults } from '@/utils/typings'

Expand Down
2 changes: 1 addition & 1 deletion src/packages/calendarcard/calendarcard.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
getCurrentWeekDays,
getPrevMonthDays,
} from './utils'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import type {
CalendarCardDay,
CalendarCardMonth,
Expand Down
2 changes: 1 addition & 1 deletion src/packages/calendaritem/calendaritem.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
getPreMonthDates,
} from '@/utils/date'
import requestAniFrame from '@/utils/raf'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { usePropsValue } from '@/utils/use-props-value'
import {
splitDate,
Expand Down
2 changes: 1 addition & 1 deletion src/packages/cascader/cascader.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from './types'
import { ComponentDefaults } from '@/utils/typings'
import { usePropsValue } from '@/utils/use-props-value'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'

export interface CascaderProps
extends Pick<
Expand Down
2 changes: 1 addition & 1 deletion src/packages/fixednav/fixednav.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames'
import { ArrowLeft } from '@nutui/icons-react-taro'
import { View } from '@tarojs/components'
import Overlay from '@/packages/overlay/index.taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import {
FixedNavType,
Expand Down
2 changes: 1 addition & 1 deletion src/packages/infiniteloading/infiniteloading.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, {
import classNames from 'classnames'
import { ScrollView, ScrollViewProps, View } from '@tarojs/components'
import { createSelectorQuery } from '@tarojs/taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'

import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { InfiniteLoadingType } from './types'
Expand Down
8 changes: 6 additions & 2 deletions src/packages/inputnumber/demos/taro/demo9.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { useState } from 'react'
import { Cell, InputNumber, Toast } from '@nutui/nutui-react-taro'
import ConfigProvider from '@/packages/configprovider'
import {
Cell,
InputNumber,
Toast,
ConfigProvider,
} from '@nutui/nutui-react-taro'

const Demo9 = () => {
const customTheme3 = {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/numberkeyboard/numberkeyboard.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArrowDown } from '@nutui/icons-react-taro'
import { View } from '@tarojs/components'
import Popup from '@/packages/popup/index.taro'
import { PopupProps } from '@/packages/popup/popup.taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { ComponentDefaults } from '@/utils/typings'
import { mergeProps } from '@/utils/merge-props'

Expand Down
2 changes: 1 addition & 1 deletion src/packages/picker/picker.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { View, PickerView, PickerViewColumn } from '@tarojs/components'
import { Popup, PopupProps } from '@/packages/popup/popup.taro'
import PickerPanel from './pickerpanel.taro'
import useRefs from '@/utils/use-refs'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { PickerOption } from './types'
import { usePropsValue } from '@/utils/use-props-value'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
Expand Down
2 changes: 1 addition & 1 deletion src/packages/searchbar/searchbar.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { FunctionComponent, useEffect, useRef, useState } from 'react'
import type { ChangeEvent, FocusEvent, MouseEvent } from 'react'
import { View, ITouchEvent, Input as TaroInput } from '@tarojs/components'
import { MaskClose, Search, ArrowLeft } from '@nutui/icons-react-taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'

export interface SearchBarProps extends BasicComponent {
Expand Down
5 changes: 1 addition & 4 deletions src/packages/table/table.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import classNames from 'classnames'
import { ArrowDown } from '@nutui/icons-react-taro'
import { View } from '@tarojs/components'
import { BasicTableProps, TableColumnProps } from './types'
import {
useConfig,
useRtl,
} from '@/packages/configprovider/configprovider.taro'
import { useConfig, useRtl } from '@/packages/configprovider/index.taro'
import { ComponentDefaults } from '@/utils/typings'
import { usePropsValue } from '@/utils/use-props-value'
import { useTableSticky } from './utils'
Expand Down
5 changes: 1 addition & 4 deletions src/packages/textarea/textarea.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import React, { FunctionComponent, useRef } from 'react'
import classNames from 'classnames'
import Taro from '@tarojs/taro'
import { Textarea, TextareaProps, View, Text } from '@tarojs/components'
import {
useConfig,
useRtl,
} from '@/packages/configprovider/configprovider.taro'
import { useConfig, useRtl } from '@/packages/configprovider/index.taro'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { usePropsValue } from '@/utils/use-props-value'

Expand Down
2 changes: 1 addition & 1 deletion src/packages/timeselect/timeselect.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { View } from '@tarojs/components'
import Popup from '@/packages/popup/index.taro'
import TimeDetail from '@/packages/timedetail/index.taro'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'

export interface TimeType {
value?: string
Expand Down
2 changes: 1 addition & 1 deletion src/packages/tour/tour.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Popover from '@/packages/popover/index.taro'
import { PopoverLocation } from '@/packages/popover/types'
import { getTaroRectById } from '@/utils/use-taro-rect'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { useConfig } from '@/packages/configprovider'
import { useConfig } from '@/packages/configprovider/index.taro'

export interface TourList {
target: Element | string
Expand Down
2 changes: 1 addition & 1 deletion src/packages/uploader/uploader.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Taro, { chooseImage, getEnv, chooseMedia } from '@tarojs/taro'
import { Failure, Photograph } from '@nutui/icons-react-taro'
import { View } from '@tarojs/components'
import Button from '@/packages/button/index.taro'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
import { useConfig } from '@/packages/configprovider/index.taro'
import { funcInterceptor } from '@/utils/interceptor'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { FileItem } from './types'
Expand Down
Loading