Skip to content

Commit

Permalink
Merge branch 'master' into feat/lego
Browse files Browse the repository at this point in the history
  • Loading branch information
qqack authored Nov 2, 2023
2 parents 069382d + 3c544e0 commit fdb209e
Show file tree
Hide file tree
Showing 178 changed files with 2,636 additions and 2,767 deletions.
5 changes: 0 additions & 5 deletions .changeset/famous-dolls-tap.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fuzzy-schools-nail.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/light-coats-wonder.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wild-foxes-share.md

This file was deleted.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@
"engines": {
"node": ">=16",
"pnpm": ">=7.0.0"
},
"resolutions": {
"@types/react": "17.0.43"
}
}
}
2 changes: 1 addition & 1 deletion packages/lego-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/lodash-es": "^4.17.8",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"postcss": "^8.4.27",
"postcss": "^8.4.31",
"postcss-url": "^10.1.3",
"less": "^4.1.3",
"rollup": "^3.26.3",
Expand Down
26 changes: 25 additions & 1 deletion packages/lego/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
# @td-design/lego

## 4.1.1

### Patch Changes

- [#745](https://github.com/thundersdata-frontend/td-design/pull/745) [`bbc7deb64`](https://github.com/thundersdata-frontend/td-design/commit/bbc7deb64da6805a33ff20e2b5dbdd0a2e714df0) Thanks [@qqack](https://github.com/qqack)! - style: 优化data-show-simple组件

## 4.1.0

### Minor Changes

- [#742](https://github.com/thundersdata-frontend/td-design/pull/742) [`60960d99a`](https://github.com/thundersdata-frontend/td-design/commit/60960d99ace962e135ef957ae06367aba8955d7f) Thanks [@qqack](https://github.com/qqack)! - feat: 用css动画替代动态背景图

## 4.0.3

### Patch Changes

- [#733](https://github.com/thundersdata-frontend/td-design/pull/733) [`aeada2c4f`](https://github.com/thundersdata-frontend/td-design/commit/aeada2c4f464dc84ad2cfab315c956236bfe70b1) Thanks [@qqack](https://github.com/qqack)! - fix: 修复lego的一些组件的bug

## 4.0.2

### Patch Changes

- [#730](https://github.com/thundersdata-frontend/td-design/pull/730) [`d6df8177a`](https://github.com/thundersdata-frontend/td-design/commit/d6df8177a9b8a43ee15a3ecae1d92f87db508780) Thanks [@qqack](https://github.com/qqack)! - lego 中 table 组件的优化

## 4.0.1

### Patch Changes

- [#726](https://github.com/thundersdata-frontend/td-design/pull/726) [`7e04b363f`](https://github.com/thundersdata-frontend/td-design/commit/7e04b363fc35419219bc9afce20c197d50ca6209) Thanks [@qqack](https://github.com/qqack)! - 修改table的lineHeight报错以及更新modal的写法
- [#726](https://github.com/thundersdata-frontend/td-design/pull/726) [`7e04b363f`](https://github.com/thundersdata-frontend/td-design/commit/7e04b363fc35419219bc9afce20c197d50ca6209) Thanks [@qqack](https://github.com/qqack)! - 修改 table 的 lineHeight 报错以及更新 modal 的写法

## 4.0.0

Expand Down
3 changes: 2 additions & 1 deletion packages/lego/example/BarLineDemo/demo8.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<BarLine
inModal
xAxisData={['03月', '04月']}
yAxis={[{ name: '万元' }, { name: '%' }]}
lineData={{ name: '同比增长率', data: [12, 11] }}
barData={{ name: '运费', data: [500, 584] }}
style={{ height: 500 }}
style={{ height: 500, width: '100%' }}
/>
</Modal>
</>
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/CircularSolidPieDemo/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<CircularSolidPie
data={data}
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/CuboidBarDemo/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<CuboidBar
inModal
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/CylinderBarDemo/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<CylinderBar
inModal
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/CylinderShadowBarDemo/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<CylinderShadowBar
inModal
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/HorizontalBarDemo/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<HorizontalBar
unit="万元"
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/ImgLineDemo/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<ImgLine
inModal
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/MultiHorizontalBarDemo/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<MultiHorizontalBar
unit={['万元', '万元']}
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/MultiLineDemo/demo8.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<MultiLine
inModal
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/PictorialBarDemo/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<PictorialBar
xAxisData={['2019年', '2020年', '2021年']}
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/ProgressDemo/demo2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<Progress
name="进度"
Expand Down
11 changes: 6 additions & 5 deletions packages/lego/example/RadarDemo/demo2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default () => {
];

const indicatorData = [
{ name: '占地面积', max: 100, unit: '亩' },
{ name: '高标库面积', max: 100, unit: '万平方米' },
{ name: '充电桩数量', max: 100, unit: '个' },
{ name: '车辆进出数量', max: 500, unit: '辆' },
{ name: '平均停留时长', max: 100, unit: '分钟' },
{ name: '占地面积', max: '100', unit: '亩' },
{ name: '高标库面积', max: '100', unit: '万平方米' },
{ name: '充电桩数量', max: '100', unit: '个' },
{ name: '车辆进出数量', max: '500', unit: '辆' },
{ name: '平均停留时长', max: '100', unit: '分钟' },
];

return (
Expand All @@ -33,6 +33,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<Radar
inModal
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/ScatterDemo/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<Scatter
unit="AQI指数"
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/SliceBarDemo/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<SliceBar
max={1000}
Expand Down
1 change: 1 addition & 0 deletions packages/lego/example/StackBarDemo/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default () => {
footer={null}
width={650}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<StackBar
inModal
Expand Down
2 changes: 1 addition & 1 deletion packages/lego/example/ThreeDimensionalPieDemo/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export default () => {
footer={null}
width={750}
bodyStyle={{ backgroundColor: '#040727' }}
getContainer={false} // <- 这个属性如果不加,那第一次打开的时候,里面的echarts图表不能正常渲染
>
<ThreeDimensionalPie
seriesData={data}
autoLoop
inModal
style={{ width: 720, height: 308 }}
imgStyle={{ top: 85, left: 168, width: 380, height: 260 }}
barConfig={{ legend: { top: 50 } }}
/>
</Modal>
Expand Down
4 changes: 2 additions & 2 deletions packages/lego/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@td-design/lego",
"version": "4.0.1",
"version": "4.1.1",
"description": "雷数大屏素材库",
"keywords": [
"thundersdata",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"less": "^4.1.3",
"postcss": "^8.4.27",
"postcss": "^8.4.31",
"postcss-url": "^10.1.3",
"rollup": "^3.26.3",
"rollup-plugin-font": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
},
"devDependencies": {
"@shopify/restyle": "2.4.2",
"@td-design/react-native": "workspace:^5.1.1",
"@td-design/react-native": "workspace:^5.4.3",
"@td-design/rn-hooks": "workspace:^2.7.2",
"@td-design/react-native-picker": "workspace:^2.3.2",
"@td-design/react-native-picker": "workspace:^2.3.3",
"@types/react": "^18.2.15",
"@types/react-native": "^0.72.2",
"react-native-builder-bob": "^0.21.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-image-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@shopify/restyle": "2.4.2",
"@td-design/react-native": "workspace:^5.1.1",
"@td-design/react-native": "workspace:^5.4.3",
"@td-design/rn-hooks": "workspace:^2.7.2",
"@types/react": "^18.2.15",
"@types/react-native": "0.72.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-password/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@shopify/restyle": "2.4.2",
"@td-design/react-native": "workspace:^5.1.1",
"@td-design/react-native": "workspace:^5.4.3",
"@td-design/rn-hooks": "workspace:^2.7.2",
"@types/react": "^18.2.15",
"@types/react-native": "^0.72.2",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native-picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @td-design/react-native-picker

## 2.3.3

### Patch Changes

- [#747](https://github.com/thundersdata-frontend/td-design/pull/747) [`d91317db1`](https://github.com/thundersdata-frontend/td-design/commit/d91317db103dfe4ed8bd4531f5c170f3602b0429) Thanks [@chj-damon](https://github.com/chj-damon)! - 修复一些bug

## 2.3.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-picker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@td-design/react-native-picker",
"version": "2.3.2",
"version": "2.3.3",
"description": "基于 @td-design/react-native 的 picker 组件",
"main": "lib/module/index.js",
"module": "lib/module/index.js",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@shopify/restyle": "2.4.2",
"@td-design/react-native": "workspace:^5.1.1",
"@td-design/react-native": "workspace:^5.4.3",
"@td-design/rn-hooks": "workspace:^2.7.2",
"@types/lodash-es": "^4.17.8",
"@types/react": "^18.2.15",
Expand Down
31 changes: 15 additions & 16 deletions packages/react-native-picker/src/components/DatePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,21 @@ const DatePicker: FC<

const { values, cols } = getValueCols();

/** 生成日期picker */
const renderDateTimePicker = () => {
return cols.map((col, index) => {
return (
<WheelPicker
key={index}
{...restProps}
data={col}
value={values[index]}
onChange={itemValue => onValueChange(itemValue, index)}
/>
);
});
};

return <Flex>{renderDateTimePicker()}</Flex>;
return (
<Flex>
{cols.map((col, index) => {
return (
<WheelPicker
key={index}
{...restProps}
data={col}
value={values[index]}
onChange={itemValue => onValueChange(itemValue, index)}
/>
);
})}
</Flex>
);
};

export default React.memo(DatePicker, (p, n) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { memo } from 'react';
import { Animated, StyleSheet } from 'react-native';

import { WhellPickerItemProps } from './type';
import { WheelPickerItemProps } from './type';

const opacityFunction = (val: number) => 1 / (1 + Math.abs(val));
const scaleFunction = (val: number) => 1 - 0.1 * Math.abs(val);
const rotationFunction = (val: number) => 20 * val;

function WheelPickerItem({ textStyle, style, visibleRest, height, option, index, currentIndex }: WhellPickerItemProps) {
function WheelPickerItem({ textStyle, style, visibleRest, height, option, index, currentIndex }: WheelPickerItemProps) {
const relativeScrollIndex = Animated.subtract(index, currentIndex);

const inputRange = [0];
Expand Down
Loading

0 comments on commit fdb209e

Please sign in to comment.