Skip to content

Commit d8f1256

Browse files
uyarnliweijie0812jby0107dependabot[bot]github-actions[bot]
authored
chore: release 1.9.8-naruto (#3235)
* ci: add pr-comment-ci (#3217) * feat(icon): add new icon (#3229) * fix(input): disable password toggle when input disabled (#3230) * fix(input): disable password toggle when input disabled fix #3228 * fix(input): update snapshot * chore: update snapshot --------- Co-authored-by: Uyarn <[email protected]> * chore: add CODEOWNERS file (#3231) * chore: update codeowner (#3232) * chore(deps-dev): bump cypress from 9.7.0 to 13.12.0 (#3225) Bumps [cypress](https://github.com/cypress-io/cypress) from 9.7.0 to 13.12.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](cypress-io/cypress@v9.7.0...v13.12.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump @testing-library/dom from 8.20.1 to 10.2.0 (#3222) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(Tree): fix nil value filter bug (#3233) * fix(Tree): fix nil value filter bug * chore: revert change * chore: add test * chore: release 1.9.8 (#3234) * chore: release 1.9.8 * chore: update common * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: liweijie0812 <[email protected]> Co-authored-by: jby0107 <[email protected]> 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>
1 parent 400c2aa commit d8f1256

File tree

11 files changed

+159
-15
lines changed

11 files changed

+159
-15
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @chaishi @uyarn @xiaosansiji @maoyiluo @liweijie0812 @loopzhou
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: PR_COMMENT_CI
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
next_action: ${{ steps.get-action.outputs.next_action }}
12+
if: ${{ github.event.issue.pull_request }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 1
17+
- uses: actions/github-script@v7
18+
id: get-action
19+
with:
20+
script: |
21+
const user = context.payload.comment.user.login
22+
core.debug(`user: ${user}`)
23+
24+
const fs = require('fs')
25+
const CODEOWNERS = fs.readFileSync('.github/CODEOWNERS', 'utf8')
26+
core.debug(`CODEOWNERS: ${CODEOWNERS}`)
27+
28+
let isReviewer = false;
29+
CODEOWNERS.match(/@\w+/g).forEach((owner) => {
30+
if (owner === `@${user}`) {
31+
isReviewer = true
32+
}
33+
})
34+
35+
let next_action = ''
36+
if (isReviewer) {
37+
const body = context.payload.comment.body
38+
core.info(`body: ${body}`)
39+
if (body.startsWith('/update-common')) {
40+
next_action='update-common'
41+
}
42+
if (body.startsWith('/update-snapshot')) {
43+
next_action='update-snapshot'
44+
}
45+
} else {
46+
core.warning('You are not collaborator');
47+
}
48+
core.info(`next_action: ${next_action}`)
49+
core.setOutput('next_action', next_action)
50+
51+
update-common:
52+
needs: check
53+
runs-on: ubuntu-latest
54+
if: ${{ needs.check.outputs.next_action == 'update-common' }}
55+
steps:
56+
- uses: actions/checkout@v4
57+
with:
58+
token: ${{ secrets.PERSONAL_TOKEN }}
59+
- name: gh checkout pr
60+
env:
61+
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
62+
run: gh pr checkout ${{ github.event.issue.number }} --recurse-submodules
63+
- run: git submodule update --remote --merge
64+
- name: Commit Common
65+
run: |
66+
git add .
67+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
68+
git config --local user.name "github-actions[bot]"
69+
git commit -m "chore: update common"
70+
git push
71+
72+
update-snapshot:
73+
needs: check
74+
runs-on: ubuntu-latest
75+
if: ${{ needs.check.outputs.next_action == 'update-snapshot' }}
76+
steps:
77+
- uses: actions/checkout@v4
78+
with:
79+
token: ${{ secrets.PERSONAL_TOKEN }}
80+
- name: gh checkout pr
81+
env:
82+
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
83+
run: gh pr checkout ${{ github.event.issue.number }} --recurse-submodules
84+
- uses: actions/setup-node@v4
85+
with:
86+
node-version: 18
87+
- run: npm install
88+
- run: npm run test:update
89+
- name: Commit Snapshot
90+
run: |
91+
git add .
92+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
93+
git config --local user.name "github-actions[bot]"
94+
git commit -m "chore: update snapshot"
95+
git push

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ toc: false
55
docClass: timeline
66
---
77

8+
## 🌈 1.9.8 `2024-07-11`
9+
### 🚀 Features
10+
- `Icon`: 新增有序列表图标 `list-numbered`,优化`lock-off`图标的绘制路径 @DOUBLE-DENG ([icon#9f4acfd](https://github.com/Tencent/tdesign-icons/commit/9f4acfdda58f84f9bca71a22f033e27127dd26db))
11+
### 🐞 Bug Fixes
12+
- `Icon`: 修复图标`chart-column`的命名错误问题,如果使用旧错误命名请注意 @uyarn ([#3229](https://github.com/Tencent/tdesign-vue/pull/3229))
13+
- `Tree`: 修复树形组件错误过滤 `value``0` 的节点的问题 @uyarn ([#3233](https://github.com/Tencent/tdesign-vue/pull/3233))
14+
- `Input`: 修复禁用状态下仍可以切换明文密文的问题 @jby0107 ([#3230](https://github.com/Tencent/tdesign-vue/pull/3230))
15+
- `Input`: 修复禁用状态下超出问题文字长度异常的问题 @uyarn ([common#1831](https://github.com/Tencent/tdesign-common/pull/1831))
16+
- `Menu`: 修复样式文件多余的空格导致部分场景打包异常的问题 @liweijie0812 ([common#1828](https://github.com/Tencent/tdesign-common/pull/1828))
17+
818
## 🌈 1.9.7 `2024-06-28`
919
### 🐞 Bug Fixes
1020
- `Dialog`: 修复 `Dialog` 组件在 `SSR` 环境下的使用问题 @qqw78901 ([#3219](https://github.com/Tencent/tdesign-vue/pull/3219))

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tdesign-vue",
33
"purename": "tdesign",
4-
"version": "1.9.7-naruto",
4+
"version": "1.9.8-naruto",
55
"description": "tdesign-vue",
66
"title": "tdesign-vue",
77
"keywords": [
@@ -96,7 +96,7 @@
9696
"mitt": "^3.0.0",
9797
"raf": "^3.4.1",
9898
"sortablejs": "^1.15.0",
99-
"tdesign-icons-vue": "^0.2.0",
99+
"tdesign-icons-vue": "^0.2.4",
100100
"tinycolor2": "^1.4.2",
101101
"validator": "^13.5.1"
102102
},
@@ -142,7 +142,7 @@
142142
"cli-color": "^2.0.0",
143143
"commitizen": "^4.0.3",
144144
"cross-env": "^7.0.2",
145-
"cypress": "^9.5.3",
145+
"cypress": "^13.12.0",
146146
"cz-conventional-changelog": "^3.3.0",
147147
"dom-parser": "^0.1.6",
148148
"esbuild": "^0.14.9",

src/icon/icon.en-US.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ You can get all the name of icon by import manifest from the bundle `import { ma
5757
if your project is in a no-network scenario, please use on-demand loading of icons. For example,`<t-icon name="add" />` should be changed to `<AddIcon />`
5858
### All Icons
5959

60+
<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65;margin:16px 0">
61+
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
62+
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
63+
</svg>
64+
Most icons were added to the icon library after version 0.2.0. If you find that the icon cannot be displayed normally after being imported, please check the version of tdesign-icons-vue you have installed</div>
65+
6066
<td-icons-view />
6167

6268
## API

src/icon/icon.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ TDesign 支持通过使用 Iconfont 图标,使用时需要单独引入 Iconfon
6767

6868
### 全部图标
6969

70+
<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65;margin:16px 0">
71+
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
72+
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
73+
</svg>
74+
大部分图标在 0.2.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-vue`的版本。
75+
</div>
76+
7077
<td-icons-view />
7178

7279
## API

src/input/input.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ export default mixins(
329329
},
330330

331331
emitPassword() {
332+
if (this.tDisabled) return;
332333
const { renderType } = this;
333334
const toggleType = renderType === 'password' ? 'text' : 'password';
334335
this.renderType = toggleType;
@@ -528,9 +529,19 @@ export default mixins(
528529

529530
if (this.type === 'password') {
530531
if (this.renderType === 'password') {
531-
suffixIcon = <BrowseOffIcon class={`${this.componentName}__suffix-clear`} nativeOnClick={this.emitPassword} />;
532+
suffixIcon = (
533+
<BrowseOffIcon
534+
class={{ [`${this.componentName}__suffix-clear`]: !this.tDisabled }}
535+
nativeOnClick={this.emitPassword}
536+
/>
537+
);
532538
} else if (this.renderType === 'text') {
533-
suffixIcon = <BrowseIcon class={`${this.componentName}__suffix-clear`} nativeOnClick={this.emitPassword} />;
539+
suffixIcon = (
540+
<BrowseIcon
541+
class={{ [`${this.componentName}__suffix-clear`]: !this.tDisabled }}
542+
nativeOnClick={this.emitPassword}
543+
/>
544+
);
534545
}
535546
}
536547

src/tree/__tests__/index.test.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ describe('Tree:init', () => {
5757

5858
it('可以传递一个树结构的数据来完成初始化', () => {
5959
const data = [
60+
{ value: 0 },
6061
{
6162
value: 't1',
6263
children: [
@@ -89,6 +90,7 @@ describe('Tree:init', () => {
8990
}),
9091
);
9192
expect(wrapper.find('.tree-empty').exists()).toBe(false);
93+
expect(wrapper.find('[data-value="0"]').exists()).toBe(true);
9294
expect(wrapper.find('[data-value="t1"]').exists()).toBe(true);
9395
expect(wrapper.find('[data-value="t1.1"]').exists()).toBe(false);
9496
expect(wrapper.find('[data-value="t2"]').exists()).toBe(true);

src/tree/hooks/useTreeNodes.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import isUndefined from 'lodash/isUndefined';
12
import {
23
ref, watch, TypeCreateElement, privateKey, TypeVNode,
34
} from '../adapt';
@@ -26,13 +27,14 @@ export default function useTreeNodes(state: TypeTreeState) {
2627
const list: TypeTreeNode[] = [];
2728
// 非虚拟滚动,缓存曾经展示过的节点
2829
let hasVisibleNode = false;
30+
2931
allNodes.value.forEach((node: TypeTreeNode) => {
3032
if (node.visible) {
3133
// 曾经展示过的节点加入缓存,避免再次创建
3234
hasVisibleNode = true;
3335
cacheMap.set(node.value, node.value);
3436
}
35-
if (cacheMap.get(node.value)) {
37+
if (!isUndefined(cacheMap.get(node.value))) {
3638
// 创建的节点是缓存的节点
3739
list.push(node);
3840
}

test/snap/__snapshots__/csr.test.js.snap

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36401,8 +36401,10 @@ exports[`csr snapshot test > csr test ./src/config-provider/_example/input.vue 1
3640136401
width="1em"
3640236402
>
3640336403
<path
36404-
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
36404+
clip-rule="evenodd"
36405+
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
3640536406
fill="currentColor"
36407+
fill-rule="evenodd"
3640636408
/>
3640736409
</svg>
3640836410
</span>
@@ -39118,8 +39120,10 @@ exports[`csr snapshot test > csr test ./src/date-picker/_example/custom-icon.vue
3911839120
width="1em"
3911939121
>
3912039122
<path
39121-
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
39123+
clip-rule="evenodd"
39124+
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
3912239125
fill="currentColor"
39126+
fill-rule="evenodd"
3912339127
/>
3912439128
</svg>
3912539129
</span>
@@ -53714,8 +53718,10 @@ exports[`csr snapshot test > csr test ./src/form/_example/login.vue 1`] = `
5371453718
width="1em"
5371553719
>
5371653720
<path
53717-
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
53721+
clip-rule="evenodd"
53722+
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
5371853723
fill="currentColor"
53724+
fill-rule="evenodd"
5371953725
/>
5372053726
</svg>
5372153727
</span>
@@ -62930,8 +62936,10 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 1`] = `
6293062936
width="1em"
6293162937
>
6293262938
<path
62933-
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
62939+
clip-rule="evenodd"
62940+
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
6293462941
fill="currentColor"
62942+
fill-rule="evenodd"
6293562943
/>
6293662944
</svg>
6293762945
</span>
@@ -62981,8 +62989,10 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 1`] = `
6298162989
width="1em"
6298262990
>
6298362991
<path
62984-
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
62992+
clip-rule="evenodd"
62993+
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
6298562994
fill="currentColor"
62995+
fill-rule="evenodd"
6298662996
/>
6298762997
</svg>
6298862998
</span>

0 commit comments

Comments
 (0)