Skip to content

Commit

Permalink
feat(icon): add new icon (#1488)
Browse files Browse the repository at this point in the history
* feat(icon): add new icon

* test: update snap

* chore: update _common
  • Loading branch information
liweijie0812 authored Jul 8, 2024
1 parent 2a6f692 commit 1f68bb3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@vueuse/core": "10.7.0",
"dayjs": "^1.10.7",
"lodash": "^4.17.21",
"tdesign-icons-vue-next": "^0.2.0",
"tdesign-icons-vue-next": "^0.2.4",
"validator": "^13.5.1"
},
"peerDependencies": {
Expand Down
24 changes: 18 additions & 6 deletions src/cell/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ exports[`Cell > Cell groupVue demo works fine 1`] = `
width="1em"
>
<path
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"
clip-rule="evenodd"
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"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</div>
Expand Down Expand Up @@ -454,8 +456,10 @@ exports[`Cell > Cell mobileVue demo works fine 1`] = `
width="1em"
>
<path
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"
clip-rule="evenodd"
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"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</div>
Expand Down Expand Up @@ -779,8 +783,10 @@ exports[`Cell > Cell mobileVue demo works fine 1`] = `
width="1em"
>
<path
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"
clip-rule="evenodd"
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"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
Expand Down Expand Up @@ -1059,8 +1065,10 @@ exports[`Cell > Cell mobileVue demo works fine 1`] = `
width="1em"
>
<path
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"
clip-rule="evenodd"
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"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</div>
Expand Down Expand Up @@ -1474,8 +1482,10 @@ exports[`Cell > Cell multipleVue demo works fine 1`] = `
width="1em"
>
<path
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"
clip-rule="evenodd"
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"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
Expand Down Expand Up @@ -1949,8 +1959,10 @@ exports[`Cell > Cell singleVue demo works fine 1`] = `
width="1em"
>
<path
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"
clip-rule="evenodd"
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"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/icon/icon.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ You can get all the name of icon by import manifest from the bundle `import { ma
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 />`
### All Icons

<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65;margin:16px 0">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
<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>
</svg>
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-next you have installed</div>

<td-icons-view />


Expand Down
8 changes: 8 additions & 0 deletions src/icon/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ TDesign 支持通过使用 Iconfont 图标,使用时需要单独引入 Iconfon

### 全部图标

<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65;margin:16px 0">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
<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>
</svg>
大部分图标在 0.2.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-vue-next`的版本。
</div>


<td-icons-view />

## API
Expand Down

0 comments on commit 1f68bb3

Please sign in to comment.