From 374223173b3dac9dbfc5e8805f9a384831050c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Fri, 11 Aug 2023 17:44:32 +0800 Subject: [PATCH] feat(1.6.0): weekly sync update to naruto (#2681) * chore(deps-dev): bump fs-extra from 10.1.0 to 11.1.1 (#2651) Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 10.1.0 to 11.1.1. - [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md) - [Commits](https://github.com/jprichardson/node-fs-extra/compare/10.1.0...11.1.1) --- updated-dependencies: - dependency-name: fs-extra dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(table): support TableEditableCellConfig.keepEditMode (#2662) * feat(table): support TableEditableCellConfig.keepEditMode * test: update snapshots * feat: support file list thumbnail (#2665) * feat(image): support fallback & referrerpolicy & src File * feat(upload): code save * feat(upload): support file thumnail * feat(upload): docs & features * test: update snapshots * feat: add download API to Link (#2659) * feat: add download API to Link * feat: update common * test: update snapshot * feat: update common * feat: new icon 2.0 version (#2677) * feat: new icon 2.0 version * chore: update docs * chore: release/1.6.0 (#2678) * feat: release 1.6.0 * feat: update common * chore: changelog's changes --------- Co-authored-by: github-actions[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: sheepluo Co-authored-by: azhe Co-authored-by: github-actions[bot] --- CHANGELOG.md | 16 + package.json | 8 +- src/_common | 2 +- .../__snapshots__/anchor-target.test.jsx.snap | 5 +- .../vitest-back-top.test.jsx.snap | 10 +- .../__snapshots__/index.test.jsx.snap | 10 +- src/breadcrumb/_example/icon.vue | 6 +- .../__snapshots__/index.test.jsx.snap | 15 +- .../__snapshots__/rangepicker.test.jsx.snap | 15 +- src/hooks/index.ts | 1 + src/hooks/useImagePreviewUrl.ts | 27 + src/icon/_example/base.vue | 36 +- src/icon/_example/iconfont.vue | 41 +- src/icon/_example/single.vue | 69 +- src/icon/icon.en-US.md | 17 +- src/icon/icon.md | 23 +- src/image-viewer/base/ImageItem.tsx | 22 +- src/image-viewer/base/ImageViewerUtils.tsx | 14 +- src/image-viewer/image-viewer.en-US.md | 9 +- src/image-viewer/image-viewer.md | 7 +- src/image-viewer/image-viewer.tsx | 7 +- src/image-viewer/type.ts | 8 +- src/image-viewer/utils.ts | 2 +- .../__snapshots__/vitest-image.test.jsx.snap | 60 +- src/image/image.en-US.md | 12 +- src/image/image.md | 6 +- src/image/image.tsx | 73 +- src/image/props.ts | 29 +- src/image/type.ts | 24 +- .../__snapshots__/index.test.jsx.snap | 170 +- .../__snapshots__/index.test.jsx.snap | 10 +- src/link/_example/download.vue | 6 + src/link/link.en-US.md | 7 +- src/link/link.md | 1 + src/link/link.tsx | 1 + src/link/props.ts | 4 + src/link/type.ts | 4 + .../__snapshots__/index.test.jsx.snap | 70 +- .../__snapshots__/index.test.jsx.snap | 30 +- .../__snapshots__/index.test.jsx.snap | 10 +- .../__snapshots__/index.test.jsx.snap | 20 +- src/table/_example/editable-cell.vue | 11 +- src/table/editable-cell.tsx | 15 +- src/table/table.en-US.md | 1 + src/table/table.md | 1 + src/table/type.ts | 5 + .../__snapshots__/index.test.jsx.snap | 5 +- .../__snapshots__/index.test.jsx.snap | 10 +- .../__snapshots__/index.test.jsx.snap | 15 +- .../__snapshots__/vitest-upload.test.jsx.snap | 583 +- src/upload/_example/file-flow-list.vue | 5 + src/upload/_example/img-flow-list.vue | 52 +- src/upload/props.ts | 4 +- src/upload/themes/dragger-file.tsx | 3 +- src/upload/themes/image-card.tsx | 3 +- src/upload/themes/multiple-flow-list.tsx | 148 +- src/upload/type.ts | 7 +- src/upload/upload.en-US.md | 1 + src/upload/upload.md | 3 +- src/upload/upload.tsx | 1 + test/snap/__snapshots__/csr.test.js.snap | 9204 +++++++---------- test/snap/__snapshots__/ssr.test.js.snap | 566 +- 62 files changed, 5077 insertions(+), 6473 deletions(-) create mode 100644 src/hooks/useImagePreviewUrl.ts create mode 100644 src/link/_example/download.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a377ef3b..c0493cd00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,22 @@ toc: false docClass: timeline --- +## 🌈 1.6.0 `2023-08-10` +### 🚀 Features +- `Icon`: 新增 960 个图标;调整图标命名 `photo` 为 `camera`,`books`为`bookmark`, `stop-cirle-1`为`stop-circle-stroke`;移除`money-circle`图标,具体请查看图标页面 @uyarn ([#2677](https://github.com/Tencent/tdesign-vue/pull/2677)) +- `Table`: 可编辑表格,新增 `edit.keepEditMode` ,用于控制单元格始终保持为编辑态 @chaishi ([#2662](https://github.com/Tencent/tdesign-vue/pull/2662)) +- `Image`: @chaishi ([#2665](https://github.com/Tencent/tdesign-vue/pull/2665)) + - 属性 `src` 支持传入 File 文件类型显示图片 + - 新增支持 `fallback` ,用于设置图片加载失败时的兜底图 + - 新增支持 `referrerpolicy` 属性 +- `ImageViewer`: 属性 `images` 支持传入 File 文件类型预览图片 @chaishi ([#2665](https://github.com/Tencent/tdesign-vue/pull/2665)) +- `Upload`: 文件上传列表支持显示缩略图,通过 `showThumbnail` 属性控制 @chaishi ([#2665](https://github.com/Tencent/tdesign-vue/pull/2665)) +- `Link`: 新增透传 `download` 属性,支持浏览器直接下载,https://github.com/Tencent/tdesign-vue/issues/2628 @xiaosansiji ([#2659](https://github.com/Tencent/tdesign-vue/pull/2659)) +### 🐞 Bug Fixes +- `InputAdornment`: 修复装饰文字折行的问题 @PengYYYYY ([common#1553](https://github.com/Tencent/tdesign-common/pull/1553)) +### 🚧 Others +- `官网`: 新增分类展示全部图标的 UI @uyarn ([#2677](https://github.com/Tencent/tdesign-vue/pull/2677)) + ## 🌈 1.5.2 `2023-08-01` ### 🚀 Features - `Table`: diff --git a/package.json b/package.json index 34680b998..b6bd72a96 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tdesign-vue", "purename": "tdesign", - "version": "1.5.2-naruto", + "version": "1.6.0-naruto", "description": "tdesign-vue", "title": "tdesign-vue", "keywords": [ @@ -96,7 +96,7 @@ "mitt": "^3.0.0", "raf": "^3.4.1", "sortablejs": "^1.15.0", - "tdesign-icons-vue": "^0.1.6", + "tdesign-icons-vue": "^0.2.0", "tinycolor2": "^1.4.2", "validator": "^13.5.1" }, @@ -150,7 +150,7 @@ "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-import": "^2.23.4", "eslint-plugin-vue": "^8.1.1", - "fs-extra": "^10.1.0", + "fs-extra": "^11.1.1", "glob": "^8.0.3", "gray-matter": "^4.0.3", "husky": "^7.0.4", @@ -176,7 +176,7 @@ "rollup-plugin-styles": "^4.0.0", "rollup-plugin-terser": "~7.0.2", "rollup-plugin-vue": "^5.1.9", - "tdesign-icons-view": "^0.1.5", + "tdesign-icons-view": "^0.2.0", "tdesign-publish-cli": "^0.0.12", "tdesign-site-components": "^0.13.0", "tdesign-theme-generator": "^1.0.5", diff --git a/src/_common b/src/_common index 05f588ae6..6b4dde5c4 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 05f588ae6c1d71255320a7d7f6ff61b7cd14318c +Subproject commit 6b4dde5c4f8a09514b011038d8d453ad692adb39 diff --git a/src/anchor/__tests__/__snapshots__/anchor-target.test.jsx.snap b/src/anchor/__tests__/__snapshots__/anchor-target.test.jsx.snap index 7ace4e05b..e81af4aba 100644 --- a/src/anchor/__tests__/__snapshots__/anchor-target.test.jsx.snap +++ b/src/anchor/__tests__/__snapshots__/anchor-target.test.jsx.snap @@ -1,8 +1,7 @@ // Vitest Snapshot v1 exports[`AnchorTarget > > should render default slot 1`] = ` -"

this is default slots - - +"

this is default slots +

" `; diff --git a/src/back-top/__tests__/__snapshots__/vitest-back-top.test.jsx.snap b/src/back-top/__tests__/__snapshots__/vitest-back-top.test.jsx.snap index e316cd89c..d241d83a0 100644 --- a/src/back-top/__tests__/__snapshots__/vitest-back-top.test.jsx.snap +++ b/src/back-top/__tests__/__snapshots__/vitest-back-top.test.jsx.snap @@ -39,13 +39,12 @@ exports[`BackTop Component > props.shape is equal to circle 1`] = ` class="t-icon t-icon-backtop t-back-top__icon" fill="none" height="1em" - viewBox="0 0 16 16" + viewBox="0 0 24 24" width="1em" > props.shape is equal to square 1`] = ` class="t-icon t-icon-backtop t-back-top__icon" fill="none" height="1em" - viewBox="0 0 16 16" + viewBox="0 0 24 24" width="1em" > > 1`] = ` class="t-icon t-icon-chevron-right" fill="none" height="1em" - viewBox="0 0 16 16" + viewBox="0 0 24 24" width="1em" > @@ -64,13 +63,12 @@ exports[`Breadcrumb > > 1`] = ` class="t-icon t-icon-chevron-right" fill="none" height="1em" - viewBox="0 0 16 16" + viewBox="0 0 24 24" width="1em" > diff --git a/src/breadcrumb/_example/icon.vue b/src/breadcrumb/_example/icon.vue index 4ce943a82..a24ba5e71 100644 --- a/src/breadcrumb/_example/icon.vue +++ b/src/breadcrumb/_example/icon.vue @@ -1,8 +1,8 @@ diff --git a/src/icon/_example/single.vue b/src/icon/_example/single.vue index 0839e155a..04ff83e74 100644 --- a/src/icon/_example/single.vue +++ b/src/icon/_example/single.vue @@ -1,33 +1,62 @@ -