feat: 添加第三方授权登录icon和优化svg-icon组件可自定义大小

Former-commit-id: 4e60ff0a8d159a789c42b180eeacd2e4a8013916
This commit is contained in:
郝先瑞
2022-09-04 16:34:56 +08:00
parent d2249b0ce2
commit f5cbf9d2bc
6 changed files with 29 additions and 25 deletions

View File

@@ -1,5 +1,9 @@
<template>
<svg aria-hidden="true" class="svg-icon">
<svg
aria-hidden="true"
class="svg-icon"
:style="'width:' + size + ';height:' + size"
>
<use :xlink:href="symbolId" :fill="color" />
</svg>
</template>
@@ -18,7 +22,11 @@ const props = defineProps({
},
color: {
type: String,
default: ''
default: '#fff'
},
size: {
type: String,
default: '1em'
}
});
@@ -27,8 +35,6 @@ const symbolId = computed(() => `#${props.prefix}-${props.iconClass}`);
<style scoped>
.svg-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
overflow: hidden;
fill: currentColor;