Skip to content

Commit

Permalink
chore: resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
2 parents e5e7d9c + 3bdda50 commit af4a5c8
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 8 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ auto-close | Boolean | true | `0.34.0` | N
confirm-btn | String / Object / Slot | '' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/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/tree/develop/src/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/tree/develop/src/calendar/type.ts) | N
max-date | Number | - | \- | N
min-date | Number | - | \- | N
title | String / Slot | '请选择日期' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
title | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
type | String | 'single' | options: single/multiple/range | N
use-popup | Boolean | true | `0.32.0` | N
using-custom-navbar | Boolean | false | \- | N
Expand All @@ -29,4 +30,5 @@ name | params | description
change | `(value: timestamp)` | `0.28.0`
close | `(trigger: CalendarTrigger)` | `0.34.0`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/calendar/type.ts)。<br/>`type CalendarTrigger = 'close-btn' \| 'confirm-btn' \| 'overlay'`<br/>
confirm | `(value: timestamp)` | \-
scroll | `({scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY})` | `1.4.6`。triggered when scrolling
select | `(value: timestamp)` | `0.28.0`
4 changes: 3 additions & 1 deletion packages/products/tdesign-miniprogram/src/calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ auto-close | Boolean | true | `0.34.0`。自动关闭;在点击关闭按钮、
confirm-btn | String / Object / Slot | '' | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/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/tree/develop/src/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/tree/develop/src/calendar/type.ts) | N
max-date | Number | - | 最大可选的日期,不传则默认半年后 | N
min-date | Number | - | 最小可选的日期,不传则默认今天 | N
title | String / Slot | '请选择日期' | 标题。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
title | String / Slot | - | 标题,不传默认为“请选择日期”[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
type | String | 'single' | 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择。可选项:single/multiple/range | N
use-popup | Boolean | true | `0.32.0`。是否使用弹出层包裹日历 | N
using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
Expand All @@ -29,4 +30,5 @@ visible | Boolean | false | 是否显示日历;`usePopup` 为 true 时有效 |
change | `(value: timestamp)` | `0.28.0`。不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple)
close | `(trigger: CalendarTrigger)` | `0.34.0`。关闭按钮时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/calendar/type.ts)。<br/>`type CalendarTrigger = 'close-btn' \| 'confirm-btn' \| 'overlay'`<br/>
confirm | `(value: timestamp)` | 点击确认按钮时触发
scroll | `({scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY})` | `1.4.6`。滚动时触发
select | `(value: timestamp)` | `0.28.0`。点击日期时触发
7 changes: 5 additions & 2 deletions packages/products/tdesign-miniprogram/src/calendar/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const props: TdCalendarProps = {
format: {
type: null,
},
/** 国际化文案 */
localeText: {
type: Object,
},
/** 最大可选的日期,不传则默认半年后 */
maxDate: {
type: Number,
Expand All @@ -33,10 +37,9 @@ const props: TdCalendarProps = {
minDate: {
type: Number,
},
/** 标题 */
/** 标题,不传默认为“请选择日期” */
title: {
type: String,
value: '',
},
/** 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择 */
type: {
Expand Down
18 changes: 16 additions & 2 deletions packages/products/tdesign-miniprogram/src/calendar/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export interface TdCalendarProps {
type: undefined;
value?: CalendarFormatType;
};
/**
* 国际化文案
*/
localeText?: {
type: ObjectConstructor;
value?: CalendarLocaleText;
};
/**
* 最大可选的日期,不传则默认半年后
*/
Expand All @@ -53,8 +60,7 @@ export interface TdCalendarProps {
value?: number;
};
/**
* 标题
* @default '请选择日期'
* 标题,不传默认为“请选择日期”
*/
title?: {
type: StringConstructor;
Expand Down Expand Up @@ -120,3 +126,11 @@ export interface TDate {
prefix?: string;
suffix?: string;
}

export interface CalendarLocaleText {
title?: string;
weekdays?: string[];
monthTitle?: string;
months?: string[];
confirm?: string;
}
41 changes: 39 additions & 2 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -16362,6 +16362,43 @@
"Boolean"
]
},
{
"id": 1731402896,
"platform_framework": [
"64"
],
"component": "Calendar",
"field_category": 1,
"field_name": "localeText",
"field_type": [
"8"
],
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "国际化文案",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
"create_time": "2024-11-12 09:14:56",
"update_time": "2024-11-12 09:14:56",
"event_output": null,
"custom_field_type": "CalendarLocaleText【interface CalendarLocaleText {title?: string; weekdays?: string[]; monthTitle?: string; months?: string[]; confirm?: string;}】",
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": "",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"Miniprogram"
],
"field_type_text": [
"Object"
]
},
{
"id": 3142,
"platform_framework": [
Expand Down Expand Up @@ -16785,9 +16822,9 @@
"1",
"64"
],
"field_default_value": "'请选择日期'",
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "标题",
"field_desc_zh": "标题,不传默认为“请选择日期”",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
Expand Down

0 comments on commit af4a5c8

Please sign in to comment.