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

@ -15,19 +15,19 @@
<script lang="ts" setup>
import { useBoolean } from '@/hooks';
defineProps({
isPrimary: {
type: Boolean,
default: false
},
primaryColor: {
type: String,
default: '#409EFF'
},
defaultColor: {
type: String,
default: '#9ca3af'
}
interface Props {
/** 激活状态 */
isPrimary?: boolean;
/** 主题颜色 */
primaryColor?: string;
/** 默认颜色 */
defaultColor?: string;
}
withDefaults(defineProps<Props>(), {
isPrimary: false,
primaryColor: '#409EFF',
defaultColor: '#9ca3af'
});
const { bool: isHover, setTrue, setFalse } = useBoolean();