Skip to content

Commit 72dfd8b

Browse files
authored
Merge branch 'jd-opensource:v4' into v4
2 parents 2dc26f8 + 45ba047 commit 72dfd8b

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

src/packages/__VUE/dialog/__tests__/index.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ test('Dialog: header slot', async () => {
6363
test('Dialog: closeOnClickOverlay', async () => {
6464
const wrapper1 = mount(Dialog, {
6565
props: {
66-
visible: true
66+
visible: true,
67+
closeOnClickOverlay: true
6768
}
6869
})
6970
const wrapper2 = mount(Dialog, {

src/packages/__VUE/dialog/doc.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const teleportClick = (teleport) => {
225225
| title | Title | string | - |
226226
| content | Content, support HTML | string | - |
227227
| teleport | Specifies a target element where Dialog will be mounted | string | `"body"` |
228-
| close-on-click-overlay | Whether to close when overlay is clicked | boolean | `true` |
228+
| close-on-click-overlay | Whether to close when overlay is clicked | boolean | `false` |
229229
| no-footer | Hide bottom button bar | boolean | `false` |
230230
| no-ok-btn | Hide OK button | boolean | `false` |
231231
| no-cancel-btn | Hide cancel button | boolean | `false` |

src/packages/__VUE/dialog/doc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const teleportClick = (teleport) => {
225225
| title | 标题 | string | - |
226226
| content | 内容,支持 HTML 和组件 | string \| VNode | |
227227
| teleport | 指定挂载节点 | string | `"body"` |
228-
| close-on-click-overlay | 点击蒙层是否关闭对话框 | boolean | `true` |
228+
| close-on-click-overlay | 点击蒙层是否关闭对话框 | boolean | `false` |
229229
| no-footer | 是否隐藏底部按钮栏 | boolean | `false` |
230230
| no-ok-btn | 是否隐藏确定按钮 | boolean | `false` |
231231
| no-cancel-btn | 是否隐藏取消按钮 | boolean | `false` |

src/packages/__VUE/dialog/doc.taro.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ const verticalClick = () => {
140140
| title | 标题 | string | - |
141141
| content | 内容,支持 `HTML` 和组件 | string \| VNode | - |
142142
| teleport | 指定挂载节点 | string | `"body"` |
143-
| close-on-click-overlay | 点击蒙层是否关闭对话框 | boolean | `true` |
143+
| close-on-click-overlay | 点击蒙层是否关闭对话框 | boolean | `false` |
144144
| no-footer | 是否隐藏底部按钮栏 | boolean | `false` |
145145
| no-ok-btn | 是否隐藏确定按钮 | boolean | `false` |
146146
| no-cancel-btn | 是否隐藏取消按钮 | boolean | `false` |
147147
| cancel-text | 取消按钮文案 | string | `”取消“` |
148148
| ok-text | 确定按钮文案 | string | `”确 定“` |
149149
| cancel-auto-close | 取消按钮是否默认关闭弹窗 | boolean | `true` |
150150
| ok-auto-close`4.2.1` | 确认按钮是否默认关闭弹窗 | boolean | `true` |
151-
| text-align | 文字对齐方向,可选值同 `css``text-align ` | string | `"center"` |
151+
| text-align | 文字对齐方向,可选值同 `css``text-align` | string | `"center"` |
152152
| close-on-popstate | 是否在页面回退时自动关闭 | boolean | `false` |
153153
| lock-scroll | 背景是否锁定 | boolean | `true` |
154154
| footer-direction | 使用横纵方向 可选值 `horizontal``vertical` | string | `horizontal` |

src/packages/__VUE/dialog/index.taro.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default create({
6969
...popupProps,
7070
closeOnClickOverlay: {
7171
type: Boolean,
72-
default: true
72+
default: false
7373
},
7474
title: {
7575
type: String,

src/packages/__VUE/dialog/index.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default create({
6969
...popupProps,
7070
closeOnClickOverlay: {
7171
type: Boolean,
72-
default: true
72+
default: false
7373
},
7474
title: {
7575
type: String,
@@ -182,7 +182,10 @@ export default create({
182182
}
183183
184184
const onClickOverlay = () => {
185+
console.log(1)
186+
console.log(props.closeOnClickOverlay)
185187
if (props.closeOnClickOverlay) {
188+
console.log(2)
186189
closed('')
187190
}
188191
}

0 commit comments

Comments
 (0)