Skip to content
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/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@
"author": "lzz"
},
{
"version": "2.0.0",
"version": "3.0.0",
"name": "Dialog",
"type": "component",
"cName": "对话框",
Expand Down
2 changes: 2 additions & 0 deletions src/packages/dialog/demos/h5/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const Demo6 = () => {
className="test-dialog"
title="底部带关闭按钮"
visible={visible2}
confirmText="决策1"
cancelText="决策2"
onConfirm={() => setVisible2(false)}
onCancel={() => setVisible2(false)}
closeIcon
Expand Down
2 changes: 2 additions & 0 deletions src/packages/dialog/demos/taro/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const Demo6 = () => {
className="test-dialog"
title="底部带关闭按钮"
visible={visible2}
confirmText="决策1"
cancelText="决策2"
onConfirm={() => setVisible2(false)}
onCancel={() => setVisible2(false)}
closeIcon
Expand Down
37 changes: 18 additions & 19 deletions src/packages/dialog/demos/taro/demo7.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from 'react'
import { Cell, Dialog } from '@nutui/nutui-react-taro'
import { View } from '@tarojs/components'

const Demo7 = () => {
const [visible, setVisible] = useState(false)
Expand All @@ -18,25 +19,23 @@ const Demo7 = () => {
onConfirm={() => setVisible(false)}
onCancel={() => setVisible(false)}
>
<>
<div>
文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容
</div>
<div
style={{
height: '96px',
borderRadius: '8px',
marginTop: '13px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#F7F8FC',
color: '#C2C4CC',
}}
>
自定义内容区域
</div>
</>
<View>
文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容
</View>
<View
style={{
height: '96px',
borderRadius: '8px',
marginTop: '13px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#F7F8FC',
color: '#C2C4CC',
}}
>
自定义内容区域
</View>
</Dialog>
</>
)
Expand Down
17 changes: 10 additions & 7 deletions src/packages/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
flex-direction: column;
align-items: center;
width: $dialog-width;
max-height: 67%;
// max-height: 67%;
min-height: $dialog-min-height;
padding: $dialog-padding;
box-sizing: border-box;
Expand Down Expand Up @@ -42,27 +42,30 @@
display: flex;
justify-content: center;
align-items: center;
top: $dialog-close-top;
color: $dialog-close-color;
.nut-icon {
font-size: 24px;
height: 24px;
width: 24px;
font-size: $dialog-close-width;
width: $dialog-close-width;
height: $dialog-close-height;
}

&-top-right {
top: $dialog-close-top;
right: $dialog-close-right;
}

&-top-left {
top: $dialog-close-top;
left: $dialog-close-left;
}

&-bottom {
top: initial;
bottom: -56px;
left: 50%;
transform: translate(-50%);
transform: translateY(-50%);
.nut-icon {
color: $dialog-close-color;
}
}

&:active {
Expand Down