cashier_app/components/JSwitchCard/JSwitchCard.vue

56 lines
1.5 KiB
Vue

<template>
<view class="manage-main" :style="{ '--border-width': borderWidth }">
<view class="manage-title" :style="{ fontSize: titleSize, color: titleColor }">
{{ title }}
<slot name="right"></slot>
</view>
<view class="manage-info" :style="{ width: tipsWidth + 'rpx', fontSize: titleSize, color: titleColor }">{{ tips }}</view>
</view>
</template>
<script setup>
const props = defineProps({
title: { type: String }, //标题
tips: { type: String }, //提示信息
tipsWidth: { type: Number }, // 提示信息宽度 默认500rpx
titleSize: { type: Number }, //标题字体大小
tipsSize: { type: Number }, //提示信息字体大小
titleColor: { type: String }, //标题文字颜色
tipsColor: { type: String }, //提示信息文字颜色
borderWidth: { type: String, default: '40rpx' }, //边框距离左侧距离 默认80rpx
})
</script>
<style lang="scss" scoped>
.manage-main {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 40rpx;
height: 198rpx;
background-color: #fff;
&::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
z-index: 10;
width: calc(100vw - var(--border-width));
height: 1rpx;
background-color: #ededed;
}
.manage-title {
display: flex;
align-items: center;
justify-content: space-between;
color: #4d4d4d;
}
.manage-info {
margin-top: 12rpx;
width: 500rpx;
font-size: 25rpx;
color: #999999;
}
}
</style>