Skip to content

Commit 16f8d43

Browse files
committed
doc: add next site
1 parent c8fa9f3 commit 16f8d43

File tree

6 files changed

+33
-20
lines changed

6 files changed

+33
-20
lines changed

antd-tools/gulpfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ gulp.task(
292292

293293
function publish(tagString, done) {
294294
let args = ['publish', '--with-antd-tools'];
295-
args = args.concat(['--tag', 'next']);
296295
if (tagString) {
297296
args = args.concat(['--tag', tagString]);
298297
}

components/date-picker/index.en-US.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ title: DatePicker
55
cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg
66
---
77

8+
To select or input a date.
9+
10+
## When To Use
11+
12+
By clicking the input box, you can select a date from a popup calendar.
13+
814
## API
915

1016
There are five kinds of picker:
@@ -89,6 +95,7 @@ The following APIs are shared by DatePicker, RangePicker.
8995
| 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` | - | |
9096
| suffixIcon | The custom suffix icon | v-slot:suffixIcon | - | |
9197
| 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) | - | |
98+
9299
### Common Events
93100

94101
| Events Name | Description | Arguments | Version |
@@ -116,6 +123,7 @@ The following APIs are shared by DatePicker, RangePicker.
116123
| showTime.defaultValue | To set default time of selected date, [demo](#components-date-picker-demo-disabled-date) | [dayjs](https://day.js.org/) | dayjs() | |
117124
| showToday | Whether to show `Today` button | boolean | true | |
118125
| value(v-model) | To set date | [dayjs](https://day.js.org/) | - | |
126+
119127
### DatePicker Events
120128

121129
| Events Name | Description | Arguments | Version |
@@ -147,6 +155,7 @@ The following APIs are shared by DatePicker, RangePicker.
147155
| Property | Description | Type | Default | Version |
148156
| --- | --- | --- | --- | --- |
149157
| format | To set the date format, refer to [dayjs](https://day.js.org/) | string | `YYYY-wo` | |
158+
150159
### RangePicker
151160

152161
| Property | Description | Type | Default | Version |
@@ -167,13 +176,13 @@ The following APIs are shared by DatePicker, RangePicker.
167176
### RangePicker Events
168177

169178
| Events Name | Description | Arguments | Version |
170-
| --- | --- | --- | --- |
179+
| --- | --- | --- | --- | --- |
171180
| 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` }) | - | |
172181
| change | a callback function, can be executed when the selected time is changing | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\]) | |
173182
| ok | callback when click ok button | function(dates: \[dayjs, dayjs\] \| \[string, string\]) | |
174183

175-
176184
## FAQ
185+
177186
### How to use DatePicker with customize date library(like moment.js \| dayjs \| date-fns)?
178187

179188
Please refer [replace date](/docs/vue/replace-date)

components/date-picker/index.zh-CN.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ subtitle: 日期选择框
66
cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg
77
---
88

9+
输入或选择日期的控件。
10+
11+
## 何时使用
12+
13+
当用户需要输入一个日期,可以点击标准输入框,弹出日期面板进行选择。
14+
915
## API
1016

1117
日期类组件包括以下五种形式。
@@ -89,7 +95,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg
8995
| popupStyle | 额外的弹出日历样式 | CSSProperties | {} | |
9096
| size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | `large` \| `middle` \| `small` | - | |
9197
| suffixIcon | 自定义的选择框后缀图标 | v-slot:suffixIcon | - | |
92-
| valueFormat | 可选,绑定值的格式,对 value、defaultValue、defaultPickerValue 起作用。不指定则绑定值为 dayjs 对象 | string,[具体格式](https://day.js.org/docs/zh-CN/display/format) | - | |
98+
| valueFormat | 可选,绑定值的格式,对 value、defaultValue、defaultPickerValue 起作用。不指定则绑定值为 dayjs 对象 | string,[具体格式](https://day.js.org/docs/zh-CN/display/format) | - | |
9399

94100
### 共有的事件
95101

@@ -121,10 +127,10 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg
121127

122128
### DatePicker 事件
123129

124-
| 事件名称 | 说明 | 回调参数 |
125-
| -------- | ------------------ | ---------------------------------------------------- |
130+
| 事件名称 | 说明 | 回调参数 |
131+
| -------- | ------------------ | --------------------------------------------------- |
126132
| change | 时间发生变化的回调 | function(date: dayjs \| string, dateString: string) |
127-
| ok | 点击确定按钮的回调 | function(date: dayjs \| string) |
133+
| ok | 点击确定按钮的回调 | function(date: dayjs \| string) |
128134

129135
### DatePicker\[picker=year]
130136

@@ -153,7 +159,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg
153159

154160
### RangePicker
155161

156-
157162
| 参数 | 说明 | 类型 | 默认值 | 版本 |
158163
| --- | --- | --- | --- | --- |
159164
| allowEmpty | 允许起始项部分为空 | \[boolean, boolean] | \[false, false] | |
@@ -168,20 +173,21 @@ cover: https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg
168173
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) | |
169174
| showTime.defaultValue | 设置用户选择日期时默认的时分秒,[例子](#components-date-picker-demo-disabled-date) | [dayjs](https://day.js.org/)\[] | \[dayjs(), dayjs()] | |
170175
| value(v-model) | 日期 | [dayjs](https://day.js.org/)\[] | - | |
176+
171177
### RangePicker 事件
172178

173179
| 事件名称 | 说明 | 回调参数 |
174180
| --- | --- | --- |
175-
| calendarChange | 待选日期发生变化的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\], info: { range:`start`\|`end` }) |
181+
| calendarChange | 待选日期发生变化的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\], info: { range:`start`\|`end` }) |
176182
| change | 日期范围发生变化的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\], dateStrings: \[string, string\]) |
177183
| ok | 点击确定按钮的回调 | function(dates: \[dayjs, dayjs\] \| \[string, string\]) |
178184

