Skip to content

Commit 7b39222

Browse files
committed
Merge branch 'develop' into feature/chat
2 parents 01d748e + cf30e19 commit 7b39222

File tree

34 files changed

+166
-102
lines changed

34 files changed

+166
-102
lines changed

.github/workflows/tag-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ jobs:
5555
git config --local user.name "github-actions[bot]"
5656
git status
5757
git fetch origin
58-
git merge origin/develop
58+
git merge origin/develop -X theirs
5959
git push origin main

packages/components/calendar/README.en-US.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ name | type | default | description | required
88
-- | -- | -- | -- | --
99
style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
11+
allow-same-day | Boolean | false | `1.11.2` | N
1112
auto-close | Boolean | true | `0.34.0` | N
1213
confirm-btn | String / Object | '' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
1314
first-day-of-week | Number | 0 | \- | N
14-
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
15-
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
15+
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
16+
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
1617
max-date | Number | - | \- | N
1718
min-date | Number | - | \- | N
1819
readonly | Boolean | - | `1.9.7` | N
1920
switch-mode | String | none | `1.8.2`。options: none/month/year-month | N
2021
title | String | - | \- | N
21-
type | String | 'single' | options: single/multiple/range | N
22+
type | String | single | options: single/multiple/range | N
2223
use-popup | Boolean | true | `0.32.0` | N
2324
using-custom-navbar | Boolean | false | \- | N
24-
value | Number / Array | - | Typescript`number \| number[]` | N
25-
default-value | Number / Array | undefined | uncontrolled property。Typescript`number \| number[]` | N
25+
value | Number / Array | - | Typescript: `number \| number[]` | N
26+
default-value | Number / Array | undefined | uncontrolled property。Typescript: `number \| number[]` | N
2627
visible | Boolean | false | \- | N
2728

2829
### Calendar Events

packages/components/calendar/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ isComponent: true
7474
-- | -- | -- | -- | --
7575
style | Object | - | 样式 | N
7676
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
77+
allow-same-day | Boolean | false | `1.11.2`。是否允许区间选择日历的起止时间相同,仅当 `type='range'` 时有效 | N
7778
auto-close | Boolean | true | `0.34.0`。自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible | N
7879
confirm-btn | String / Object | '' | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/calendar/type.ts) | N
7980
first-day-of-week | Number | 0 | 第一天从星期几开始,默认 0 = 周日 | N
@@ -84,7 +85,7 @@ min-date | Number | - | 最小可选的日期,不传则默认今天 | N
8485
readonly | Boolean | - | `1.9.7`。是否只读,只读状态下不能选择日期 | N
8586
switch-mode | String | none | `1.8.2`。切换模式。 `none` 表示平铺展示所有月份; `month` 表示支持按月切换, `year-month` 表示既按年切换,也支持按月切换。可选项:none/month/year-month | N
8687
title | String | - | 标题,不传默认为“请选择日期” | N
87-
type | String | 'single' | 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择。可选项:single/multiple/range | N
88+
type | String | single | 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择。可选项:single/multiple/range | N
8889
use-popup | Boolean | true | `0.32.0`。是否使用弹出层包裹日历 | N
8990
using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
9091
value | Number / Array | - | 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组。TS 类型:`number \| number[]` | N

packages/components/calendar/calendar.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
}
140140

141141
&--selected,
142+
&--start-end,
142143
&--start,
143144
&--end {
144145
background: @calendar-active-color;

packages/components/calendar/calendar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export default class Calendar extends SuperComponent {
8686
this.base.type = v;
8787
},
8888

89+
allowSameDay(v) {
90+
this.base.allowSameDay = v;
91+
},
92+
8993
confirmBtn(v) {
9094
if (typeof v === 'string') {
9195
this.setData({ innerConfirmBtn: v === 'slot' ? 'slot' : { content: v } });

packages/components/calendar/props.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
import { TdCalendarProps } from './type';
88
const props: TdCalendarProps = {
9+
/** 是否允许区间选择日历的起止时间相同,仅当 `type='range'` 时有效 */
10+
allowSameDay: {
11+
type: Boolean,
12+
value: false,
13+
},
914
/** 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible */
1015
autoClose: {
1116
type: Boolean,

packages/components/calendar/type.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
import { ButtonProps } from '../button/index';
88

99
export interface TdCalendarProps {
10+
/**
11+
* 是否允许区间选择日历的起止时间相同,仅当 `type='range'` 时有效
12+
* @default false
13+
*/
14+
allowSameDay?: {
15+
type: BooleanConstructor;
16+
value?: boolean;
17+
};
1018
/**
1119
* 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible
1220
* @default true
@@ -83,7 +91,7 @@ export interface TdCalendarProps {
8391
};
8492
/**
8593
* 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择
86-
* @default 'single'
94+
* @default single
8795
*/
8896
type?: {
8997
type: StringConstructor;

packages/components/cascader/README.en-US.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
check-strictly | Boolean | false | \- | N
1212
close-btn | Boolean | true | \- | N
13-
keys | Object | - | Typescript`KeysType`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
14-
options | Array | [] | Typescript`Array<CascaderOption>` | N
13+
keys | Object | - | Typescript: `CascaderKeysType` `type CascaderKeysType = TreeKeysType`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/cascader/type.ts) | N
14+
options | Array | [] | Typescript: `Array<CascaderOption>` | N
1515
placeholder | String | 选择选项 | \- | N
16-
sub-titles | Array | [] | Typescript`Array<string>` | N
16+
sub-titles | Array | [] | Typescript: `Array<string>` | N
1717
theme | String | step | options: step/tab | N
1818
title | String | - | \- | N
1919
value | String / Number | null | \- | N

packages/components/cascader/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ style | Object | - | 样式 | N
6767
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
6868
check-strictly | Boolean | false | 父子节点选中状态不再关联,可各自选中或取消 | N
6969
close-btn | Boolean | true | 关闭按钮 | N
70-
keys | Object | - | 用来定义 value / label 在 `options` 中对应的字段别名。TS 类型:`KeysType`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
70+
keys | Object | - | 用来定义 value / label / children / disabled `options` 中对应的字段别名。TS 类型:`CascaderKeysType` `type CascaderKeysType = TreeKeysType`[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/cascader/type.ts) | N
7171
options | Array | [] | 可选项数据源。TS 类型:`Array<CascaderOption>` | N
7272
placeholder | String | 选择选项 | 未选中时的提示文案 | N
7373
sub-titles | Array | [] | 每级展示的次标题。TS 类型:`Array<string>` | N

0 commit comments

Comments
 (0)