You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

484 lines
22 KiB

<template>
<view :class="[prefixClass, prefixClass+'-'+type]" :style="setStyle" @tap="$_click"></view>
</template>
<script>
/**
* 图标组件
* @description 用于展示 icon该组件的 icon 图形基于 Webfont因此可任意放大改变颜色
* @tutorial https://ext.dcloud.net.cn/plugin?id=175
* @property {String} prefix-class 自定义字体图标库前缀 - 默认cmd-icon
* @property {String} type 图标图案类型 - 列如homeadd
* @property {String} color 图标颜色 - 默认白色
* @property {Number} size 图标大小 - 默认24单位px
* @event {Function} click 图标组件点击事件
* @example <cmd-icon type="bell" size="30" color="#654321"></cmd-icon>
*/
export default {
name: 'cmd-icon',
props: {
/**
* 自定义字体图标库前缀
*/
prefixClass: {
type: String,
default: 'cmd-icon'
},
/**
* 图标类型
*/
type: String,
/**
* 图标颜色
*/
color: {
type: String,
default: '#fff'
},
/**
* 图标大小
*/
size: {
type: [Number, String],
default: '24'
}
},
computed: {
setStyle() {
return `color:${this.color};
font-size:${this.size}px;
line-height:${this.size}px`
}
},
methods: {
$_click(e) {
this.$emit('click', e)
}
}
}
</script>
<style>
@font-face {
font-family: cmdicons;
src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAACzsAAsAAAAASZgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY/d0tZY21hcAAAAYAAAAIiAAAG8vi5tr1nbHlmAAADpAAAI/IAADeY7eoYuGhlYWQAACeYAAAALwAAADYSVnjKaGhlYQAAJ8gAAAAcAAAAJAfeA+VobXR4AAAn5AAAABEAAAGQkAAAAGxvY2EAACf4AAAAygAAAMqKgH2CbWF4cAAAKMQAAAAfAAAAIAF8AK1uYW1lAAAo5AAAAUUAAAJtPlT+fXBvc3QAACosAAACwAAABGw/XD2leJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIA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+PsjY9HXagv2k4y4Q/fFeylpU/yNLUYWRmqIEOBT4hR6qQ1Bpilu1w1sfe2wrdG597PctW3ZuabnuOiPQ9pRnETKrbDw9MUGIeUL19WT6ZZc99hje17W0tbVctzPf3p7fuXOiXHnWIT5WH+NJqpRiJvDaV5AOJtTpDl2aUABi9skCT4kioE71+ttLSlHxVaM8R556efy3ZO3puSc136cORB7lBFxea4TH2JGX1TZ23/rT1RVk9Inx38FSwPRE+M7YdUYEnNMqWPmEvgXUqSf1TiWYkpHoQ5naJ1yxbl1u7947b745t379Kf39j565d29u3Tpmgp8n+zmpj6ntntwUztyJdUVchW1MJzODOYdKKWwnI0oChj7ZL
}
.cmd-icon {
display: inline-block;
font-family: cmdicons;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
text-rendering: auto;
text-align: center;
line-height: 1;
-webkit-font-smoothing: antialiased;
vertical-align: middle;
}
.cmd-icon-add::before {
content: "\e960";
}
.cmd-icon-add-circle::before {
content: "\e901";
}
.cmd-icon-subtract::before {
content: "\e962";
}
.cmd-icon-subtract-circle::before {
content: "\e961";
}
.cmd-icon-align-center::before {
content: "\e902";
}
.cmd-icon-align-left::before {
content: "\e903";
}
.cmd-icon-align-right::before {
content: "\e904";
}
.cmd-icon-arrow-down::before {
content: "\e905";
}
.cmd-icon-arrow-left::before {
content: "\e907";
}
.cmd-icon-arrow-right::before {
content: "\e908";
}
.cmd-icon-arrow-up::before {
content: "\e909";
}
.cmd-icon-bell::before {
content: "\e90a";
}
.cmd-icon-blocked::before {
content: "\e90b";
}
.cmd-icon-bookmark::before {
content: "\e90c";
}
.cmd-icon-bullet-list::before {
content: "\e90d";
}
.cmd-icon-calendar::before {
content: "\e90e";
}
.cmd-icon-camera::before {
content: "\e90f";
}
.cmd-icon-check-circle::before {
content: "\e910";
}
.cmd-icon-chevron-down::before {
content: "\e911";
}
.cmd-icon-chevron-left::before {
content: "\e912";
}
.cmd-icon-chevron-right::before {
content: "\e913";
}
.cmd-icon-chevron-up::before {
content: "\e914";
}
.cmd-icon-clock::before {
content: "\e915";
}
.cmd-icon-close-circle::before {
content: "\e916";
}
.cmd-icon-close::before {
content: "\e917";
}
.cmd-icon-credit-card::before {
content: "\e918";
}
.cmd-icon-download-cloud::before {
content: "\e919";
}
.cmd-icon-download::before {
content: "\e91a";
}
.cmd-icon-edit::before {
content: "\e91b";
}
.cmd-icon-equalizer::before {
content: "\e91c";
}
.cmd-icon-external-link::before {
content: "\e91d";
}
.cmd-icon-eye::before {
content: "\e91e";
}
.cmd-icon-file-audio::before {
content: "\e91f";
}
.cmd-icon-file-code::before {
content: "\e920";
}
.cmd-icon-file-generic::before {
content: "\e921";
}
.cmd-icon-file-jpg::before {
content: "\e923";
}
.cmd-icon-file-new::before {
content: "\e924";
}
.cmd-icon-file-png::before {
content: "\e925";
}
.cmd-icon-file-svg::before {
content: "\e926";
}
.cmd-icon-file-video::before {
content: "\e927";
}
.cmd-icon-filter::before {
content: "\e928";
}
.cmd-icon-folder::before {
content: "\e929";
}
.cmd-icon-font-color::before {
content: "\e92a";
}
.cmd-icon-heart::before {
content: "\e92b";
}
.cmd-icon-help::before {
content: "\e92c";
}
.cmd-icon-home::before {
content: "\e92d";
}
.cmd-icon-image::before {
content: "\e92e";
}
.cmd-icon-iphone-x::before {
content: "\e92f";
}
.cmd-icon-iphone::before {
content: "\e930";
}
.cmd-icon-lightning-bolt::before {
content: "\e931";
}
.cmd-icon-link::before {
content: "\e932";
}
.cmd-icon-list::before {
content: "\e933";
}
.cmd-icon-lock::before {
content: "\e934";
}
.cmd-icon-mail::before {
content: "\e935";
}
.cmd-icon-map-pin::before {
content: "\e936";
}
.cmd-icon-menu::before {
content: "\e937";
}
.cmd-icon-message::before {
content: "\e938";
}
.cmd-icon-money::before {
content: "\e939";
}
.cmd-icon-next::before {
content: "\e93a";
}
.cmd-icon-numbered-list::before {
content: "\e93b";
}
.cmd-icon-pause::before {
content: "\e93c";
}
.cmd-icon-phone::before {
content: "\e93d";
}
.cmd-icon-play::before {
content: "\e93e";
}
.cmd-icon-playlist::before {
content: "\e93f";
}
.cmd-icon-prev::before {
content: "\e940";
}
.cmd-icon-reload::before {
content: "\e941";
}
.cmd-icon-repecmd-play::before {
content: "\e942";
}
.cmd-icon-search::before {
content: "\e943";
}
.cmd-icon-settings::before {
content: "\e944";
}
.cmd-icon-share-2::before {
content: "\e945";
}
.cmd-icon-share::before {
content: "\e946";
}
.cmd-icon-shopping-bag-2::before {
content: "\e947";
}
.cmd-icon-shopping-bag::before {
content: "\e948";
}
.cmd-icon-shopping-cart::before {
content: "\e949";
}
.cmd-icon-shuffle-play::before {
content: "\e94a";
}
.cmd-icon-sketch::before {
content: "\e94b";
}
.cmd-icon-sound::before {
content: "\e94c";
}
.cmd-icon-star::before {
content: "\e94d";
}
.cmd-icon-stop::before {
content: "\e94e";
}
.cmd-icon-streaming::before {
content: "\e94f";
}
.cmd-icon-tag::before {
content: "\e950";
}
.cmd-icon-tags::before {
content: "\e951";
}
.cmd-icon-text-italic::before {
content: "\e952";
}
.cmd-icon-text-strikethrough::before {
content: "\e953";
}
.cmd-icon-text-underline::before {
content: "\e954";
}
.cmd-icon-trash::before {
content: "\e955";
}
.cmd-icon-upload::before {
content: "\e956";
}
.cmd-icon-user::before {
content: "\e957";
}
.cmd-icon-video::before {
content: "\e958";
}
.cmd-icon-volume-minus::before {
content: "\e959";
}
.cmd-icon-volume-off::before {
content: "\e95a";
}
.cmd-icon-volume-plus::before {
content: "\e95b";
}
.cmd-icon-analytics::before {
content: "\e95c";
}
.cmd-icon-star-2::before {
content: "\e95d";
}
.cmd-icon-check::before {
content: "\e95e";
}
.cmd-icon-heart-2::before {
content: "\e95f";
}
.cmd-icon-loading::before {
content: "\e967";
}
.cmd-icon-loading-2::before {
content: "\e966";
}
.cmd-icon-loading-3::before {
content: "\e963";
}
.cmd-icon-alert-circle::before {
content: "\e964";
}
</style>