Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Aug 10, 2023
1 parent 518be31 commit 79c814a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 8 deletions.
13 changes: 10 additions & 3 deletions src/icon/_example/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@
</t-space>
</t-space>
</template>
<script setup>
<script>
import { Icon } from 'tdesign-icons-vue';
const onIconClose = () => {
console.log('icon was clicked.');
export default {
components: {
Icon,
},
method: {
onIconClose() {
console.log('icon was clicked.');
},
},
};
</script>
8 changes: 7 additions & 1 deletion src/icon/_example/iconfont.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
</t-space>
</t-space>
</template>
<script setup>
<script>
import { IconFont } from 'tdesign-icons-vue';
export default {
components: {
IconFont,
},
};
</script>
26 changes: 23 additions & 3 deletions src/icon/_example/single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</t-space>
</t-space>
</template>
<script setup>
<script>
import {
LettersTIcon,
LettersDIcon,
Expand All @@ -38,7 +38,27 @@ import {
ComponentStepsIcon,
} from 'tdesign-icons-vue';
const onIconClick = () => {
console.log('icon was clicked.');
export default {
components: {
LettersTIcon,
LettersDIcon,
LettersSIcon,
LettersEIcon,
LettersIIcon,
LettersNIcon,
LettersGIcon,
ComponentCheckboxIcon,
ComponentInputIcon,
ComponentSwitchIcon,
ComponentBreadcrumbIcon,
ComponentDropdownIcon,
ComponentRadioIcon,
ComponentStepsIcon,
},
methods: {
onIconClick() {
console.log('icon was clicked.');
},
},
};
</script>
2 changes: 1 addition & 1 deletion src/icon/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### 安装独立 Icon 包

图标相对其他基础组件较为独立,所以作为一个独立的 `npm` 包做发布管理。如果项目中直接使用,请安装 `tdesign-icons-vue-next`。 同时 `tdesign-vue-next` 也内置了 `icon`, 支持直接通过 `t-icon` 来使用。
图标相对其他基础组件较为独立,所以作为一个独立的 `npm` 包做发布管理。如果项目中直接使用,请安装 `tdesign-icons-vue`。 同时 `tdesign-vue` 也内置了 `icon`, 支持直接通过 `t-icon` 来使用。
图标库中共包含超过 **25** 类,**1200+** 个图标,推荐您按需引用图标,减少产物的体积。

### 按需引入使用图标
Expand Down

0 comments on commit 79c814a

Please sign in to comment.