luban-mall/components/nothing/pitera.vue

55 lines
817 B
Vue

<template>
<view :style="{
color: textColor,
fontSize: textFontSize,
fontWeight: `${ ifBold ? 'bold' : 0 }`,
textAlign: `${ ifCenter ? 'center' : 'left' }`,
padding: paddingStr
}">{{textStr}}</view>
</template>
<script>
export default {
name:"pitera",
props:{
// 内容
textStr: {
type:String,
default:'-- NO MORE --'
},
// 字体颜色
textColor: {
type:String,
default:'#999999'
},
// 字体大小
textFontSize: {
type: String,
default: '24rpx'
},
// 是否加粗
ifBold: {
type:Boolean,
default:false
},
// 是否居中
ifCenter: {
type:Boolean,
default: true
},
// 内边距的值
paddingStr: {
type:String,
default:'20rpx'
}
},
data() {
return {};
}
}
</script>
<style>
</style>