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

<script setup>
const props = defineProps({
	fontColor: {
		type: String,
		default: '#3680FE'
	},
	leftContent: {
		type: String,
		default: '修改车辆信息'
	},
	rightContent: {
		type: String,
		default: ''
	},
})
const emit = defineEmits(['leftComfirn', 'rightComfirn'])
// 修改车辆信息
const leftComfirnButton = () => {
	emit('leftComfirn')
}
// 删除车辆信息
const rightComfirnButton = () => {
	emit('rightComfirn')
}

</script>

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