vue-text-collapse
v0.1.4
Published
[![](https://img.shields.io/npm/v/vue-text-collapse?color=a1b858&label=npm)](https://www.npmjs.com/package/vue-text-collapse) ![](https://img.shields.io/badge/supports-vue%202%2F3-brightgreen) [![](https://img.shields.io/npm/dependency-version/vue-text-co
Downloads
5
Maintainers
Readme
vue-text-collapse
Install
pnpm i vue-text-collapse
Props
props: {
text: {
// The shown content.
type: String,
required: true,
},
collapseLines: {
// The lines shown when it is collapsed.
type: [ String, Number ],
default: 2,
},
width: {
type: String,
default: '200px',
},
uniqueKey: {
// Used for the `id` attribute when it is rendered by `v-for`.
type: [ String, Number ],
require: false,
},
expandText: {
type: String,
default: 'Expand',
},
collapseText: {
type: String,
default: 'Collapse',
},
},
Development
- Install
pnpm i
pnpm p:i
- Confirm
playgrounds/vue3/src/App.vue
<script setup lang="ts">
// For build
// import textCollapse from 'vue-text-collapse'
import textCollapse from './../../../src'
// ...
- Run the dev script
pnpm dev
Preview vue 2/3
pnpm preview:3
pnpm preview:2