text-overflow.uvue 589 字节
Newer Older
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<template>
	<view style="flex-grow: 1;">
		<view style="height: 500rpx;background-color: gray;justify-content: center;align-items: center;">
			<text class="common" style="text-overflow: clip;">{{text}}</text>
			<text class="common" style="text-overflow: ellipsis;">{{text}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				text: 'HBuilderX,轻巧、极速,极客编辑器;uni-app x,终极跨平台方案;uts,大一统语言'
			}
		}
	}
</script>

<style>
	.common {
		width: 500rpx;
		height: 60rpx;
		font-size: 20px;
	}
</style>