Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/calendar/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ allow-same-day | Boolean | false | `1.11.2` | N
auto-close | Boolean | true | `0.34.0` | N
confirm-btn | String / Object | '' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
first-day-of-week | Number | 0 | \- | N
format | Function | - | Typescript: `CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
format | Function | - | Typescript: `CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'start-end' \|'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
locale-text | Object | - | Typescript: `CalendarLocaleText` `interface CalendarLocaleText {title?: string; weekdays?: string[]; monthTitle?: string; months?: string[]; confirm?: string;}`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
max-date | Number | - | \- | N
min-date | Number | - | \- | N
Expand Down Expand Up @@ -61,4 +61,4 @@ Name | Default Value | Description
--td-calendar-switch-mode-icon-color | @text-color-secondary | -
--td-calendar-switch-mode-icon-disabled-color | @text-color-disabled | -
--td-calendar-title-color | @text-color-primary | -
--td-calendar-title-font-size | 18px | -
--td-calendar-title-font-size | 18px | -
4 changes: 2 additions & 2 deletions packages/components/calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ allow-same-day | Boolean | false | `1.11.2`。是否允许区间选择日历的
auto-close | Boolean | true | `0.34.0`。自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible | N
confirm-btn | String / Object | '' | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
first-day-of-week | Number | 0 | 第一天从星期几开始,默认 0 = 周日 | N
format | Function | - | 用于格式化日期的函数。TS 类型:`CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
format | Function | - | 用于格式化日期的函数。TS 类型:`CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'start-end' \|'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
locale-text | Object | - | 国际化文案。TS 类型:`CalendarLocaleText` `interface CalendarLocaleText {title?: string; weekdays?: string[]; monthTitle?: string; months?: string[]; confirm?: string;}`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
max-date | Number | - | 最大可选的日期,不传则默认半年后 | N
min-date | Number | - | 最小可选的日期,不传则默认今天 | N
Expand Down Expand Up @@ -127,4 +127,4 @@ title | 标题
--td-calendar-switch-mode-icon-color | @text-color-secondary | -
--td-calendar-switch-mode-icon-disabled-color | @text-color-disabled | -
--td-calendar-title-color | @text-color-primary | -
--td-calendar-title-font-size | 18px | -
--td-calendar-title-font-size | 18px | -
2 changes: 1 addition & 1 deletion packages/components/calendar/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export interface TdCalendarProps {

export type CalendarFormatType = (day: TDate) => TDate;

export type TDateType = 'selected' | 'disabled' | 'start' | 'centre' | 'end' | '';
export type TDateType = 'selected' | 'disabled' | 'start' | 'start-end' | 'centre' | 'end' | '';

export interface TDate {
date: Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spline: explain
小程序已经支持使用 NPM 安装第三方包,详见 [NPM 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm)

```bash
npm i tdesign-miniprogram -S --production
npm i tdesign-miniprogram@beta
```

> 安装完之后,需要在微信开发者工具中对 npm 进行构建:`工具 - 构建 npm`。(构建时若出现`NPM packages not found`字样,请到 `project.config.json` 文件补充 `packNpmManually` 和 `packNpmRelationList` 配置项,具体见[NPM 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm))
Expand Down
2 changes: 1 addition & 1 deletion packages/tdesign-miniprogram/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docClass: timeline
- ⚠️ `itemHeight` 默认单位改用 `px`,避免单位转换带来的精度问题 @anlyyao ([#4052](https://github.com/Tencent/tdesign-miniprogram/pull/4052))
- 新增 `visibleItemCount` 属性,可自定义可视区域 `PickerItem` 的子项个数 @anlyyao ([#4052](https://github.com/Tencent/tdesign-miniprogram/pull/4052))
- 优化大量数据时列表滚动性能 @jarmywang ([#4014](https://github.com/Tencent/tdesign-miniprogram/pull/4014))
- `Calendar`: 新增 `allowSameDay` 属性,允许 `type='range'` 场景的起始时间相同 @anlyyao ([#4045](https://github.com/Tencent/tdesign-miniprogram/pull/4045))
- `Calendar`: 新增 `allowSameDay` 属性,允许 `type='range'` 场景的起止时间相同 @anlyyao ([#4045](https://github.com/Tencent/tdesign-miniprogram/pull/4045))
- `Cascader`: 支持通过 `keys` 属性定义 `children / disabled` 在 `options` 中对应的字段别名 @anlyyao ([#4044](https://github.com/Tencent/tdesign-miniprogram/pull/4044))


Expand Down
Loading