diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f2d4ad3c..98f010e43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,43 @@ toc: false docClass: timeline --- +## 🌈 1.9.3 `2024-04-26` +### 🚀 Features +- `Menu`: `Submenu`透传 `Popup` 组件全部特性 @betavs ([#3145](https://github.com/Tencent/tdesign-vue/pull/3145)) +### 🐞 Bug Fixes +- `Submenu`: 修复设置 `popup-props` 中 `placement` 属性无效的问题 @betavs ([#3145](https://github.com/Tencent/tdesign-vue/pull/3145)) +- `Textarea`: 修复`autosize` 在 `Firefox` 中不生效的问题 @XBIsland ([#3148](https://github.com/Tencent/tdesign-vue/pull/3148)) +- `Select`: 修复 `option` 插槽 value 为 `Boolean` 类型的报错问题 @uyarn ([#3154](https://github.com/Tencent/tdesign-vue/pull/3154)) +- `Upload`: 修复自定义方法通过`uploadFilePercent`更新百分比无效的问题 @XBIsland ([#3149](https://github.com/Tencent/tdesign-vue/pull/3149)) +- `Style`: 修复部分节点前缀无法统一替换的缺陷 @ZWkang [common#1773](https://github.com/Tencent/tdesign-common/pull/1773) + +### 🚧 Others +- docs: 更新关于CDN资源用法的说明文档 @uyarn ([#3144](https://github.com/Tencent/tdesign-vue/pull/3144)) + + +## 🌈 1.9.2 `2024-04-11` +### 🚀 Features +- `Tag`: 新增`color`API,支持自定义颜色 @maoyiluo ([#3101](https://github.com/Tencent/tdesign-vue/pull/3101)) +- `CollapsedItems`: `TagInput`、`SelectInput`、`TreeSelect`和`Cascader`的`CollapsedItems`统一新增`onClose`回调,支持对折叠选项的删除操作 @topazur @uyarn ([#2942](https://github.com/Tencent/tdesign-vue/pull/2942)) +### 🐞 Bug Fixes +- `Transfer`: + - 修复`search` 事件的 `trigger` 的异常 @betavs ([#3118](https://github.com/Tencent/tdesign-vue/pull/3118)) + - 修复树形结构数据过滤异常的问题 @uyarn ([#3137](https://github.com/Tencent/tdesign-vue/pull/3137)) +- `Locale`: 修复`Image`和`ImageViewer`组件英文语言包异常的问题,优化`DatePicker`部分语言配置 @uyarn ([#3119](https://github.com/Tencent/tdesign-vue/pull/3119)) +- `Checkbox`: 修复 `checkboxGroup.max` 禁用态显示的问题 @LoopZhou ([#3124](https://github.com/Tencent/tdesign-vue/pull/3124)) +- `DatePicker`: + - 修复`valueType` 为 `Date` 类型时仍然进行转换的缺陷 @uyarn ([#3127](https://github.com/Tencent/tdesign-vue/pull/3127)) + - 修复周和季度模式选择异常的问题 @uyarn ([#3138](https://github.com/Tencent/tdesign-vue/pull/3138)) +- `Table`: 修复使用 `fixedRows` 时的报错问题 @betavs ([#3134](https://github.com/Tencent/tdesign-vue/pull/3134)) +- `Loading`:导出 `LoadingDirective` 使用 @XBIsland ([#3120](https://github.com/Tencent/tdesign-vue/pull/3120)) +- `Scroll`: 修复由于Chrome 121版本支持scroll width之后导致`Table`、`Select`及部分出现滚动条组件的样式异常问题 @loopzhou ([common#1765](https://github.com/Tencent/tdesign-vue/pull/1765))。请注意,基于 `@vue/cli-service 4.x` 及以下版本初始化的项目由于依赖的 postcss 版本过低,会因为这个修复受影响,需要升级postcss至8.0以上或整体升级`@vue/cli-service`至5.0以上 + +### 🚧 Others +- `Dialog`: 优化插件部分的使用示例 @Lyan-u ([#3126](https://github.com/Tencent/tdesign-vue/pull/3126)) +- `Dialog`: 优化插件部分的使用说明 @Summer-Shen ([#3125](https://github.com/Tencent/tdesign-vue/pull/3125)) +- `Menu`: 移除示例代码中废弃的高度示例 @Summer-Shen ([#3135](https://github.com/Tencent/tdesign-vue/pull/3135)) + + ## 🌈 1.9.1 `2024-03-10` ### 🚀 Features diff --git a/package.json b/package.json index d525441ca..b974521a2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tdesign-vue", "purename": "tdesign", - "version": "1.9.2-naruto", + "version": "1.9.3-naruto", "description": "tdesign-vue", "title": "tdesign-vue", "keywords": [ @@ -134,7 +134,7 @@ "@vue/babel-preset-jsx": "^1.3.0", "@vue/eslint-config-typescript": "^9.1.0", "@vue/test-utils": "^1.3.0", - "autoprefixer": "^9.7.6", + "autoprefixer": "^10.4.19", "babel-core": "^7.0.0-bridge.0", "babel-polyfill": "^6.26.0", "c8": "^7.12.0", diff --git a/site/docs/getting-started.en-US.md b/site/docs/getting-started.en-US.md index 27ebe9963..4dda1b752 100644 --- a/site/docs/getting-started.en-US.md +++ b/site/docs/getting-started.en-US.md @@ -25,6 +25,7 @@ npm i tdesign-vue@naruto // for Vue 2.7 Vue.use(TDesign); ``` +> Please note that unpkg usage is not recommended as it will download the entire component library. Production projects will be directly affected by version updates, and may also be affected by the stability of the CDN. The package of tdesign-vue provides kinds of bundles, read [the documentation](https://github.com/Tencent/tdesign/blob/main/docs/develop-install.md) for the detail of differences between bundles. diff --git a/site/docs/getting-started.md b/site/docs/getting-started.md index 122c722b8..66c097670 100644 --- a/site/docs/getting-started.md +++ b/site/docs/getting-started.md @@ -35,6 +35,7 @@ npm i tdesign-vue@naruto // 在 Vue 2.7 使用 Vue.use(TDesign); ``` +> 请注意,我们不推荐使用这种方式,这样无法实现按需加载等优化手段,生产项目会直接受版本更新影响,同时也可能受到 CDN 的稳定性的影响。 npm package 中提供了多种构建产物,可以阅读 [这里](https://github.com/Tencent/tdesign/blob/main/docs/develop-install.md) 了解不同目录下产物的差别。 diff --git a/src/_common b/src/_common index 78a589aea..fc0041ca1 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 78a589aea1301c99fab72de56d4439744a897afb +Subproject commit fc0041ca123b8e9871dce6a232d094a5af4df7ec diff --git a/src/menu/submenu.tsx b/src/menu/submenu.tsx index 2397d1260..a0aa1a017 100644 --- a/src/menu/submenu.tsx +++ b/src/menu/submenu.tsx @@ -263,10 +263,11 @@ export default defineComponent({ ); const realPopup = ( popupWrapper} >
diff --git a/src/select/option-props.ts b/src/select/option-props.ts index ebcf258fd..e3dd5e02a 100644 --- a/src/select/option-props.ts +++ b/src/select/option-props.ts @@ -32,6 +32,6 @@ export default { }, /** 选项值 */ value: { - type: [String, Number] as PropType, + type: [String, Number, Boolean] as PropType, }, }; diff --git a/src/select/type.ts b/src/select/type.ts index 936081245..9eda8a1f8 100644 --- a/src/select/type.ts +++ b/src/select/type.ts @@ -288,7 +288,7 @@ export interface TdOptionProps { /** * 选项值 */ - value?: string | number; + value?: string | number | boolean; } export interface TdOptionGroupProps { diff --git a/src/textarea/calcTextareaHeight.ts b/src/textarea/calcTextareaHeight.ts index 4677c0db1..17d4d1b72 100644 --- a/src/textarea/calcTextareaHeight.ts +++ b/src/textarea/calcTextareaHeight.ts @@ -4,8 +4,8 @@ type RowsType = number | null; type ResultType = { - height?: string, - minHeight?: string + height?: string; + minHeight?: string; }; let hiddenTextarea: HTMLTextAreaElement; @@ -15,7 +15,7 @@ const HIDDEN_TEXTAREA_STYLE = ` max-height:none !important; height:0 !important; visibility:hidden !important; - overflow:hidden !important; + overflow-y:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; @@ -45,25 +45,20 @@ function calculateNodeStyling(targetElement: HTMLTextAreaElement) { const style = window.getComputedStyle(targetElement); const boxSizing = style.getPropertyValue('box-sizing') - || style.getPropertyValue('-moz-box-sizing') - || style.getPropertyValue('-webkit-box-sizing'); + || style.getPropertyValue('-moz-box-sizing') + || style.getPropertyValue('-webkit-box-sizing'); - const paddingSize = ( - parseFloat(style.getPropertyValue('padding-bottom')) - + parseFloat(style.getPropertyValue('padding-top')) - ); + const paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top')); - const borderSize = ( - parseFloat(style.getPropertyValue('border-bottom-width')) - + parseFloat(style.getPropertyValue('border-top-width')) - ); + const borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width')); - const sizingStyle = SIZING_PROPS - .map((name) => `${name}:${style.getPropertyValue(name)}`) - .join(';'); + const sizingStyle = SIZING_PROPS.map((name) => `${name}:${style.getPropertyValue(name)}`).join(';'); return { - sizingStyle, paddingSize, borderSize, boxSizing, + sizingStyle, + paddingSize, + borderSize, + boxSizing, }; } @@ -78,10 +73,7 @@ export default function calcTextareaHeight( } const { - paddingSize, - borderSize, - boxSizing, - sizingStyle, + paddingSize, borderSize, boxSizing, sizingStyle, } = calculateNodeStyling(targetElement); hiddenTextarea.setAttribute('style', `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`); diff --git a/src/upload/hooks/useUpload.ts b/src/upload/hooks/useUpload.ts index 87d94d059..c4e2543b0 100644 --- a/src/upload/hooks/useUpload.ts +++ b/src/upload/hooks/useUpload.ts @@ -92,7 +92,7 @@ export default function useUpload(props: TdUploadProps, context: SetupContext) { const { file, percent } = params; const operationUploadFiles = autoUpload.value ? toUploadFiles : uploadValue; const index = operationUploadFiles.value.findIndex((item) => file.raw === item.raw); - operationUploadFiles.value[index] = { ...operationUploadFiles.value[index], percent }; + operationUploadFiles.value[index].percent = percent; }; const updateFilesProgress = () => {