Skip to content

Commit

Permalink
chore: release 1.9.3-naruto (#3157)
Browse files Browse the repository at this point in the history
* chore: update CHANGELOG.md (#3142)

* docs: optimize docs and CDN usage  (#3144)

* docs: optimize docs

* Update getting-started.en-US.md

* chore: update desc

* feat(submenu): enable props popup-props (#3145)

* feat(submenu): enable props popup-props

* fix(submenu): setting popup-props placement property is invalid

* fix(textarea): `autosize` doesn't work in Firefox (#3148)

* fix(upload): `uploadFilePercent` reactive not triggered (#3149)

* chore(deps-dev): bump autoprefixer from 9.8.8 to 10.4.19 (#3129)

Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 9.8.8 to 10.4.19.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@9.8.8...10.4.19)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* fix(Select): option slot bool error (#3154)

* chore: release 1.9.3 (#3156)

* chore: release 1.9.3

* chore: changelog's changes

---------

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: betavs <34408516+betavs@users.noreply.github.com>
Co-authored-by: Yoki <yujian0108@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
5 people committed Apr 26, 2024
1 parent 773ecce commit 917dc5b
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 28 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.2-naruto",
"version": "1.9.3-naruto",
"description": "tdesign-vue",
"title": "tdesign-vue",
"keywords": [
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions site/docs/getting-started.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ npm i tdesign-vue@naruto // for Vue 2.7
Vue.use(TDesign);
</script>
```
> 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.

Expand Down
1 change: 1 addition & 0 deletions site/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ npm i tdesign-vue@naruto // 在 Vue 2.7 使用
Vue.use(TDesign);
</script>
```
> 请注意,我们不推荐使用这种方式,这样无法实现按需加载等优化手段,生产项目会直接受版本更新影响,同时也可能受到 CDN 的稳定性的影响。
npm package 中提供了多种构建产物,可以阅读 [这里](https://github.com/Tencent/tdesign/blob/main/docs/develop-install.md) 了解不同目录下产物的差别。

Expand Down
2 changes: 1 addition & 1 deletion src/_common
Submodule _common updated 49 files
+13 −0 .github/workflows/pr-spelling.template.yml
+10 −0 .github/workflows/typos-config.toml
+1 −1 docs/mobile/overview.en-US.md
+1 −1 docs/mobile/overview.md
+2 −0 docs/web/api/config-provider.en-US.md
+2 −0 docs/web/api/config-provider.md
+7 −3 docs/web/api/input.en-US.md
+8 −2 docs/web/api/input.md
+1 −1 docs/web/api/tag-input.en-US.md
+1 −1 docs/web/api/tag-input.md
+1 −1 docs/web/api/typography.md
+3 −3 js/global-config/locale/ar_KW.ts
+5 −5 js/global-config/locale/en_US.ts
+3 −3 js/global-config/locale/it_IT.ts
+3 −3 js/global-config/locale/ja_JP.ts
+3 −3 js/global-config/locale/ko_KR.ts
+3 −3 js/global-config/locale/ru_RU.ts
+3 −3 js/global-config/locale/zh_CN.ts
+4 −4 js/global-config/locale/zh_TW.ts
+4 −4 style/mobile/components/back-top/_index.less
+2 −2 style/mobile/components/back-top/_var.less
+1 −1 style/mobile/components/message/v2/_index.less
+1 −1 style/mobile/components/message/v2/_var.less
+8 −8 style/mobile/components/slider/_index.less
+2 −2 style/mobile/components/slider/_var.less
+1 −1 style/mobile/components/step-item/v2/_index.less
+1 −1 style/mobile/components/switch/_index.less
+1 −1 style/mobile/components/switch/_var.less
+46 −7 style/mobile/components/tag/v2/_index.less
+6 −0 style/mobile/components/tag/v2/_var.less
+1 −1 style/web/components/back-top/_index.less
+1 −1 style/web/components/badge/_index.less
+2 −2 style/web/components/breadcrumb/_index.less
+3 −3 style/web/components/calendar/_index.less
+3 −3 style/web/components/calendar/_var.less
+2 −2 style/web/components/collapse/_index.less
+1 −1 style/web/components/dialog/_index.less
+17 −0 style/web/components/input/_index.less
+1 −1 style/web/components/input/_var.less
+2 −2 style/web/components/link/_index.less
+5 −0 style/web/components/menu/_index.less
+1 −1 style/web/components/notification/_index.less
+1 −1 style/web/components/sticky-tool/_index.less
+3 −3 style/web/components/table/_index.less
+2 −2 style/web/components/transfer/_index.less
+14 −2 style/web/components/typography/_docs.less
+7 −0 style/web/components/typography/_index.less
+4 −0 style/web/components/typography/_var.less
+1 −1 style/web/components/upload/_docs.less
3 changes: 2 additions & 1 deletion src/menu/submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,11 @@ export default defineComponent({
);
const realPopup = (
<Popup
{...((this.popupProps ?? {}) as TdSubmenuProps['popupProps'])}
overlayInnerClassName={[...this.overlayInnerClassName]}
overlayClassName={[...this.overlayClassName]}
visible={this.popupVisible}
placement={placement as PopupPlacement}
placement={(this.popupProps as TdSubmenuProps['popupProps'])?.placement ?? (placement as PopupPlacement)}
content={() => popupWrapper}
>
<div ref="submenuRef" class={this.submenuClass}>
Expand Down
2 changes: 1 addition & 1 deletion src/select/option-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export default {
},
/** 选项值 */
value: {
type: [String, Number] as PropType<TdOptionProps['value']>,
type: [String, Number, Boolean] as PropType<TdOptionProps['value']>,
},
};
2 changes: 1 addition & 1 deletion src/select/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export interface TdOptionProps {
/**
* 选项值
*/
value?: string | number;
value?: string | number | boolean;
}

export interface TdOptionGroupProps {
Expand Down
34 changes: 13 additions & 21 deletions src/textarea/calcTextareaHeight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
type RowsType = number | null;

type ResultType = {
height?: string,
minHeight?: string
height?: string;
minHeight?: string;
};

let hiddenTextarea: HTMLTextAreaElement;
Expand All @@ -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;
Expand Down Expand Up @@ -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,
};
}

Expand All @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/upload/hooks/useUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 917dc5b

Please sign in to comment.