Skip to content

Commit

Permalink
feat(icon): add new icon
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Jul 5, 2024
1 parent f195587 commit cda2bbb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"mitt": "^3.0.0",
"raf": "^3.4.1",
"sortablejs": "^1.15.0",
"tdesign-icons-vue": "^0.2.0",
"tdesign-icons-vue": "^0.2.4",
"tinycolor2": "^1.4.2",
"validator": "^13.5.1"
},
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 @@ -57,6 +57,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 you have installed</div>

<td-icons-view />

## API
Expand Down
7 changes: 7 additions & 0 deletions src/icon/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ 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`的版本。
</div>

<td-icons-view />

## API
Expand Down
20 changes: 15 additions & 5 deletions test/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36401,8 +36401,10 @@ exports[`csr snapshot test > csr test ./src/config-provider/_example/input.vue 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>
</span>
Expand Down Expand Up @@ -39118,8 +39120,10 @@ exports[`csr snapshot test > csr test ./src/date-picker/_example/custom-icon.vue
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>
</span>
Expand Down Expand Up @@ -53716,8 +53720,10 @@ exports[`csr snapshot test > csr test ./src/form/_example/login.vue 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>
</span>
Expand Down Expand Up @@ -62932,8 +62938,10 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 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>
</span>
Expand Down Expand Up @@ -62983,8 +62991,10 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 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>
</span>
Expand Down
8 changes: 4 additions & 4 deletions test/snap/__snapshots__/ssr.test.js.snap

Large diffs are not rendered by default.

0 comments on commit cda2bbb

Please sign in to comment.