From 8263584a7ee13eac12277dfef168d32e976d733b Mon Sep 17 00:00:00 2001
From: huxiyang3 <1872591453@qq.com>
Date: Thu, 15 Aug 2024 11:06:50 +0800
Subject: [PATCH 01/12] chore: save
---
packages/nutui-taro-demo/bin/ts-node | 1 +
packages/nutui-taro-demo/bin/ts-node-cwd | 1 +
packages/nutui-taro-demo/bin/ts-node-esm | 1 +
packages/nutui-taro-demo/bin/ts-node-script | 1 +
packages/nutui-taro-demo/bin/ts-node-transpile-only | 1 +
packages/nutui-taro-demo/bin/ts-script | 1 +
src/config.json | 2 +-
src/packages/trendarrow/demo.taro.tsx | 9 +++++++--
src/packages/trendarrow/trendarrow.taro.tsx | 9 +++++----
9 files changed, 19 insertions(+), 7 deletions(-)
create mode 120000 packages/nutui-taro-demo/bin/ts-node
create mode 120000 packages/nutui-taro-demo/bin/ts-node-cwd
create mode 120000 packages/nutui-taro-demo/bin/ts-node-esm
create mode 120000 packages/nutui-taro-demo/bin/ts-node-script
create mode 120000 packages/nutui-taro-demo/bin/ts-node-transpile-only
create mode 120000 packages/nutui-taro-demo/bin/ts-script
diff --git a/packages/nutui-taro-demo/bin/ts-node b/packages/nutui-taro-demo/bin/ts-node
new file mode 120000
index 0000000000..d46990f434
--- /dev/null
+++ b/packages/nutui-taro-demo/bin/ts-node
@@ -0,0 +1 @@
+../lib/node_modules/ts-node/dist/bin.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-cwd b/packages/nutui-taro-demo/bin/ts-node-cwd
new file mode 120000
index 0000000000..de7ad0382d
--- /dev/null
+++ b/packages/nutui-taro-demo/bin/ts-node-cwd
@@ -0,0 +1 @@
+../lib/node_modules/ts-node/dist/bin-cwd.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-esm b/packages/nutui-taro-demo/bin/ts-node-esm
new file mode 120000
index 0000000000..fbe47daeb9
--- /dev/null
+++ b/packages/nutui-taro-demo/bin/ts-node-esm
@@ -0,0 +1 @@
+../lib/node_modules/ts-node/dist/bin-esm.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-script b/packages/nutui-taro-demo/bin/ts-node-script
new file mode 120000
index 0000000000..37b1e8a9d6
--- /dev/null
+++ b/packages/nutui-taro-demo/bin/ts-node-script
@@ -0,0 +1 @@
+../lib/node_modules/ts-node/dist/bin-script.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-transpile-only b/packages/nutui-taro-demo/bin/ts-node-transpile-only
new file mode 120000
index 0000000000..7916f9c1d4
--- /dev/null
+++ b/packages/nutui-taro-demo/bin/ts-node-transpile-only
@@ -0,0 +1 @@
+../lib/node_modules/ts-node/dist/bin-transpile.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-script b/packages/nutui-taro-demo/bin/ts-script
new file mode 120000
index 0000000000..e09e9c1d4b
--- /dev/null
+++ b/packages/nutui-taro-demo/bin/ts-script
@@ -0,0 +1 @@
+../lib/node_modules/ts-node/dist/bin-script-deprecated.js
\ No newline at end of file
diff --git a/src/config.json b/src/config.json
index 0f1959164d..b97cce3f82 100644
--- a/src/config.json
+++ b/src/config.json
@@ -1206,7 +1206,7 @@
"author": "zhaoqian16"
},
{
- "version": "2.0.0",
+ "version": "3.0.0",
"name": "TrendArrow",
"type": "component",
"cName": "趋势箭头",
diff --git a/src/packages/trendarrow/demo.taro.tsx b/src/packages/trendarrow/demo.taro.tsx
index 413855baf0..ddaa45e85c 100644
--- a/src/packages/trendarrow/demo.taro.tsx
+++ b/src/packages/trendarrow/demo.taro.tsx
@@ -12,6 +12,7 @@ import Demo5 from './demos/taro/demo5'
import Demo6 from './demos/taro/demo6'
import Demo7 from './demos/taro/demo7'
import Demo8 from './demos/taro/demo8'
+import { harmonyAndRn } from '@/utils/platform-taro'
const TrendArrowDemo = () => {
const [translated] = useTranslate({
@@ -64,8 +65,12 @@ const TrendArrowDemo = () => {
{translated.title7}
- {translated.title8}
-
+ {!harmonyAndRn() && (
+ <>
+ {translated.title8}
+
+ >
+ )}
>
)
diff --git a/src/packages/trendarrow/trendarrow.taro.tsx b/src/packages/trendarrow/trendarrow.taro.tsx
index 5367083266..842ab8821f 100644
--- a/src/packages/trendarrow/trendarrow.taro.tsx
+++ b/src/packages/trendarrow/trendarrow.taro.tsx
@@ -1,5 +1,6 @@
import React, { FunctionComponent, useRef } from 'react'
import { TriangleDown, TriangleUp } from '@nutui/icons-react-taro'
+import { View, Text } from '@tarojs/components'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
export interface TrendArrowProps extends BasicComponent {
@@ -96,16 +97,16 @@ export const TrendArrow: FunctionComponent<
const renderContent = (left: boolean) => {
const classNameSuffix = !left ? 'icon-after' : 'icon-before'
return (
-
{calcRate}
-
+
)
}
return (
-
+
{!left && renderContent(!left)}
{Number(value) !== 0 && (
<>
@@ -117,7 +118,7 @@ export const TrendArrow: FunctionComponent<
>
)}
{left && renderContent(!left)}
-
+
)
}
From 339acdc89e10639835d41d3e893b2f3b4de20252 Mon Sep 17 00:00:00 2001
From: huxiyang3 <1872591453@qq.com>
Date: Thu, 15 Aug 2024 13:40:33 +0800
Subject: [PATCH 02/12] chore: update
---
src/packages/trendarrow/trendarrow.scss | 3 ++-
src/packages/trendarrow/trendarrow.taro.tsx | 17 +++++++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/packages/trendarrow/trendarrow.scss b/src/packages/trendarrow/trendarrow.scss
index 6c613fa574..a4781498a8 100644
--- a/src/packages/trendarrow/trendarrow.scss
+++ b/src/packages/trendarrow/trendarrow.scss
@@ -1,5 +1,6 @@
.nut-trendarrow {
- display: inline-flex;
+ display: flex;
+ flex-direction: row;
align-items: center;
color: $color-title;
font-size: $trendarrow-font-size;
diff --git a/src/packages/trendarrow/trendarrow.taro.tsx b/src/packages/trendarrow/trendarrow.taro.tsx
index 842ab8821f..08bc6e13e5 100644
--- a/src/packages/trendarrow/trendarrow.taro.tsx
+++ b/src/packages/trendarrow/trendarrow.taro.tsx
@@ -2,6 +2,7 @@ import React, { FunctionComponent, useRef } from 'react'
import { TriangleDown, TriangleUp } from '@nutui/icons-react-taro'
import { View, Text } from '@tarojs/components'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
+import { harmonyAndRn } from '@/utils/platform-taro'
export interface TrendArrowProps extends BasicComponent {
value: number
@@ -25,8 +26,8 @@ const defaultProps = {
left: false,
sync: true,
color: '#333',
- riseColor: 'var(--nutui-brand-6)',
- dropColor: 'var(--nutui-secondary-1)',
+ riseColor: '#ff0f23',
+ dropColor: '#14cc33',
riseIcon: null,
dropIcon: null,
} as TrendArrowProps
@@ -111,9 +112,17 @@ export const TrendArrow: FunctionComponent<
{Number(value) !== 0 && (
<>
{rateTrend.current ? (
- <>{riseIcon || }>
+ <>
+ {riseIcon ||
+ (!harmonyAndRn() && )}
+ >
) : (
- <>{dropIcon || }>
+ <>
+ {dropIcon ||
+ (!harmonyAndRn() && (
+
+ ))}
+ >
)}
>
)}
From fe2f90305bd65a5c98545a0606ef0067fcce6c9f Mon Sep 17 00:00:00 2001
From: huxiyang3 <1872591453@qq.com>
Date: Wed, 21 Aug 2024 16:40:17 +0800
Subject: [PATCH 03/12] =?UTF-8?q?feat:=20icon=E5=8D=A0=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/packages/trendarrow/trendarrow.harmony.css | 5 +++--
src/packages/trendarrow/trendarrow.taro.tsx | 10 ++++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/packages/trendarrow/trendarrow.harmony.css b/src/packages/trendarrow/trendarrow.harmony.css
index c9dbdd3969..82584e5490 100644
--- a/src/packages/trendarrow/trendarrow.harmony.css
+++ b/src/packages/trendarrow/trendarrow.harmony.css
@@ -1,7 +1,8 @@
.nut-trendarrow {
- display: inline-flex;
+ display: flex;
+ flex-direction: row;
align-items: center;
- color: #1A1A1A;
+ color: #1a1a1a;
font-size: 14px;
}
.nut-trendarrow-icon-before {
diff --git a/src/packages/trendarrow/trendarrow.taro.tsx b/src/packages/trendarrow/trendarrow.taro.tsx
index 08bc6e13e5..b6593eea22 100644
--- a/src/packages/trendarrow/trendarrow.taro.tsx
+++ b/src/packages/trendarrow/trendarrow.taro.tsx
@@ -114,12 +114,18 @@ export const TrendArrow: FunctionComponent<
{rateTrend.current ? (
<>
{riseIcon ||
- (!harmonyAndRn() && )}
+ (harmonyAndRn() ? (
+ ⬆️
+ ) : (
+
+ ))}
>
) : (
<>
{dropIcon ||
- (!harmonyAndRn() && (
+ (harmonyAndRn() ? (
+ ⬇️
+ ) : (
))}
>
From 3a22efe8bd0b2d85ad5bc2f4cfdb65956a1f0a67 Mon Sep 17 00:00:00 2001
From: huxiyang3 <1872591453@qq.com>
Date: Thu, 31 Oct 2024 13:48:48 +0800
Subject: [PATCH 04/12] fix: build
---
src/packages/trendarrow/trendarrow.taro.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/packages/trendarrow/trendarrow.taro.tsx b/src/packages/trendarrow/trendarrow.taro.tsx
index b6593eea22..689fddc3a5 100644
--- a/src/packages/trendarrow/trendarrow.taro.tsx
+++ b/src/packages/trendarrow/trendarrow.taro.tsx
@@ -107,7 +107,11 @@ export const TrendArrow: FunctionComponent<
)
}
return (
-
+
{!left && renderContent(!left)}
{Number(value) !== 0 && (
<>
From da9e6bc78a28ed70828a7658d8540b1707620f51 Mon Sep 17 00:00:00 2001
From: huxiyang3 <1872591453@qq.com>
Date: Mon, 4 Nov 2024 13:52:42 +0800
Subject: [PATCH 05/12] chore: delete useless
---
packages/nutui-taro-demo/bin/ts-node | 1 -
packages/nutui-taro-demo/bin/ts-node-cwd | 1 -
packages/nutui-taro-demo/bin/ts-node-esm | 1 -
packages/nutui-taro-demo/bin/ts-node-script | 1 -
packages/nutui-taro-demo/bin/ts-node-transpile-only | 1 -
packages/nutui-taro-demo/bin/ts-script | 1 -
6 files changed, 6 deletions(-)
delete mode 120000 packages/nutui-taro-demo/bin/ts-node
delete mode 120000 packages/nutui-taro-demo/bin/ts-node-cwd
delete mode 120000 packages/nutui-taro-demo/bin/ts-node-esm
delete mode 120000 packages/nutui-taro-demo/bin/ts-node-script
delete mode 120000 packages/nutui-taro-demo/bin/ts-node-transpile-only
delete mode 120000 packages/nutui-taro-demo/bin/ts-script
diff --git a/packages/nutui-taro-demo/bin/ts-node b/packages/nutui-taro-demo/bin/ts-node
deleted file mode 120000
index d46990f434..0000000000
--- a/packages/nutui-taro-demo/bin/ts-node
+++ /dev/null
@@ -1 +0,0 @@
-../lib/node_modules/ts-node/dist/bin.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-cwd b/packages/nutui-taro-demo/bin/ts-node-cwd
deleted file mode 120000
index de7ad0382d..0000000000
--- a/packages/nutui-taro-demo/bin/ts-node-cwd
+++ /dev/null
@@ -1 +0,0 @@
-../lib/node_modules/ts-node/dist/bin-cwd.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-esm b/packages/nutui-taro-demo/bin/ts-node-esm
deleted file mode 120000
index fbe47daeb9..0000000000
--- a/packages/nutui-taro-demo/bin/ts-node-esm
+++ /dev/null
@@ -1 +0,0 @@
-../lib/node_modules/ts-node/dist/bin-esm.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-script b/packages/nutui-taro-demo/bin/ts-node-script
deleted file mode 120000
index 37b1e8a9d6..0000000000
--- a/packages/nutui-taro-demo/bin/ts-node-script
+++ /dev/null
@@ -1 +0,0 @@
-../lib/node_modules/ts-node/dist/bin-script.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-node-transpile-only b/packages/nutui-taro-demo/bin/ts-node-transpile-only
deleted file mode 120000
index 7916f9c1d4..0000000000
--- a/packages/nutui-taro-demo/bin/ts-node-transpile-only
+++ /dev/null
@@ -1 +0,0 @@
-../lib/node_modules/ts-node/dist/bin-transpile.js
\ No newline at end of file
diff --git a/packages/nutui-taro-demo/bin/ts-script b/packages/nutui-taro-demo/bin/ts-script
deleted file mode 120000
index e09e9c1d4b..0000000000
--- a/packages/nutui-taro-demo/bin/ts-script
+++ /dev/null
@@ -1 +0,0 @@
-../lib/node_modules/ts-node/dist/bin-script-deprecated.js
\ No newline at end of file
From d45c48e90bc20466f22191c65a362f83e7b7232f Mon Sep 17 00:00:00 2001
From: huxiyang3 <1872591453@qq.com>
Date: Wed, 6 Nov 2024 10:18:01 +0800
Subject: [PATCH 06/12] fix: arrow
---
src/packages/trendarrow/trendarrow.taro.tsx | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/src/packages/trendarrow/trendarrow.taro.tsx b/src/packages/trendarrow/trendarrow.taro.tsx
index 689fddc3a5..b1c707fd68 100644
--- a/src/packages/trendarrow/trendarrow.taro.tsx
+++ b/src/packages/trendarrow/trendarrow.taro.tsx
@@ -2,7 +2,6 @@ import React, { FunctionComponent, useRef } from 'react'
import { TriangleDown, TriangleUp } from '@nutui/icons-react-taro'
import { View, Text } from '@tarojs/components'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
-import { harmonyAndRn } from '@/utils/platform-taro'
export interface TrendArrowProps extends BasicComponent {
value: number
@@ -116,23 +115,9 @@ export const TrendArrow: FunctionComponent<
{Number(value) !== 0 && (
<>
{rateTrend.current ? (
- <>
- {riseIcon ||
- (harmonyAndRn() ? (
- ⬆️
- ) : (
-
- ))}
- >
+ <>{riseIcon || }>
) : (
- <>
- {dropIcon ||
- (harmonyAndRn() ? (
- ⬇️
- ) : (
-
- ))}
- >
+ <>{dropIcon || }>
)}
>
)}
From daa602e458fdfa9f049a9833bc408808fda0c583 Mon Sep 17 00:00:00 2001
From: "Alex.hxy" <1872591453@qq.com>
Date: Thu, 7 Nov 2024 16:51:54 +0800
Subject: [PATCH 07/12] =?UTF-8?q?feat(video):=20harmony=E9=80=82=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/config.json | 6 +++---
src/packages/video/demos/taro/demo1.tsx | 7 ++++---
src/packages/video/demos/taro/demo2.tsx | 7 ++++---
src/packages/video/demos/taro/demo3.tsx | 7 ++++---
src/packages/video/demos/taro/demo4.tsx | 5 +++--
src/packages/video/demos/taro/demo5.tsx | 5 +++--
src/packages/video/demos/taro/demo6.tsx | 5 +++--
src/packages/video/demos/taro/demo7.tsx | 7 ++++---
src/packages/video/video.taro.tsx | 11 ++++-------
9 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/src/config.json b/src/config.json
index 50337b0b7c..5d3ae30ffe 100644
--- a/src/config.json
+++ b/src/config.json
@@ -891,7 +891,7 @@
"enName": "exhibition",
"packages": [
{
- "version": "2.0.0",
+ "version": "3.0.0",
"name": "Animate",
"type": "component",
"cName": "动画/动效",
@@ -1133,7 +1133,7 @@
"author": "swag~jun"
},
{
- "version": "2.0.0",
+ "version": "3.0.0",
"name": "Video",
"type": "component",
"cName": "视频播放器",
@@ -1163,7 +1163,7 @@
"enName": "business",
"packages": [
{
- "version": "2.0.0",
+ "version": "3.0.0",
"name": "Barrage",
"type": "component",
"cName": "弹幕",
diff --git a/src/packages/video/demos/taro/demo1.tsx b/src/packages/video/demos/taro/demo1.tsx
index 3ff469ba24..fe14f7f965 100644
--- a/src/packages/video/demos/taro/demo1.tsx
+++ b/src/packages/video/demos/taro/demo1.tsx
@@ -1,8 +1,9 @@
import React, { useState } from 'react'
import { Cell, Video } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo1 = () => {
- const [source, setSource] = useState({
+ const [source] = useState({
src: 'https://storage.360buyimg.com/nutui/video/video_NutUI.mp4',
type: 'video/mp4',
})
@@ -14,14 +15,14 @@ const Demo1 = () => {
const playend = (elm: any) => console.log('playend', elm)
return (
<>
-
+
|
>
diff --git a/src/packages/video/demos/taro/demo2.tsx b/src/packages/video/demos/taro/demo2.tsx
index f665a972fd..5265d8cb25 100644
--- a/src/packages/video/demos/taro/demo2.tsx
+++ b/src/packages/video/demos/taro/demo2.tsx
@@ -1,8 +1,9 @@
import React, { useState } from 'react'
import { Cell, Video } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo2 = () => {
- const [source, setSource] = useState({
+ const [source] = useState({
src: 'https://storage.360buyimg.com/nutui/video/video_NutUI.mp4',
type: 'video/mp4',
})
@@ -16,14 +17,14 @@ const Demo2 = () => {
const playend = (elm: any) => console.log('playend', elm)
return (
<>
-
+
|
>
diff --git a/src/packages/video/demos/taro/demo3.tsx b/src/packages/video/demos/taro/demo3.tsx
index 20175dca8e..71fa64dd13 100644
--- a/src/packages/video/demos/taro/demo3.tsx
+++ b/src/packages/video/demos/taro/demo3.tsx
@@ -1,8 +1,9 @@
import React, { useState } from 'react'
import { Cell, Video } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo3 = () => {
- const [source, setSource] = useState({
+ const [source] = useState({
src: 'https://storage.360buyimg.com/nutui/video/video_NutUI.mp4',
type: 'video/mp4',
})
@@ -15,14 +16,14 @@ const Demo3 = () => {
const playend = (elm: any) => console.log('playend', elm)
return (
<>
-
+
|
>
diff --git a/src/packages/video/demos/taro/demo4.tsx b/src/packages/video/demos/taro/demo4.tsx
index fe143692b9..0cc2cc20d6 100644
--- a/src/packages/video/demos/taro/demo4.tsx
+++ b/src/packages/video/demos/taro/demo4.tsx
@@ -1,8 +1,9 @@
import React, { useState } from 'react'
import { Cell, Video } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo4 = () => {
- const [source, setSource] = useState({
+ const [source] = useState({
src: 'https://storage.360buyimg.com/nutui/video/video_NutUI.mp4',
type: 'video/mp4',
})
@@ -23,7 +24,7 @@ const Demo4 = () => {
onPlay={play}
onPause={pause}
onPlayEnd={playend}
- style={{ height: '163px' }}
+ style={{ height: pxTransform(163) }}
/>
|
>
diff --git a/src/packages/video/demos/taro/demo5.tsx b/src/packages/video/demos/taro/demo5.tsx
index e18c601316..264b250f16 100644
--- a/src/packages/video/demos/taro/demo5.tsx
+++ b/src/packages/video/demos/taro/demo5.tsx
@@ -1,5 +1,6 @@
import React, { useState } from 'react'
import { Cell, Video } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo5 = () => {
const [source, setSource] = useState({
@@ -15,14 +16,14 @@ const Demo5 = () => {
const playend = (elm: any) => console.log('playend', elm)
return (
<>
-
+
|
>
diff --git a/src/packages/video/demos/taro/demo6.tsx b/src/packages/video/demos/taro/demo6.tsx
index dac3f10616..b2bc8b432c 100644
--- a/src/packages/video/demos/taro/demo6.tsx
+++ b/src/packages/video/demos/taro/demo6.tsx
@@ -1,5 +1,6 @@
import React, { useState } from 'react'
import { Cell, Video } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo6 = () => {
const [source, setSource] = useState({
@@ -19,14 +20,14 @@ const Demo6 = () => {
const playend = (elm: any) => console.log('playend', elm)
return (
<>
-
+
|
>
diff --git a/src/packages/video/demos/taro/demo7.tsx b/src/packages/video/demos/taro/demo7.tsx
index ac089782fd..b08549abb9 100644
--- a/src/packages/video/demos/taro/demo7.tsx
+++ b/src/packages/video/demos/taro/demo7.tsx
@@ -1,5 +1,6 @@
import React, { useState } from 'react'
import { Cell, Video, Button } from '@nutui/nutui-react-taro'
+import pxTransform from '@/utils/px-transform'
const Demo7 = () => {
const [source1, setSource1] = useState({
@@ -18,19 +19,19 @@ const Demo7 = () => {
}
return (
<>
-
+
|
| | | | |