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: rtl模式下左右方向箭头的处理 #1922

Merged
merged 60 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
49a6aca
feat: uploader taro h5 支持video
xiaoyatong Nov 9, 2023
8297caf
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 13, 2023
9d730d4
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
ecc10ce
fix: delete sth doesnot merge
xiaoyatong Nov 14, 2023
c4a95d7
Merge branch 'next' of https://github.com/xiaoyatong/nutui-react into…
xiaoyatong Dec 4, 2023
bfcac57
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
d4e5820
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
1a8bc4c
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
d7d244b
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
5ee572e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
d08b5a3
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
444346e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 4, 2023
6f6c66d
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
8b43d3a
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
c87d30c
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
176700b
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
7e635fb
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
e801c2b
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
bd75947
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 5, 2023
24b8414
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 6, 2023
d350666
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 7, 2023
9503a0e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 8, 2023
9f0ad94
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 11, 2023
62045d4
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 12, 2023
2c7fe40
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 13, 2023
75a0065
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 15, 2023
a12f9f1
fix(cascader): 第二列数据无法展示问题修复
xiaoyatong Dec 15, 2023
84a6f8e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 21, 2023
8f38296
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 22, 2023
622ac02
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 24, 2023
6ddec6b
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 28, 2023
35ed209
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Dec 28, 2023
a78ec3d
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 2, 2024
3a20e29
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 3, 2024
d846f39
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 3, 2024
394915a
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 4, 2024
b67a97a
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 5, 2024
fcfba58
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 10, 2024
d48d4aa
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 11, 2024
d5a7418
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 12, 2024
06f0581
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 12, 2024
cfee811
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 17, 2024
a855836
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 18, 2024
55e6b8e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 18, 2024
c584cad
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 19, 2024
73bb1b2
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 19, 2024
83c4d47
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 22, 2024
dd9c495
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 23, 2024
5d4e346
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 23, 2024
0469643
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 24, 2024
d102870
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 24, 2024
62078f5
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 25, 2024
53fa521
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 30, 2024
329169a
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 31, 2024
0193dad
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Jan 31, 2024
6b79b04
fix: rtl模式下左右方向箭头的处理
xiaoyatong Jan 31, 2024
dcf31ec
fix: lint
xiaoyatong Feb 1, 2024
1c5dc34
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Feb 1, 2024
fdf07ac
fix: fix conflicts
xiaoyatong Feb 1, 2024
5dec6b9
fix: rtl
xiaoyatong Feb 1, 2024
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
1 change: 1 addition & 0 deletions src/packages/audio/audio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
left: auto;
right: 50%;
transform: rotate(-45deg);
transform-origin: 20px -18px;
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/packages/avatar/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@
.demo-avatar {
color: #fff;
}

