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

docs(overlay): 修订 demo 文案 #1706

Merged
merged 38 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 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
49310f9
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
5b84c0d
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
e633cea
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
bd3aa30
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 15, 2023
6eb249a
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 15, 2023
981162e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 16, 2023
2369884
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 16, 2023
85f285f
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 17, 2023
f09fec7
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 17, 2023
137b690
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 17, 2023
7ddfca7
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 20, 2023
6f2e558
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 21, 2023
60c4d72
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 21, 2023
3a86c79
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 21, 2023
a927492
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
225acd3
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
0b21faa
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
14cd4e1
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
59fb3db
style: delete dark
xiaoyatong Nov 22, 2023
068f800
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
8f490ea
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 23, 2023
f63d00c
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 23, 2023
53783e1
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 23, 2023
334bb27
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 24, 2023
b5b3129
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 24, 2023
dea6141
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 24, 2023
253eecf
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 27, 2023
ac3c216
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 27, 2023
a856800
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 27, 2023
a391d51
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
9ed5ddf
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
b830fe5
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
ae0c326
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
6ad031a
docs: overlay
xiaoyatong Nov 30, 2023
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
26 changes: 14 additions & 12 deletions src/packages/overlay/demo.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
.wrapper {
display: flex;
height: 100%;
align-items: center;
justify-content: center;

.content {
.nut-overlay {
.wrapper {
display: flex;
width: 150px;
height: 150px;
background: #fff;
border-radius: 8px;
height: 100%;
align-items: center;
justify-content: center;
color: red;

.content {
display: flex;
width: 150px;
height: 150px;
background: #fff;
border-radius: 8px;
align-items: center;
justify-content: center;
color: red;
}
}
}
8 changes: 4 additions & 4 deletions src/packages/overlay/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const OverlayDemo = () => {
'2a9e4928': '显示遮罩层',
duration: '设置动画时间',
lockscroll: '不锁定背景滚动',
abbf9359: '遮罩样式',
abbf9359: '自定义遮罩样式',
ec0d7acf: '嵌套内容',
ce1e18a2: '这里是正文',
closeClickLay: '点击遮罩不关闭',
Expand All @@ -32,7 +32,7 @@ const OverlayDemo = () => {
'2a9e4928': '顯示遮罩層',
duration: '設置動畫時間',
lockscroll: '不鎖定背景滾動',
abbf9359: '遮罩樣式',
abbf9359: '自定義遮罩樣式',
ec0d7acf: '嵌套內容',
ce1e18a2: '這裡是正文',
closeClickLay: '點擊遮罩不關閉',
Expand All @@ -42,7 +42,7 @@ const OverlayDemo = () => {
'2a9e4928': 'Show mask layer',
duration: 'Set animation time',
lockscroll: 'Donot Lock background scrolling',
abbf9359: 'Mask style',
abbf9359: 'Custom mask style',
ec0d7acf: 'nested content',
ce1e18a2: 'here is the text',
closeClickLay: 'Click the mask not to close',
Expand Down Expand Up @@ -124,7 +124,7 @@ const OverlayDemo = () => {
visible={visible2}
onClick={onClose2}
style={{
backgroundColor: 'rgba(0, 0, 0, .2)',
backgroundColor: 'rgba(0, 0, 0, .4)',
'--nutui-overlay-zIndex': 2000,
}}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/packages/overlay/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const OverlayDemo = () => {
'2a9e4928': '显示遮罩层',
duration: '设置动画时间',
lockscroll: '不锁定背景滚动',
abbf9359: '遮罩样式',
abbf9359: '自定义遮罩样式',
ec0d7acf: '嵌套内容',
ce1e18a2: '这里是正文',
closeClickLay: '点击遮罩不关闭',
Expand All @@ -33,7 +33,7 @@ const OverlayDemo = () => {
'2a9e4928': '顯示遮罩層',
duration: '設置動畫時間',
lockscroll: '不鎖定背景滾動',
abbf9359: '遮罩樣式',
abbf9359: '自定義遮罩樣式',
ec0d7acf: '嵌套內容',
ce1e18a2: '這裡是正文',
closeClickLay: '點擊遮罩不關閉',
Expand All @@ -43,7 +43,7 @@ const OverlayDemo = () => {
'2a9e4928': 'Show mask layer',
duration: 'Set animation time',
lockscroll: 'Donot Lock background scrolling',
abbf9359: 'Mask style',
abbf9359: 'Custom mask style',
ec0d7acf: 'nested content',
ce1e18a2: 'here is the text',
closeClickLay: 'Click the mask not to close',
Expand Down Expand Up @@ -124,7 +124,7 @@ const OverlayDemo = () => {
visible={visible2}
onClick={onClose2}
style={{
backgroundColor: 'rgba(0, 0, 0, .2)',
backgroundColor: 'rgba(0, 0, 0, .4)',
'--nutui-overlay-zIndex': 2000,
}}
/>
Expand Down
3 changes: 1 addition & 2 deletions src/packages/overlay/overlay.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ export const Overlay: FunctionComponent<
...defaultOverlayProps,
...props,
}
const classPrefix = `nut-overlay`

const [innerVisible, setInnerVisible] = useState(visible)

const classPrefix = `nut-overlay`

const nodeRef = useLockScrollTaro(!!props.lockScroll && innerVisible)

useEffect(() => {
Expand Down
3 changes: 1 addition & 2 deletions src/packages/overlay/overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ export const Overlay: FunctionComponent<
...defaultOverlayProps,
...props,
}
const classPrefix = `nut-overlay`

const [innerVisible, setInnerVisible] = useState(visible)

const classPrefix = `nut-overlay`

const nodeRef = useRef(null)

useEffect(() => {
Expand Down