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,23 +15,21 @@
</template>
<script lang="ts" setup>
import type { PropType } from 'vue';
import { NTooltip } from 'naive-ui';
import type { FollowerPlacement } from 'vueuc';
defineProps({
showTooltip: {
type: Boolean,
default: true
},
placement: {
type: String as PropType<FollowerPlacement>,
default: 'bottom'
},
content: {
type: String,
default: ''
}
interface Props {
/** 是否显示tooltip */
showTooltip?: boolean;
/** tooltip的位置 */
placement?: FollowerPlacement;
/** tooltip显示文本 */
content?: string;
}
withDefaults(defineProps<Props>(), {
showTooltip: true,
placement: 'bottom',
content: ''
});
</script>
<style scoped></style>