Files
uni/packages/card-text/index.vue

41 lines
848 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
* @Author: peerless_hero peerless_hero@outlook.com
* @Date: 2023-07-08 01:44:46
* @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-07-13 12:11:08
* @FilePath: \uni\packages\card-text\index.vue
* @Description:
*
-->
<template>
<view mx-24rpx break-all mt-16rpx flex>
<view color="#909399" shrink-0>
<slot name="label">
{{ label }}
<template v-if="label">
</template>
</slot>
</view>
<view color="#3a3a3a" flex-grow>
<slot name="text">
<text>
{{ text }}
</text>
</slot>
</view>
</view>
</template>
<script lang="ts" setup name="CardText">
withDefaults(defineProps<{
/** 标签文字,可用插槽 */
label?: string
/** 文字,可用插槽 */
text?: string
}>(), {
label: '',
text: '',
})
</script>