文字伸展

# 基础用法

下面是文字伸展的基础用法。

<template>
  <div class="t-text-expand-area">
    <div class="btn-area">
      <button class="show-btn" @click="showText">显示文字</button>
      <button class="hide-btn" @click="hideText">隐藏文字</button>
    </div>
    <div class="text-area" v-if="textExpandShow">
      <as-animation-text-expand>
      </as-animation-text-expand>
    </div>
  </div>
</template>

<script>
export default {
  name: "t-text-expand",
  data(){
    return{
      textExpandShow:false,
    }
  },
  methods:{
    showText(){
      this.textExpandShow=true;
    },
    hideText(){
      this.textExpandShow=false;
    },
  }
}
</script>
<style>

.t-text-expand-area .btn-area{
  width: 100%;
  height: 60px;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.t-text-expand-area .btn-area button{
  background-color: dodgerblue;
  border-radius: 5px;
  width: 100px;
  height: 40px;
  outline: none;
  border: none;
  color: #ffffff;
}
.t-text-expand-area .btn-area .hide-btn{
 margin-left: 20px;
}
</style>
Expand Copy

# Attributes

参数 说明 必填
letter-spacing 字母间隔,单位px。类型为Number,默认值为60。
font-size 字体大小,单位px。类型为Number,默认值为100。
font-weight 字重。类型为Number,默认值为600。
content 文字内容。String,默认值为ANIMATION。