refactor(projects): 添加exportDefaults替换defineProps

This commit is contained in:
Soybean
2021-11-07 01:23:01 +08:00
committed by Soybean
parent 43b832bee0
commit e61ee32a88
42 changed files with 886 additions and 970 deletions

View File

@ -1,22 +1,23 @@
<template>
<div>
<svg-fill-logo v-if="fill" :color="color" />
<svg-logo v-else :color="color" />
<div :style="{ color }">
<svg-fill-logo v-if="fill" />
<svg-logo v-else />
</div>
</template>
<script lang="ts" setup>
import { SvgLogo, SvgFillLogo } from './components';
defineProps({
fill: {
type: Boolean,
default: false
},
color: {
type: String,
default: '#409EFF'
}
interface Props {
/** logo是否填充 */
fill?: boolean;
/** logo的主题颜色 */
color?: string;
}
withDefaults(defineProps<Props>(), {
fill: false,
color: '#409EFF'
});
</script>
<style scoped></style>