diff --git a/antd-tools/gulpfile.js b/antd-tools/gulpfile.js index a0aeb477d..3ede340a9 100644 --- a/antd-tools/gulpfile.js +++ b/antd-tools/gulpfile.js @@ -292,7 +292,6 @@ gulp.task( function publish(tagString, done) { let args = ['publish', '--with-antd-tools']; - args = args.concat(['--tag', 'next']); if (tagString) { args = args.concat(['--tag', tagString]); } diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index c188e821a..401967cf7 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -5,6 +5,12 @@ title: DatePicker cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg --- +To select or input a date. + +## When To Use + +By clicking the input box, you can select a date from a popup calendar. + ## API There are five kinds of picker: @@ -89,6 +95,7 @@ The following APIs are shared by DatePicker, RangePicker. | size | To determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | `large` \| `middle` \| `small` | - | | | suffixIcon | The custom suffix icon | v-slot:suffixIcon | - | | | valueFormat | optional, format of binding value. If not specified, the binding value will be a Date object | string,[date formats](https://day.js.org/docs/en/display/format) | - | | + ### Common Events | Events Name | Description | Arguments | Version | @@ -116,6 +123,7 @@ The following APIs are shared by DatePicker, RangePicker. | showTime.defaultValue | To set default time of selected date, [demo](#components-date-picker-demo-disabled-date) | [dayjs](https://day.js.org/) | dayjs() | | | showToday | Whether to show `Today` button | boolean | true | | | value(v-model) | To set date | [dayjs](https://day.js.org/) | - | | + ### DatePicker Events | Events Name | Description | Arguments | Version | @@ -147,6 +155,7 @@ The following APIs are shared by DatePicker, RangePicker. | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | format | To set the date format, refer to [dayjs](https://day.js.org/) | string | `YYYY-wo` | | + ### RangePicker | Property | Description | Type | Default | Version | @@ -167,13 +176,13 @@ The following APIs are shared by DatePicker, RangePicker. ### RangePicker Events | Events Name | Description | Arguments | Version | -| --- | --- | --- | --- | +| --- | --- | --- | --- | --- | | calendarChange | Callback function, can be executed when the start time or the end time of the range is changing. | function(dates: \[dayjs, dayjs], dateStrings: \[string, string], info: { range:`start`\|`end` }) | - | | | change | a callback function, can be executed when the selected time is changing | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\]) | | | ok | callback when click ok button | function(dates: \[dayjs, dayjs\] \| \[string, string\]) | | - ## FAQ + ### How to use DatePicker with customize date library(like moment.js \| dayjs \| date-fns)? Please refer [replace date](/docs/vue/replace-date) diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index c22ec6c9d..9279537be 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -6,6 +6,12 @@ subtitle: 日期选择框 cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg --- +输入或选择日期的控件。 + +## 何时使用 + +当用户需要输入一个日期,可以点击标准输入框,弹出日期面板进行选择。 + ## API 日期类组件包括以下五种形式。 @@ -89,7 +95,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg | popupStyle | 额外的弹出日历样式 | CSSProperties | {} | | | size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | `large` \| `middle` \| `small` | - | | | suffixIcon | 自定义的选择框后缀图标 | v-slot:suffixIcon | - | | -| valueFormat | 可选,绑定值的格式,对 value、defaultValue、defaultPickerValue 起作用。不指定则绑定值为 dayjs 对象 | string,[具体格式](https://day.js.org/docs/zh-CN/display/format) | - | | +| valueFormat | 可选,绑定值的格式,对 value、defaultValue、defaultPickerValue 起作用。不指定则绑定值为 dayjs 对象 | string,[具体格式](https://day.js.org/docs/zh-CN/display/format) | - | | ### 共有的事件 @@ -121,10 +127,10 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg ### DatePicker 事件 -| 事件名称 | 说明 | 回调参数 | -| -------- | ------------------ | ---------------------------------------------------- | +| 事件名称 | 说明 | 回调参数 | +| -------- | ------------------ | --------------------------------------------------- | | change | 时间发生变化的回调 | function(date: dayjs \| string, dateString: string) | -| ok | 点击确定按钮的回调 | function(date: dayjs \| string) | +| ok | 点击确定按钮的回调 | function(date: dayjs \| string) | ### DatePicker\[picker=year] @@ -153,7 +159,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg ### RangePicker - | 参数 | 说明 | 类型 | 默认值 | 版本 | | --- | --- | --- | --- | --- | | allowEmpty | 允许起始项部分为空 | \[boolean, boolean] | \[false, false] | | @@ -168,15 +173,17 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg | showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) | | | showTime.defaultValue | 设置用户选择日期时默认的时分秒,[例子](#components-date-picker-demo-disabled-date) | [dayjs](https://day.js.org/)\[] | \[dayjs(), dayjs()] | | | value(v-model) | 日期 | [dayjs](https://day.js.org/)\[] | - | | + ### RangePicker 事件 | 事件名称 | 说明 | 回调参数 | | --- | --- | --- | -| calendarChange | 待选日期发生变化的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\], info: { range:`start`\|`end` }) | +| calendarChange | 待选日期发生变化的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\], info: { range:`start`\|`end` }) | | change | 日期范围发生变化的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\]) | | ok | 点击确定按钮的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\]) | ## FAQ + ### 如何在 DatePicker 中使用自定义日期库(如 moment.js \| dayjs \| date-fns)? 请参考[《自定义日期库》](/docs/vue/replace-date-cn) @@ -184,4 +191,3 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg ### 为何全局修改 dayjs.locale 不生效? DatePicker 默认 `locale` 为 `en`。你可以通过 DatePicker 的 `locale` 属性来单独设置,也可以通过 [ConfigProvider `locale`](/components/config-provider-cn) 属性来配置。 - diff --git a/package.json b/package.json index 809a9931a..b5c4bfe8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-vue", - "version": "2.2.7", + "version": "3.0.0-alpha.0", "title": "Ant Design Vue", "description": "An enterprise-class UI design language and Vue-based implementation", "keywords": [ @@ -50,7 +50,7 @@ "codecov": "codecov", "routes": "node site/scripts/genrateRoutes.js", "tsc": "tsc --noEmit", - "site": "yarn routes && ./node_modules/vite/bin/vite.js build site --base=https://aliyuncdn.antdv.com/v2/", + "site": "yarn routes && ./node_modules/vite/bin/vite.js build site --base=https://next.antdv.com/", "pub:site": "npm run site && node scripts/pushToOSS.js" }, "repository": { diff --git a/site/index.html b/site/index.html index 58265e687..3efb89b61 100644 --- a/site/index.html +++ b/site/index.html @@ -16,7 +16,7 @@ name="keywords" content="ant design vue,ant-design-vue,ant-design-vue admin,ant design pro,vue ant design,vue ant design pro,vue ant design admin,ant design vue官网,ant design vue中文文档,ant design vue文档" /> - +