centerLine.vue 888 字节
<template>
	<view class="centerLine" :style="{color: fontColor}">
		<text @click="updateCarInfo">{{ leftContent }}</text>
		<text class="line" :style="{backgroundColor: fontColor}"></text>
		<text @click="deleteCar">{{ rightContent }}</text>
	</view>
</template>

<script setup>
const props = defineProps({
	fontColor: {
		type: String,
		default: '#3680FE'
	},
	leftContent: {
		type: String,
		default: '修改车辆信息'
	},
	rightContent: {
		type: String,
		default: '删除车辆'
	},
})

// 修改车辆信息
const updateCarInfo = () => {
	if(props.leftContent === '修改车辆信息') {
		
	}
}
// 删除车辆信息
const deleteCar = () => {
	if(props.rightContent === '删除车辆'){
		
	}
}

</script>

<style lang="scss" scoped>
.centerLine{
	display: flex;
	align-items: center;
	font-size: 20rpx;
	.line{
		height: 20rpx;
		width: 2rpx;
		margin: 0 20rpx;
	}
}
</style>