初始版本提交
This commit is contained in:
4
src/components/Text/index.ts
Normal file
4
src/components/Text/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { withInstall } from '/@/utils/index';
|
||||
import text from './src/Text.vue';
|
||||
|
||||
export const Text = withInstall(text);
|
||||
25
src/components/Text/src/Text.vue
Normal file
25
src/components/Text/src/Text.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<p
|
||||
:align="align"
|
||||
:style="{
|
||||
fontFamily: fontFamily,
|
||||
fontSize: fontSize + 'px',
|
||||
fontWeight: fontWeight,
|
||||
color: color,
|
||||
fontStyle: fontStyle,
|
||||
}"
|
||||
>
|
||||
{{ defaultValue }}</p
|
||||
>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
defineProps({
|
||||
defaultValue: { type: String },
|
||||
color: { type: String, default: '#000' },
|
||||
fontFamily: { type: String, default: 'Arial' },
|
||||
fontSize: { type: Number, default: 12 },
|
||||
fontWeight: { type: [Number, String], default: 'normal' },
|
||||
fontStyle: { type: String, default: 'normal' },
|
||||
align: { type: String, default: 'left' },
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user