You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
783 B

9 months ago
<template>
<view class="jnpf-text" :style="_style">{{content}}</view>
</template>
<script>
export default {
name: 'jnpf-text',
props: {
textStyle: {
type: Object,
default: () => ({
// 'font-size': ' 24rpx',
// "color": '#00000',
// 'text-align': 'center',
// 'line-height': '60rpx',
// 'font-weight': 'normal',
// 'font-style': 'normal',
// 'text-decoration': 'none',
})
},
content: {
default: ''
}
},
computed: {
_style() {
return {
...this.textStyle,
'line-height': this.textStyle['line-height'] + 'rpx',
'font-size': this.textStyle['font-size'] + 'rpx'
}
}
}
}
</script>
<style lang="scss" scoped>
.jnpf-text {
width: 100%;
padding: 20rpx 32rpx;
margin: 0;
}
</style>