123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <template>
- <text
- class="tn-color-icon-class tn-color-icon"
- :class="[
- 'tn-color-icon-' + name
- ]"
- :style="{
- fontSize: size + unit,
- margin: margin
- }"
- @tap="handleClick"
- ></text>
- </template>
- <script>
- export default {
- name: 'tn-color-icon',
- props: {
- // 索引
- index: {
- type: [Number, String],
- default: '0'
- },
- // 图标名称
- name: {
- type: String,
- default: ''
- },
- // 图标大小
- size: {
- type: Number,
- default:32
- },
- // 大小单位
- unit: {
- type: String,
- default: 'px'
- },
- // 外边距
- margin: {
- type: String,
- default: '0'
- }
- },
- computed: {
-
- },
- data() {
- return {
-
- }
- },
- methods: {
- // 处理点击事件
- handleClick() {
- this.$emit("click", {
- index: Number(this.index)
- })
- this.$emit("tap", {
- index: Number(this.index)
- })
- }
- }
- }
- </script>
- <style scoped>
- @charset "UTF-8";
-
- @font-face {
- font-family: "tuniaoColorFont"; /* Project id 2445412 */
- /* Color fonts */
- src: url('iconfont.woff2?t=1632654518618') format('woff2');
- }
-
- .tn-color-icon {
- font-family: "tuniaoColorFont" !important;
- font-size: 16px;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- text-align: center;
- text-decoration: none;
- }
-
- .tn-color-icon-logo-github:before {
- content: "\e601";
- }
-
- .tn-color-icon-logo-qq:before {
- content: "\e602";
- }
-
- .tn-color-icon-logo-weixin:before {
- content: "\e603";
- }
-
- .tn-color-icon-logo-alipay:before {
- content: "\e604";
- }
-
- .tn-color-icon-logo-weibo:before {
- content: "\e605";
- }
-
- .tn-color-icon-logo-dingtalk:before {
- content: "\e606";
- }
-
- .tn-color-icon-safe:before {
- content: "\e607";
- }
-
- .tn-color-icon-wifi:before {
- content: "\e608";
- }
-
- .tn-color-icon-help:before {
- content: "\e609";
- }
-
- .tn-color-icon-tag:before {
- content: "\e60a";
- }
-
- .tn-color-icon-play:before {
- content: "\e60b";
- }
-
- .tn-color-icon-stopwatch:before {
- content: "\e60c";
- }
-
- .tn-color-icon-home:before {
- content: "\e60d";
- }
-
- .tn-color-icon-map:before {
- content: "\e60e";
- }
-
- .tn-color-icon-book:before {
- content: "\e60f";
- }
-
- .tn-color-icon-qrcode:before {
- content: "\e610";
- }
-
- .tn-color-icon-discover:before {
- content: "\e611";
- }
-
- .tn-color-icon-visitor:before {
- content: "\e612";
- }
-
- .tn-color-icon-menu:before {
- content: "\e613";
- }
-
- .tn-color-icon-renew:before {
- content: "\e614";
- }
-
- .tn-color-icon-business:before {
- content: "\e615";
- }
-
- .tn-color-icon-telephone:before {
- content: "\e616";
- }
-
- .tn-color-icon-medicine:before {
- content: "\e617";
- }
-
- .tn-color-icon-chicken:before {
- content: "\e618";
- }
-
- .tn-color-icon-clock:before {
- content: "\e619";
- }
-
- .tn-color-icon-download:before {
- content: "\e61a";
- }
-
- .tn-color-icon-lamp:before {
- content: "\e61b";
- }
-
- .tn-color-icon-hourglass:before {
- content: "\e61c";
- }
-
- .tn-color-icon-calendar:before {
- content: "\e61d";
- }
-
- .tn-color-icon-bluetooth:before {
- content: "\e61e";
- }
-
- .tn-color-icon-fish:before {
- content: "\e61f";
- }
-
- .tn-color-icon-seal:before {
- content: "\e620";
- }
-
- .tn-color-icon-remind:before {
- content: "\e621";
- }
-
- .tn-color-icon-music:before {
- content: "\e622";
- }
-
- .tn-color-icon-email:before {
- content: "\e623";
- }
-
- .tn-color-icon-medal:before {
- content: "\e624";
- }
-
- .tn-color-icon-image:before {
- content: "\e625";
- }
-
- .tn-color-icon-network:before {
- content: "\e626";
- }
-
- .tn-color-icon-wallet:before {
- content: "\e627";
- }
-
- .tn-color-icon-program:before {
- content: "\e628";
- }
-
- .tn-color-icon-shrimp:before {
- content: "\e629";
- }
-
- .tn-color-icon-collect:before {
- content: "\e62a";
- }
-
- .tn-color-icon-screw:before {
- content: "\e62b";
- }
-
- .tn-color-icon-set:before {
- content: "\e62c";
- }
-
- .tn-color-icon-userfavorite:before {
- content: "\e62d";
- }
-
- .tn-color-icon-useradd:before {
- content: "\e62e";
- }
-
- .tn-color-icon-honor:before {
- content: "\e62f";
- }
-
- .tn-color-icon-shop:before {
- content: "\e630";
- }
-
- .tn-color-icon-usercard:before {
- content: "\e631";
- }
-
- .tn-color-icon-school:before {
- content: "\e632";
- }
-
- .tn-color-icon-user:before {
- content: "\e633";
- }
-
- .tn-color-icon-internet:before {
- content: "\e634";
- }
-
- .tn-color-icon-time:before {
- content: "\e635";
- }
-
- .tn-color-icon-topic:before {
- content: "\e636";
- }
-
- .tn-color-icon-phone:before {
- content: "\e637";
- }
-
- .tn-color-icon-usertable:before {
- content: "\e638";
- }
-
- .tn-color-icon-userset:before {
- content: "\e639";
- }
-
- .tn-color-icon-game:before {
- content: "\e63a";
- }
-
- </style>
|