179185
## FAQ
186+
180187
### 如何在 DatePicker 中使用自定义日期库(如 moment.js \| dayjs \| date-fns)?
181188

182189
请参考[《自定义日期库》](/docs/vue/replace-date-cn)
183190

184191
### 为何全局修改 dayjs.locale 不生效?
185192

186193
DatePicker 默认 `locale``en`。你可以通过 DatePicker 的 `locale` 属性来单独设置,也可以通过 [ConfigProvider `locale`](/components/config-provider-cn) 属性来配置。
187-

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ant-design-vue",
3-
"version": "2.2.7",
3+
"version": "3.0.0-alpha.0",
44
"title": "Ant Design Vue",
55
"description": "An enterprise-class UI design language and Vue-based implementation",
66
"keywords": [
@@ -50,7 +50,7 @@
5050
"codecov": "codecov",
5151
"routes": "node site/scripts/genrateRoutes.js",
5252
"tsc": "tsc --noEmit",
53-
"site": "yarn routes && ./node_modules/vite/bin/vite.js build site --base=https://aliyuncdn.antdv.com/v2/",
53+
"site": "yarn routes && ./node_modules/vite/bin/vite.js build site --base=https://next.antdv.com/",
5454
"pub:site": "npm run site && node scripts/pushToOSS.js"
5555
},
5656
"repository": {

site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
name="keywords"
1717
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文档"
1818
/>
19-
<link rel="shortcut icon" type="image/x-icon" href="https://qn.antdv.com/favicon.ico" />
19+
<link rel="shortcut icon" type="image/x-icon" href="https://aliyuncdn.antdv.com/favicon.ico" />
2020
<style id="nprogress-style">
2121
#nprogress {
2222
display: none;

site/scripts/pushToOSS.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@ const accessKeyId = process.env.ALI_OSS_ACCESSKEY;
88
const accessKeySecret = process.env.ALI_OSS_SECRETKEY;
99

1010
const client = new OSS({
11-
bucket: 'antdv-beijing',
11+
bucket: 'next-antdv',
1212
cname: 'true',
13-
endpoint: 'aliyuncdn.antdv.com',
14-
// region以杭州为例(oss-cn-hangzhou),其他region按实际情况填写。
13+
endpoint: 'next-antdv.oss-cn-beijing.aliyuncs.com',
1514
region: 'oss-cn-beijing',
16-
// 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录RAM控制台创建RAM账号。
1715
accessKeyId,
1816
accessKeySecret,
1917
});
2018

2119
const assetsPath = path.join(process.cwd(), 'site', 'dist', 'assets');
2220

23-
const put = file => {
21+
const put = (target, source) => {
2422
return new Promise((reslove, reject) => {
2523
client
26-
.put(`v2/assets/${file}`, path.join(assetsPath, file))
24+
.put(target, source)
2725
.then(res => {
2826
if (res.res.status !== 200) {
2927
console.log(`${res.name} upload failed!`);
@@ -50,9 +48,10 @@ async function upload() {
5048
});
5149
for (const file of files) {
5250
if (file.isFile()) {
53-
await put(file.name);
51+
await put(`assets/${file.name}`, path.join(assetsPath, file.name));
5452
}
5553
}
54+
await put('index.html', path.join(process.cwd(), 'site', 'dist', 'index.html'));
5655
} catch (err) {
5756
console.error(err);
5857
}

0 commit comments

Comments
 (0)