Skip to content

Commit

Permalink
chore: release 1.9.9-naruto (#3275)
Browse files Browse the repository at this point in the history
* chore: modify TEST_GUIDE link (#3239)

* fix(table): table.columns.thClassName doesn't work (#3198) (#3238)

* fix(table): table.columns.thClassName doesn't work (#3198)

fix #3198

* test(table): add missing test: thClassName

* fix(Upload): fix global icon replacement (#3244)

* feat(borderless): support borderless API (#3249)

* docs(Input): value type remove Number

* feat: support borderless mode

* docs(auto-complete): update doc

* feat(descriptions): make layout type to be multiple type (#3252)

* fix(TagInput): tagProps should effect minCollapseNum tag (#3260)

* fix(TagInput): tagProps should effect minCollapseNum tag

* chore: fix lint

* chore(deps-dev): bump @babel/helper-module-imports from 7.22.5 to 7.24.7 (#3259)

Bumps [@babel/helper-module-imports](https://github.com/babel/babel/tree/HEAD/packages/babel-helper-module-imports) from 7.22.5 to 7.24.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.7/packages/babel-helper-module-imports)

---
updated-dependencies:
- dependency-name: "@babel/helper-module-imports"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(Form): fix Form scrollToFirstError bug (#3251)

* fix(Form): fix form-item class name and scrollToFirstError get form-item class name

* fix(Form): fix form-item class name and scrollToFirstError get form-item class name

* fix(Form): test update

---------

Co-authored-by: v-tangchenw <v-tangchenw.gd@chinatelecom.cn>

* chore: remove ghost config from live demo (#3265)

* chore: update common (#3273)

* chore: update common

* fix(cascader): fix remove and change trigger effect

* chore: release 1.9.9 (#3274)

* chore: release 1.9.9

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: release 1.9.9-naruto

* chore: release 1.9.9-naruto

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: theBestVayne <32293224+theBestVayne@users.noreply.github.com>
Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MorningUei <747651423@qq.com>
Co-authored-by: v-tangchenw <v-tangchenw.gd@chinatelecom.cn>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
7 people committed Aug 15, 2024
1 parent d8f1256 commit a07b470
Show file tree
Hide file tree
Showing 71 changed files with 1,158 additions and 589 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ toc: false
docClass: timeline
---

## 🌈 1.9.9 `2024-08-15`

### 🚀 Features

- `Table`: 新增支持 API `thClassName`,用于需要在列表头自定义类名的场景 @theBestVayne ([#3238](https://github.com/Tencent/tdesign-vue/pull/3238))
- `Borderless`: AutoComplete、ColorPicker、DatePicker、TagInput、TimePicker 、RangeInput、DateRangePicker 、TimeRangePicker 等组件新增 borderless API,支持无边框模式 @liweijie0812 ([#3249](https://github.com/Tencent/tdesign-vue/pull/3249))
- `Description`: layout 类型定义调整为字符串多类型 @liweijie0812 ([#3252](https://github.com/Tencent/tdesign-vue/pull/3252))

### 🐞 Bug Fixes

- `Cascader`: 修复多选下点击清空按钮的功能异常及多次触发 `onChange` 事件的问题 @uyarn ([#3273](https://github.com/Tencent/tdesign-vue/pull/3273))
- `Form`: 修复某种情况下 scrollToFirstError 失效的问题 @morningbao ([#3251](https://github.com/Tencent/tdesign-vue/pull/3251))
- `InputNumber`: 修复小数点精度计算,以 0 开头的计算边界逻辑缺失导致计算错误的问题 @uyarn ([#3273](https://github.com/Tencent/tdesign-vue/pull/3273))
- `Table`: 修复拖拽排序时,祖先节点内的顺序错误的问题 @uyarn ([#3273](https://github.com/Tencent/tdesign-vue/pull/3273))
- `TagInput`: 修复`tagProps` 没有作用到折叠的标签上的缺陷 @uyarn ([#3260](https://github.com/Tencent/tdesign-vue/pull/3260))
- `Upload`: 修复部分图标不支持全局替换的问题 @uyarn ([#3244](https://github.com/Tencent/tdesign-vue/pull/3244))


## 🌈 1.9.8 `2024-07-11`
### 🚀 Features
- `Icon`: 新增有序列表图标 `list-numbered`,优化`lock-off`图标的绘制路径 @DOUBLE-DENG ([icon#9f4acfd](https://github.com/Tencent/tdesign-icons/commit/9f4acfdda58f84f9bca71a22f033e27127dd26db))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ npm run start

### 单元测试 & e2e 测试文档

[组件测试文档](./test/README.md)
[组件测试文档](./TEST_GUIDE.md)

## 子仓库 tdesign-common

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-vue",
"purename": "tdesign",
"version": "1.9.8-naruto",
"version": "1.9.9-naruto",
"description": "tdesign-vue",
"title": "tdesign-vue",
"keywords": [
Expand Down Expand Up @@ -106,7 +106,7 @@
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "~7.22.5",
"@babel/helper-module-imports": "7.22.5",
"@babel/helper-module-imports": "7.24.7",
"@babel/eslint-parser": "~7.23.10",
"@babel/plugin-transform-class-properties": "^7.22.3",
"@babel/plugin-transform-modules-commonjs": "^7.9.6",
Expand Down
39 changes: 37 additions & 2 deletions script/generate-usage/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/* eslint-disable */
module.exports = {
'auto-complete': {
panelStr: `const panelList = [{label: 'AutoComplete', value: 'AutoComplete'}];`,
render: {
AutoComplete: `<t-auto-complete v-bind="configProps" :options="['第一个联想词', '第二个联想词', '第三个联想词']" />`,
},
},
button: {
panelStr: `const panelList = [{label: 'button', value: 'button'}];`,
render: {
button: `<t-button v-bind="configProps">确定</t-button>`,
},
},
button: {
panelStr: `const panelList = [{label: 'button', value: 'button'}];`,
render: {
Expand Down Expand Up @@ -313,6 +325,12 @@ module.exports = {
radio: `<t-radio v-bind="configProps">单选框</t-radio>`,
},
},
'range-input': {
panelStr: `const panelList = [{label: 'rangeInput', value: 'rangeInput'}];`,
render: {
rangeInput: `<t-range-input v-bind="configProps" />`,
},
},
select: {
panelStr: `const panelList = [{label: 'select', value: 'select'}];`,
render: {
Expand Down Expand Up @@ -407,9 +425,26 @@ module.exports = {
},
},
'time-picker': {
panelStr: `const panelList = [{label: 'timePicker', value: 'timePicker'}];`,
importStr: `
import timePickerConfigJson from './time-picker-props.json';\n
import timeRangePickerConfigJson from './time-range-picker-props.json';\n
`,
configStr: `const configList = ref(timePickerConfigJson);`,
panelStr: `
const panelList = [
{label: 'timePicker', value: 'timePicker', config: timePickerConfigJson},
{label: 'timeRangePicker', value: 'timeRangePicker', config: timeRangePickerConfigJson}
];
`,
panelChangeStr: `
function onPanelChange(panel) {
configList.value = panelList.find(item => item.value === panel).config;
usageCode.value = \`<template>\${usageCodeMap[panel].trim()}</template>\`;
}
`,
render: {
timePicker: `<t-timePicker v-bind="configProps" />`,
timePicker: `<t-time-picker v-bind="configProps" />`,
timeRangePicker: `<t-time-range-picker v-bind="configProps" />`,
},
},
timeline: {
Expand Down
27 changes: 27 additions & 0 deletions src/auto-complete/_usage/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- 该脚本为自动生成,如有需要请在 /script/generate-usage.js 中调整 -->
<template>
<base-usage :code="usageCode" :config-list="configList" :panel-list="panelList" @PanelChange="onPanelChange">
<template #AutoComplete="{ configProps }">
<t-auto-complete v-bind="configProps" :options="['第一个联想词', '第二个联想词', '第三个联想词']" />
</template>
</base-usage>
</template>

<script setup lang="jsx">
/* eslint-disable */
import { ref, onMounted } from '@vue/composition-api';
import configJson from './props.json';
const configList = ref(configJson);
const panelList = [{ label: 'AutoComplete', value: 'AutoComplete' }];
const usageCodeMap = {
AutoComplete:
"<t-auto-complete v-bind=\"configProps\" :options=\"['第一个联想词', '第二个联想词', '第三个联想词']\" />",
};
const usageCode = ref(`<template>${usageCodeMap[panelList[0].value].trim()}</template>`);
function onPanelChange(panel) {
usageCode.value = `<template>${usageCodeMap[panel].trim()}</template>`;
}
</script>
51 changes: 51 additions & 0 deletions src/auto-complete/_usage/props.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[
{
"name": "borderless",
"type": "Boolean",
"defaultValue": false,
"options": []
},
{
"name": "clearable",
"type": "Boolean",
"defaultValue": false,
"options": []
},
{
"name": "disabled",
"type": "Boolean",
"defaultValue": false,
"options": []
},
{
"name": "highlightKeyword",
"type": "Boolean",
"defaultValue": false,
"options": []
},
{
"name": "readonly",
"type": "Boolean",
"defaultValue": false,
"options": []
},
{
"name": "size",
"type": "enum",
"defaultValue": "medium",
"options": [
{
"label": "small",
"value": "small"
},
{
"label": "medium",
"value": "medium"
},
{
"label": "large",
"value": "large"
}
]
}
]
8 changes: 5 additions & 3 deletions src/auto-complete/auto-complete.en-US.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
:: BASE_DOC ::

## API

### AutoComplete Props

name | type | default | description | required
-- | -- | -- | -- | --
autofocus | Boolean | - | \- | N
borderless | Boolean | false | \- | N
clearable | Boolean | - | \- | 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
disabled | Boolean | undefined | \- | N
filter | Function | - | Typescript:`(filterWords: string, option: T) => boolean \| Promise<boolean>` | N
filterable | Boolean | true | \- | N
highlightKeyword | Boolean | true | \- | N
Expand All @@ -19,8 +21,8 @@ panelTopContent | String / Slot / Function | - | Typescript:`string \| TNode`
placeholder | String | undefined | \- | N
popupProps | Object | - | Typescript:`PopupProps`[Popup API Documents](./popup?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/auto-complete/type.ts) | N
readonly | Boolean | - | \- | N
size | String | medium | optionssmall/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
status | String | default | optionsdefault/success/warning/error | 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
status | String | default | options: default/success/warning/error | N
textareaProps | Object | - | Typescript:`TextareaProps`[Textarea API Documents](./textarea?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/auto-complete/type.ts) | N
tips | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
triggerElement | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
Expand Down
6 changes: 4 additions & 2 deletions src/auto-complete/auto-complete.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
:: BASE_DOC ::

## API

### AutoComplete Props

名称 | 类型 | 默认值 | 说明 | 必传
名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
autofocus | Boolean | - | 自动获取焦点 | N
borderless | Boolean | false | 无边框模式 | N
clearable | Boolean | - | 是否允许清空 | N
default | String / Slot / Function | - | 触发显示联想词下拉框的元素,同 `triggerElement`。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
disabled | Boolean | - | 是否禁用 | N
disabled | Boolean | undefined | 是否禁用 | N
filter | Function | - | 自定义过滤规则,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。参数 `filterWords` 表示搜索词,`option`表示单个选项内容,返回值为 `true` 保留该选项,返回值为 `false` 则隐藏该选项。使用该方法时无需设置 `filterable`。TS 类型:`(filterWords: string, option: T) => boolean \| Promise<boolean>` | N
filterable | Boolean | true | 是否根据输入内容过滤联想词。默认过滤规则不区分大小写,全文本任意位置匹配。如果默认搜索规则不符合业务需求,可以更为使用 `filter` 自定义过滤规则。部分场景下输入关键词和下拉联想词完全不同,此时可以设置为 `false` | N
highlightKeyword | Boolean | true | 是否高亮联想词中和输入值的相同部分 | N
Expand Down
1 change: 1 addition & 0 deletions src/auto-complete/auto-complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default defineComponent({
clearable={this.clearable}
props={this.innerInputProps}
scopedSlots={this.$scopedSlots}
borderless={this.borderless}
/>
);
// 联想词列表
Expand Down
7 changes: 6 additions & 1 deletion src/auto-complete/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ import { PropType } from 'vue';
export default {
/** 自动获取焦点 */
autofocus: Boolean,
/** 无边框模式 */
borderless: Boolean,
/** 是否允许清空 */
clearable: Boolean,
/** 触发显示联想词下拉框的元素,同 `triggerElement` */
default: {
type: [String, Function] as PropType<TdAutoCompleteProps['default']>,
},
/** 是否禁用 */
disabled: Boolean,
disabled: {
type: Boolean,
default: undefined,
},
/** 自定义过滤规则,用于对现有数据进行搜索过滤,判断是否过滤某一项数据。参数 `filterWords` 表示搜索词,`option`表示单个选项内容,返回值为 `true` 保留该选项,返回值为 `false` 则隐藏该选项。使用该方法时无需设置 `filterable` */
filter: {
type: Function as PropType<TdAutoCompleteProps['filter']>,
Expand Down
5 changes: 5 additions & 0 deletions src/auto-complete/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export interface TdAutoCompleteProps<T extends AutoCompleteOption = AutoComplete
* 自动获取焦点
*/
autofocus?: boolean;
/**
* 无边框模式
* @default false
*/
borderless?: boolean;
/**
* 是否允许清空
*/
Expand Down
8 changes: 1 addition & 7 deletions src/button/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
"defaultValue": false,
"options": []
},
{
"name": "ghost",
"type": "Boolean",
"defaultValue": false,
"options": []
},
{
"name": "loading",
"type": "Boolean",
Expand Down Expand Up @@ -107,4 +101,4 @@
}
]
}
]
]
37 changes: 20 additions & 17 deletions src/cascader/core/effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,24 +140,27 @@ export function handleRemoveTagEffect(
} = cascaderContext;

if (disabled) return;
const newValue = cloneDeep(value) as [];
const res = newValue.splice(index, 1);
const node = treeStore.getNodes(res[0])[0];

setValue(newValue, 'uncheck', node.getModel());

const checked = node.setChecked(!node.isChecked());
// 处理不同数据类型
const resValue = valueType === 'single'
? checked
: checked.map((val) => treeStore
.getNode(val)
.getPath()
.map((item) => item.value));

setValue(resValue, 'uncheck', node.getModel());
if (isFunction(onRemove)) {
onRemove({ value: checked, node: node as any });
// index equal to undefined means to click clear button
if (index !== undefined) {
const newValue = cloneDeep(value) as [];
const res = newValue.splice(index, 1);
const node = treeStore.getNodes(res[0])[0];

const checked = node.setChecked(!node.isChecked());
// 处理不同数据类型
const resValue = valueType === 'single'
? checked
: checked.map((val) => treeStore
.getNode(val)
.getPath()
.map((item) => item.value));
setValue(resValue, 'uncheck', node.getModel());
if (isFunction(onRemove)) {
onRemove({ value: checked, node: node as any });
}
} else if (isFunction(onRemove)) {
onRemove({ value, node: undefined });
}
}

Expand Down
16 changes: 9 additions & 7 deletions src/color-picker/color-picker.en-US.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
:: BASE_DOC ::

## API

### ColorPicker Props

name | type | default | description | required
-- | -- | -- | -- | --
borderless | Boolean | false | \- | N
clearable | Boolean | false | \- | N
closeBtn | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
colorModes | Array | ()=> ['monochrome', 'linear-gradient'] | Typescript:`Array<'monochrome' \| 'linear-gradient'>` | N
disabled | Boolean | - | \- | N
colorModes | Array | ["monochrome", "linear-gradient"] | Typescript:`Array<'monochrome' \| 'linear-gradient'>` | N
disabled | Boolean | undefined | \- | N
enableAlpha | Boolean | false | \- | N
enableMultipleGradient | Boolean | true | \- | N
format | String | RGB | optionsRGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N
format | String | RGB | options: RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N
inputProps | Object | - | Typescript:`InputProps`[Input API Documents](./input?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts) | N
multiple | Boolean | false | \- | N
popupProps | Object | - | Typescript:`PopupProps`[Popup API Documents](./popup?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts) | N
recentColors | Array | [] | used color recently。`.sync` is supported。Typescript:`boolean \| Array<string>` | N
defaultRecentColors | Array | [] | used color recently。uncontrolled property。Typescript:`boolean \| Array<string>` | N
recentColors | Array | [] | used color recently。`.sync` is supported。Typescript:`boolean \| Array<string> \| null` | N
defaultRecentColors | Array | [] | used color recently。uncontrolled property。Typescript:`boolean \| Array<string> \| null` | N
selectInputProps | Object | - | Typescript:`SelectInputProps`[SelectInput API Documents](./select-input?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts) | N
showPrimaryColorPreview | Boolean | true | \- | N
size | String | medium | optionssmall/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
swatchColors | Array | - | swatch colors。Typescript:`Array<string>` | 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
swatchColors | Array | - | swatch colors。Typescript:`Array<string> \| null` | N
value | String | - | color value。`v-model` is supported | N
defaultValue | String | - | color value。uncontrolled property | N
onChange | Function | | Typescript:`(value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts)。<br/>`type ColorPickerChangeTrigger = 'palette-saturation-brightness' \| 'palette-saturation' \| 'palette-brightness' \| 'palette-hue-bar' \| 'palette-alpha-bar' \| 'input' \| 'preset' \| 'recent' `<br/> | N
Expand Down
Loading

0 comments on commit a07b470

Please sign in to comment.