Skip to content

Commit 55bfcf0

Browse files
authored
fix(DateTimePicker): support popupProps.usingCustomNavbar (#3254)
* fix(DateTimePicker): support popupProps.usingCustomNavbar * test: update snapshots
1 parent 6d7c9a4 commit 55bfcf0

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

src/date-time-picker/__test__/__snapshots__/demo.test.js.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ exports[`DateTimePicker DateTimePicker year-month-date demo works fine 1`] = `
182182
filter="{{[Function]}}"
183183
format="YYYY-MM-DD"
184184
mode="date"
185+
popupProps="{{
186+
Object {
187+
"usingCustomNavbar": true,
188+
}
189+
}}"
185190
start="2000-01-01 00:00:00"
186191
title="选择日期"
187192
visible="{{false}}"

src/date-time-picker/_example/year-month-date/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Page({
1414
}
1515
return options;
1616
},
17+
popupProps: {
18+
usingCustomNavbar: true,
19+
},
1720
},
1821
showPicker(e) {
1922
const { mode } = e.currentTarget.dataset;

src/date-time-picker/_example/year-month-date/index.wxml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
mode="date"
1717
defaultValue="{{date}}"
1818
format="YYYY-MM-DD"
19-
bindchange="onConfirm"
20-
bindpick="onColumnChange"
21-
bindcancel="hidePicker"
2219
start="{{start}}"
2320
end="{{end}}"
2421
filter="{{filter}}"
22+
popup-props="{{popupProps}}"
23+
bindchange="onConfirm"
24+
bindpick="onColumnChange"
25+
bindcancel="hidePicker"
2526
/>

src/picker/picker.wxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
class="class"
66
visible="{{visible}}"
77
placement="bottom"
8-
usingCustomNavbar="{{usingCustomNavbar}}"
9-
bind:visible-change="onPopupChange"
8+
using-custom-navbar="{{usingCustomNavbar || popupProps.usingCustomNavbar}}"
109
z-index="{{ popupProps.zIndex || defaultPopUpzIndex }}"
1110
overlay-props="{{ popupProps.overlayProps || defaultPopUpProps }}"
11+
bind:visible-change="onPopupChange"
1212
>
1313
<include src="./template.wxml" />
1414
</t-popup>

0 commit comments

Comments
 (0)