index_1.vue
762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<view class="ncc-text" :style="_style">{{value}}</view>
</template>
<script>
export default {
name: 'ncc-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',
})
},
value: {
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>
.ncc-text {
padding: 20rpx 32rpx;
margin: 0;
}
</style>