diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index f9665d00f..c2915141c 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -409,6 +409,7 @@ export default { openChange: this.handleOpenChange, }, style: popupStyle, + scopedSlots: { default: input, ...$scopedSlots }, }, ); return ( @@ -422,7 +423,7 @@ export default { onMouseenter={this.onMouseEnter} onMouseleave={this.onMouseLeave} > - {input} + ); }, diff --git a/components/date-picker/__tests__/__snapshots__/demo.test.js.snap b/components/date-picker/__tests__/__snapshots__/demo.test.js.snap index 95e81b216..d4dcfd5d3 100644 --- a/components/date-picker/__tests__/__snapshots__/demo.test.js.snap +++ b/components/date-picker/__tests__/__snapshots__/demo.test.js.snap @@ -70,6 +70,12 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `

ab

ab

~ ab
ab `; +exports[`renders ./components/date-picker/demo/text.md correctly 1`] = ` +
SelectTime
+ 请选择 +
+`; + exports[`renders ./components/date-picker/demo/time.md correctly 1`] = `

~ - {input} + ); }, diff --git a/components/date-picker/demo/index.vue b/components/date-picker/demo/index.vue index 7d402765a..f0c823c30 100644 --- a/components/date-picker/demo/index.vue +++ b/components/date-picker/demo/index.vue @@ -11,6 +11,7 @@ import Size from './size'; import StartEnd from './start-end'; import Time from './time'; import Suffix from './suffix'; +import Text from './text'; import CN from '../index.zh-CN.md'; import US from '../index.en-US.md'; const md = { @@ -47,6 +48,7 @@ export default {