uniapp 微信小程序 边线显示不完整处理

uniapp yekong 1193℃

uniapp 微信小程序 边线显示不完整处理
wanjunshijiecom20220503ynz9cd

wanjunshijiecom20220503aHixXL

css

.tagsitem {
			height: 44rpx;
			// border: 1rpx solid #FFFFFF;
			border-radius: 20rpx;
			padding: 0 26rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: nowrap;
			flex-direction: row;
			margin-bottom: 30rpx;
			font-size: 28rpx;
			font-family: PingFang SC-Light, PingFang SC;
			font-weight: 300;
			color: #FFFFFF;
			margin-left: 8rpx;
			margin-right: 8rpx;
			position: relative;
		}

		.tagsitem::after {
			content: '';
			position: absolute;
			top: 0;
			left: 0;
			width: 200%;
			height: 200%;
			box-sizing: border-box;
			border-radius: 40rpx;
			border: 1rpx solid #FFFFFF;
			-webkit-transform: scale(.5);
			transform: scale(.5);
			-webkit-transform-origin: 0 0;
			transform-origin: 0 0;
		}

完整代码

<template>
	<div class="tags" :style="{marginTop:margintop}">
		<div @click="gosearch(item)" class="tagsitem" :style="{color:color,borderColor:color}"
			v-for="(item,index) in list" :key="index">
			{{item.name}}
		</div>
	</div>
</template>

<script>
	import {
		labelFindList
	} from '@/config/api.js'
	import {
		getIsLoginUrl
	} from '@/utils/util.js'
	export default {
		data() {
			return {
				list: []
			}
		},
		mounted() {
			this.getdata()
		},
		props: {
			color: {
				type: String,
				default () {
					return '#fff';
				}
			},
			isOnSearch: {
				type: Boolean,
				default () {
					return true
				}
			},
			margintop: {
				type: String,
				default () {
					return '30rpx';
				}
			}
		},
		methods: {
			gosearch(item) {
				if (this.isOnSearch) {
					this.$emit('getdata', item)
				} else {
					getIsLoginUrl('/packages/pages/search/search?name=' + item.name + '&id=' + item.id)
				}
			},
			getdata() {
				var that = this;
				labelFindList({
					"pageNum": 1,
					"pageSize": 100,
					"hot": 0
				}).then(res => {
					if (res.code == 200) {
						that.list = res.data.list
					}
				}).catch(err => {

				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.tags {
		width: 686rpx;
		margin: 60rpx auto;
		display: flex;
		justify-content: flex-start;
		align-items: flex-start;
		flex-wrap: wrap;
		flex-direction: row;

		.tagsitem {
			height: 44rpx;
			// border: 1rpx solid #FFFFFF;
			border-radius: 20rpx;
			padding: 0 26rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: nowrap;
			flex-direction: row;
			margin-bottom: 30rpx;
			font-size: 28rpx;
			font-family: PingFang SC-Light, PingFang SC;
			font-weight: 300;
			color: #FFFFFF;
			margin-left: 8rpx;
			margin-right: 8rpx;
			position: relative;
		}

		.tagsitem::after {
			content: '';
			position: absolute;
			top: 0;
			left: 0;
			width: 200%;
			height: 200%;
			box-sizing: border-box;
			border-radius: 40rpx;
			border: 1rpx solid #FFFFFF;
			-webkit-transform: scale(.5);
			transform: scale(.5);
			-webkit-transform-origin: 0 0;
			transform-origin: 0 0;
		}
	}
</style>

喜欢 (0)