Skip to content

Commit

Permalink
Merge branch 'develop' into feat/theme-generator
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed May 30, 2022
2 parents 19e38b1 + 22bac24 commit 344f8b8
Show file tree
Hide file tree
Showing 109 changed files with 5,723 additions and 1,786 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:
jobs:
compressed-size:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'release/')
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: 94dreamer/compressed-size-action@master
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
pattern: "./dist/**/*.{js,css}"
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: './dist/**/*.{js,css}'
3 changes: 2 additions & 1 deletion .github/workflows/tag-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ jobs:
uses: Tencent/tdesign/.github/workflows/publish.yml@main
secrets:
TDESIGN_SURGE_TOKEN: ${{ secrets.TDESIGN_SURGE_TOKEN }}
TDESIGN_NPM_TOKEN: ${{ secrets.TDESIGN_NPM_TOKEN }}
TDESIGN_NPM_TOKEN: ${{ secrets.TDESIGN_NPM_TOKEN }}
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,30 @@ toc: false
docClass: timeline
---

## 🌈 0.41.5 `2022-05-20`
### 🚀 Features
- `Form`: 支持 `help` 配置的表单项说明内容与错误提示同时展示,未配置 `help` 时不再默认占位 @HQ-Lin ([#884](https://github.com/Tencent/tdesign-vue/pull/884))
- `Table`: @chaishi (https://github.com/Tencent/tdesign-vue/pull/879))
- 树形结构,支持默认展开全部,`tree.defaultExpandAll`[issue#852](https://github.com/Tencent/tdesign-vue/issues/852)
- 树形结构,支持自由控制展开全部,或收起全部 `expandAll()` `foldAll()`
- 树形结构,支持拖拽排序,调整同层级顺序
- 树形结构,支持在当前节点之前插入新节点 `insertBefore`
- 树形结构,支持在当后节点之后插入新节点 `insertAfter`
- `Tree`: label 支持多行文本展示,[issue# common 444](https://github.com/Tencent/tdesign-common/issues/444) @ccccpj ([#460](https://github.com/Tencent/tdesign-common/pull/460))
### 🐞 Bug Fixes
- `Table`: 列拖动优化;修复选中行后列拖动距离被重置问题 @LoopZhou ([#870](https://github.com/Tencent/tdesign-vue/pull/870))
- `Table`: 修复 多级表头 + 列配置 综合示例中,列数量超出一定限制时报错,[issue#713](https://github.com/Tencent/tdesign-vue-next/issues/713) @chaishi ([#875](https://github.com/Tencent/tdesign-vue/pull/875))
- `Transfer`: 修复列表数量变化时的页码展示问题 @BigLiao ([#893](https://github.com/Tencent/tdesign-vue/pull/893))
- `Input`: 修复 `clear` 触发后的 `focus`, 修复外部传入`onMouseenter`, `onMouseleave`, `onwheel` 事件导致组件内对应`方法`未执行的问题 @pengYYYYY ([#894](https://github.com/Tencent/tdesign-vue/pull/894))
- `TreeSelect`: 修复未支持 treeProps.keys.children 字段配置的问题 @LoopZhou ([#890](https://github.com/Tencent/tdesign-vue/pull/890))
- `Menu`: 修复 `expandType=popup` 时箭头方向展示错误的问题,@fengxianqi ([#806](https://github.com/Tencent/tdesign-vue/pull/806))
- `Menu`: 修复 width 不支持数组类型的问题,@LeeJim ([#897](https://github.com/Tencent/tdesign-vue/pull/897))

## 🌈 0.41.3 `2022-05-13`
### 🚀 Features
- `Icon`: 更新图标 新增`file-icon`图标 调整`file-excel``file-pdf``file-powerpoint``file-unknown``file-word``star-filled`图标的绘制路径 @uyarn ([#854](https://github.com/Tencent/tdesign-vue/pull/854))
- `Dialog`: 支持`preventScrollThrough` API @uyarn ([#861](https://github.com/Tencent/tdesign-vue/pull/861))
- `Tabl
树形结构图标 `treeExpandAndFoldIcon`,同时支持全局配置此图标,[issue#717](https://github.com/Tencent/tdesign-vue-next/issues/717) @chaishi ([#863](https://github.com/Tencent/tdesign-vue/pull/863))
- `Table`: 支持自定义树形结构图标 `treeExpandAndFoldIcon`,同时支持全局配置此图标,[issue#717](https://github.com/Tencent/tdesign-vue-next/issues/717) @chaishi ([#863](https://github.com/Tencent/tdesign-vue/pull/863))
- `Table`: 支持隐藏排序文本提示 `hideSortTips`,同时支持全局配置是否隐藏排序文本提示,[issue#736](https://github.com/Tencent/tdesign-vue-next/issues/736) @chaishi ([#863](https://github.com/Tencent/tdesign-vue/pull/863))
- `Steps`: 新增 `separator` 属性,用于控制步骤条分隔符类型 @HQ-Lin ([#863](https://github.com/Tencent/tdesign-vue/pull/868))
### 🐞 Bug Fixes
Expand Down
19 changes: 19 additions & 0 deletions examples/affix/affix.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:: BASE_DOC ::

## API

### Affix Props

name | type | default | description | required
-- | -- | -- | -- | --
container | String / Function | () => (() => window) | Typescript:`ScrollContainer` | N
offsetBottom | Number | 0 | \- | N
offsetTop | Number | 0 | \- | N
zIndex | Number | - | \- | N
onFixedChange | Function | | TS 类型:`(affixed: boolean, context: { top: number }) => void`<br/> | N

### Affix Events

name | params | description
-- | -- | --
fixed-change | `(affixed: boolean, context: { top: number })` | \-
25 changes: 25 additions & 0 deletions examples/alert/alert.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:: BASE_DOC ::

## API

### Alert Props

name | type | default | description | required
-- | -- | -- | -- | --
close | String / Boolean / Slot / Function | false | Typescript:`string | boolean | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
icon | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
maxLine | Number | 0 | \- | N
message | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
operation | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | info | options:success/info/warning/error | N
title | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
onClose | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/> | N
onClosed | Function | | TS 类型:`(context: { e: TransitionEvent }) => void`<br/> | N

### Alert Events

name | params | description
-- | -- | --
close | `(context: { e: MouseEvent })` | \-
closed | `(context: { e: TransitionEvent })` | \-
38 changes: 38 additions & 0 deletions examples/anchor/anchor.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
:: BASE_DOC ::

## API

### Anchor Props

name | type | default | description | required
-- | -- | -- | -- | --
affixProps | Object | - | Typescript:`AffixProps`[Affix API Documents](./affix?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/anchor/type.ts) | N
bounds | Number | 5 | \- | N
container | String / Function | () => (() => window) | Typescript:`ScrollContainer` | N
cursor | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
size | String | medium | options:small/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
targetOffset | Number | 0 | \- | N
onChange | Function | | TS 类型:`(currentLink: string, prevLink: string) => void`<br/> | N
onClick | Function | | TS 类型:`(link: { href: string; title: string; e: MouseEvent }) => void`<br/> | N

### Anchor Events

name | params | description
-- | -- | --
change | `(currentLink: string, prevLink: string)` | \-
click | `(link: { href: string; title: string; e: MouseEvent })` | \-

### AnchorItem Props

name | type | default | description | required
-- | -- | -- | -- | --
href | String | - | required | Y
target | String | _self | options:_self/_blank/_parent/_top | N
title | String / Slot / Function | '' | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N

### AnchorTarget Props

name | type | default | description | required
-- | -- | -- | -- | --
id | String | - | required | Y
tag | String | div | \- | N
24 changes: 15 additions & 9 deletions examples/anchor/demos/container.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="anchor-demo anchor-container-demo">
<t-anchor container="#anchor-container">
<t-anchor container="#anchor-container" @click="handleClick">
<t-anchor-item href="#content-1" title="content-1"></t-anchor-item>
<t-anchor-item href="#content-2" title="content-2"></t-anchor-item>
<t-anchor-item href="#content-3" title="content-3"></t-anchor-item>
Expand All @@ -16,10 +16,16 @@
</div>
</template>
<script>
export default {};
export default {
methods: {
handleClick({ e, href, title }) {
e.preventDefault();
console.log('click', href, title);
},
},
};
</script>
<style lang='less' scoped>
<style lang="less" scoped>
.anchor-container-demo {
display: flex;
}
Expand All @@ -33,19 +39,19 @@ export default {};
line-height: 100px;
}
.anchor-content-1 {
background: #ECF2FE;
background: #ecf2fe;
}
.anchor-content-2 {
background: #D4E3FC;
background: #d4e3fc;
}
.anchor-content-3 {
background: #BBD3FB;
background: #bbd3fb;
}
.anchor-content-4 {
background: #96BBF8;
background: #96bbf8;
}
.anchor-content-5 {
background: #699EF5;
background: #699ef5;
}
}
</style>
32 changes: 32 additions & 0 deletions examples/avatar/avatar.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:: BASE_DOC ::

## API

### Avatar Props

name | type | default | description | required
-- | -- | -- | -- | --
alt | String | - | show it when url is not valid | N
hideOnLoadFailed | Boolean | false | hide image when loading image failed | N
icon | Slot / Function | - | use icon to fill。Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
image | String | - | images url | N
shape | String | circle | shape。options:circle/round。Typescript:`ShapeEnum ` `type ShapeEnum = 'circle' | 'round'`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
size | String | - | size | N
onError | Function | | TS 类型:`() => void`<br/>trigger on image load failed | N

### Avatar Events

name | params | description
-- | -- | --
error | \- | trigger on image load failed

### AvatarGroup Props

name | type | default | description | required
-- | -- | -- | -- | --
cascading | String | 'right-up' | multiple images cascading。options:left-up/right-up。Typescript:`CascadingValue` `type CascadingValue = 'left-up' | 'right-up'`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
collapseAvatar | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
max | Number | - | \- | N
placement | String | - | popup placement。options:left/top/bottom/right。Typescript:`MaxOverPlacement` `type MaxOverPlacement = 'left' | 'top' | 'bottom' | 'right'`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
popupProps | Object | - | Typescript:`PopupProps`[Popup API Documents](./popup?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
size | String | medium | size | N
18 changes: 18 additions & 0 deletions examples/badge/badge.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:: BASE_DOC ::

## API

### Badge Props

name | type | default | description | required
-- | -- | -- | -- | --
color | String | - | \- | N
content | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
count | String / Number / Slot / Function | 0 | Typescript:`string | number | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
dot | Boolean | false | \- | N
maxCount | Number | 99 | \- | N
offset | Array | - | Typescript:`Array<string | number>` | N
shape | String | circle | options:circle/round | N
showZero | Boolean | false | \- | N
size | String | medium | options:small/medium | N
26 changes: 26 additions & 0 deletions examples/breadcrumb/breadcrumb.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
:: BASE_DOC ::

## API

### Breadcrumb Props

name | type | default | description | required
-- | -- | -- | -- | --
maxItemWidth | String | undefined | \- | N
options | Array | - | Typescript:`Array<TdBreadcrumbItemProps>` | N
separator | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | light | options:light | N

### BreadcrumbItem Props

name | type | default | description | required
-- | -- | -- | -- | --
content | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
disabled | Boolean | - | \- | N
href | String | - | \- | N
maxWidth | String | undefined | \- | N
replace | Boolean | false | \- | N
router | Object | - | Typescript:`any` | N
target | String | _self | options:_blank/_self/_parent/_top | N
to | String / Object | - | Typescript:`Route` `interface Route { path?: string; name?: string; hash?: string; query?: RouteData; params?: RouteData }` `type RouteData = { [key: string]: string | string[] }`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/breadcrumb/type.ts) | N
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ icon | Slot / Function | - | use it to set left icon in button。Typescript:`T
loading | Boolean | false | set button to be loading state | N
shape | String | rectangle | button shape。options:rectangle/square/round/circle | N
size | String | medium | a button has three size。options:small/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | undefined | button theme。options:default/primary/danger/warning/success | N
theme | String | - | button theme。options:default/primary/danger/warning/success | N
type | String | button | type of button element in html。options:submit/reset/button | N
variant | String | base | variant of button。options:base/outline/dashed/text | N
onClick | Function | | `(e: MouseEvent<HTMLButtonElement>) => {}` | N
onClick | Function | | TS 类型:`(e: MouseEvent) => void`<br/> | N

### Button Events

name | params | description
-- | -- | --
click | `(e: MouseEvent<HTMLButtonElement>)` | -
click | `(e: MouseEvent)` | \-
62 changes: 62 additions & 0 deletions examples/calendar/calendar.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
:: BASE_DOC ::

## API

### Calendar Props

name | type | default | description | required
-- | -- | -- | -- | --
cell | String / Slot / Function | - | Typescript:`string | TNode<CalendarCell>`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
cellAppend | String / Slot / Function | - | Typescript:`string | TNode<CalendarCell>`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
controllerConfig | Boolean / Object | - | Typescript:`boolean | CalendarController` | N
fillWithZero | Boolean | - | \- | N
firstDayOfWeek | Number | - | options:1/2/3/4/5/6/7 | N
format | String | 'YYYY-MM-DD' | \- | N
head | String / Slot / Function | - | Typescript:`string | TNode<ControllerOptions>`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
isShowWeekendDefault | Boolean | true | \- | N
mode | String | month | options:month/year | N
month | String / Number | - | \- | N
preventCellContextmenu | Boolean | false | \- | N
range | Array | - | Typescript:`Array<CalendarValue>` | N
theme | String | full | options:full/card | N
value | String / Date | - | Typescript:`CalendarValue` `type CalendarValue = string | Date`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
week | Array / Slot / Function | - | Typescript:`Array<string> | TNode<CalendarWeek>` `interface CalendarWeek { day: WeekDay }` `type WeekDay = 1 | 2 | 3 | 4 | 5 | 6 | 7`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
year | String / Number | - | \- | N
onCellClick | Function | | TS 类型:`(options: { cell: CalendarCell; e: MouseEvent }) => void`<br/> | N
onCellDoubleClick | Function | | TS 类型:`(options: { cell: CalendarCell; e: MouseEvent }) => void`<br/> | N
onCellRightClick | Function | | TS 类型:`(options: { cell: CalendarCell; e: MouseEvent }) => void`<br/> | N
onControllerChange | Function | | TS 类型:`(options: ControllerOptions) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts)。<br/>`interface ControllerOptions { filterDate: Date; formattedFilterDate: string; mode: string; isShowWeekend: boolean }`<br/> | N
onMonthChange | Function | | TS 类型:`(options: { month: string; year: string }) => void`<br/> | N

### Calendar Events

name | params | description
-- | -- | --
cell-click | `(options: { cell: CalendarCell; e: MouseEvent })` | \-
cell-double-click | `(options: { cell: CalendarCell; e: MouseEvent })` | \-
cell-right-click | `(options: { cell: CalendarCell; e: MouseEvent })` | \-
controller-change | `(options: ControllerOptions)` | [see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts)。<br/>`interface ControllerOptions { filterDate: Date; formattedFilterDate: string; mode: string; isShowWeekend: boolean }`<br/>
month-change | `(options: { month: string; year: string })` | \-

### CalendarController

name | type | default | description | required
-- | -- | -- | -- | --
current | Object | - | Typescript:`{ visible?: boolean; currentDayButtonProps?: ButtonProps; currentMonthButtonProps?: ButtonProps }` | N
disabled | Boolean | false | \- | N
mode | Object | - | Typescript:`{ visible?: boolean; radioGroupProps?: RadioGroupProps }`[Radio API Documents](./radio?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
month | Object | - | Typescript:`{ visible?: boolean; selectProps?: SelectProps }` | N
weekend | Object | - | Typescript:`{ visible?: boolean; showWeekendButtonProps?: CheckTagProps; hideWeekendButtonProps?: CheckTagProps }`[Tag API Documents](./tag?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
year | Object | - | Typescript:`{ visible?: boolean; selectProps?: SelectProps }`[Select API Documents](./select?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N

### CalendarCell

name | type | default | description | required
-- | -- | -- | -- | --
belongTo | Number | - | \- | N
date | Object | - | Typescript:`Date` | N
day | Number | - | \- | N
formattedDate | String | - | \- | N
isCurrent | Boolean | - | \- | N
weekOrder | Number | - | \- | N
`ControllerOptions` | \- | - | \- | N
Loading

0 comments on commit 344f8b8

Please sign in to comment.