[dir='rtl'] .avatar-demo,
.nut-rtl .avatar-demo {
.nut-cell {
& > div {
margin-right: 0px;
margin-left: 30px;
}
}
}
6 changes: 1 addition & 5 deletions src/packages/avatarcropper/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ const AvatarCropperDemo = () => {
return (
<>
<Header />
<div
className={`demo ${
Taro.getEnv() === 'WEB' ? 'web' : ''
} full avatar-demo`}
>
<div className={`demo ${Taro.getEnv() === 'WEB' ? 'web' : ''} full`}>
<h2>{translated.c0a1c0a1}</h2>
<Cell>
<AvatarCropper onConfirm={cutImage}>
Expand Down
2 changes: 1 addition & 1 deletion src/packages/avatarcropper/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AvatarCropperDemo = () => {
}
return (
<>
<div className="demo full avatar-demo">
<div className="demo full">
<h2>{translated.c0a1c0a1}</h2>
<Cell>
<AvatarCropper onConfirm={cutImage}>
Expand Down
1 change: 0 additions & 1 deletion src/packages/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@
margin-right: $button-text-icon-margin;

&.right {
margin-right: 0;
margin-left: $button-text-icon-margin;
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/packages/calendarcard/calendarcard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
margin-right: 0;
margin-left: 8px;
}

.nut-icon-ArrowLeft,
.nut-icon-ArrowRight,
svg {
transform: rotate(180deg);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/packages/cell/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const CellDemo = () => {
title: '我是标题',
title1: '我是描述',
title2: '点击测试',
title3: '圆角设置 0',
title3: '圆角设置为0',
title4: '链接 | 分组用法',
title5: '垂直居中',
title6: '自定义标题区域',
Expand All @@ -54,7 +54,7 @@ const CellDemo = () => {
title: '我是標題',
title1: '我是描述',
title2: '點擊測試',
title3: '圓角設置 0',
title3: '圓角設置為0',
title4: '鏈接 | 分組用法',
title5: '垂直居中',
title6: '自定義標題區域',
Expand Down
4 changes: 2 additions & 2 deletions src/packages/cell/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const CellDemo = () => {
title: '我是标题',
title1: '我是描述',
title2: '点击测试',
title3: '圆角设置 0',
title3: '圆角设置为0',
title4: '链接 | 分组用法',
title5: '垂直居中',
title6: '自定义标题区域',
Expand All @@ -55,7 +55,7 @@ const CellDemo = () => {
title: '我是標題',
title1: '我是描述',
title2: '點擊測試',
title3: '圓角設置 0',
title3: '圓角設置為0',
title4: '鏈接 | 分組用法',
title5: '垂直居中',
title6: '自定義標題區域',
Expand Down
9 changes: 7 additions & 2 deletions src/packages/fixednav/fixednav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@

.nut-icon {
transform: rotate(180deg);
margin-right: 0px;
margin-left: 5px;
}
}

Expand Down Expand Up @@ -160,8 +162,9 @@
border-radius: 0px 45px 45px 0px;

.nut-icon {
margin-right: 0;
margin-right: 0px;
margin-left: 5px;
transform: rotate(180deg);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cell 下的箭头方向看上去不对 目前是 > 的方向

}
}

Expand Down Expand Up @@ -195,7 +198,9 @@
border-radius: 45px 0 0 45px;

.nut-icon {
transform: rotate(-180deg);
transform: rotate(0deg);
margin-right: 5px;
margin-left: 0px;
}
}

Expand Down
7 changes: 5 additions & 2 deletions src/packages/navbar/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@
&-left {
left: auto;
right: 0;
.nut-icon-ArrowLeft {
transform: rotate(180deg);
}

&-back {
margin-right: 0;
Expand All @@ -154,7 +157,7 @@
right: auto;
left: 0;

.nut-icon {
.nut-icon-ArrowLeft {
margin-left: 0;
margin-right: 12px;

Expand All @@ -167,7 +170,7 @@

&-title-align-left {
.nut-navbar-left {
.nut-icon {
.nut-icon-ArrowLeft {
margin-left: 0;
margin-right: 12px;

Expand Down
7 changes: 7 additions & 0 deletions src/packages/pagination/pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@
border-left: none;
}

&-prev,
&-next {
.nut-icon {
transform: rotate(180deg);
}
}

.simple-border {
border-right: none;
border-left: $pagination-item-border-width solid
Expand Down
15 changes: 7 additions & 8 deletions src/packages/popover/popover.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,13 @@ export const Popover: FunctionComponent<
const [showPopup, setShowPopup] = useState(false)
const [elWidth, setElWidth] = useState(0)
const [elHeight, setElHeight] = useState(0)
const [rootPosition, setRootPosition] =
useState<{
width: number
height: number
left: number
top: number
right: number
}>()
const [rootPosition, setRootPosition] = useState<{
width: number
height: number
left: number
top: number
right: number
}>()

useEffect(() => {
setShowPopup(visible)
Expand Down
4 changes: 4 additions & 0 deletions src/packages/popup/popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@
left: $popup-title-padding;
}
}

.nut-icon-ArrowLeft {
transform: rotate(180deg);
}
}

&-center {
Expand Down
3 changes: 3 additions & 0 deletions src/packages/searchbar/searchbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
& > svg {
margin-right: 0;
margin-left: $searchbar-gap;
&.nut-icon {
transform: rotate(180deg);
}

&:last-child {
margin-right: 0;
Expand Down
7 changes: 7 additions & 0 deletions src/packages/swiper/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@
.swiper-demo-size {
margin: 0 auto;
}

[dir='rtl'] .nut-swiper-btns,
.nut-rtl .nut-swiper-btns {
.nut-icon {
transform: rotate(180deg);
}
}
21 changes: 21 additions & 0 deletions src/sites/mobile/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,24 @@ body {
.nut-theme-dark .demo {
background: #000 !important;
}

[dir='rtl'] #app,
.nut-rtl #app {
#nav {
.back {
right: 0;
}
.translate {
left: 0;
right: auto;
}
.nut-icon {
transform: rotate(180deg);
}
.dark-model {
transform: rotate(-270deg);
margin-right: 0;
margin-left: 10px;
}
}
}
2 changes: 1 addition & 1 deletion src/sites/mobile/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const WithNavRouter = ({ C }: any) => {
onClick={() => handleSwitchDarkModel()}
/>
<img
className={'dark-model'}
className={'translate-icon'}
src="https://img14.360buyimg.com/imagetools/jfs/t1/135168/8/21387/6193/625fa81aEe07cc347/55ad5bc2580c53a6.png"
alt=""
onClick={() => handleSwitchLocale()}
Expand Down
15 changes: 15 additions & 0 deletions src/sites/mobile/Links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,18 @@
}
}
}

[dir='rtl'] .index,
.nut-rtl .index {
&-header {
> img {
margin-right: 0;
margin-left: 18px;
}
}
&-components {
.nut-icon {
transform: rotate(180deg);
}
}
}
Loading