1.0.0 • Published 1 year ago

sa-text-toggle-vue3 v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago
// npm i sa-text-toggle-vue3
<template>
  <div>
    <saTextToggle :text="'世界很美好感谢有你世界很美好感谢有你世界很美好感谢有你世界很美好感谢有你世界很美好感谢有你世界很美好感谢有你世界很美好感谢有你世界很美好感谢有你'" :width="200" :maxLines="2">
      <template v-slot:default="{ clickToggle, expanded }">
        <a @click="clickToggle" class="btn">
          {{ expanded? "收起": "展开" }}
        </a>
      </template>
    </saTextToggle>
  </div>
</template>

<script setup>
import {saTextToggle} from 'sa-text-toggle-vue3';
</script>
text展示的文本
maxLines默认行数
width文本显示的宽度