background-image: linear-gradient(#2de2ff, #8b67fb);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
<template>
<div class="text-linear-gradient">
<span>测试文字</span>
</div>
</template>
<script>
export default {};
</script>
<style>
.text-linear-gradient {
background-image: linear-gradient(#2de2ff, #8b67fb);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
</style>