vue-text-expand
v1.2.1
Published
> Vue组件,用于给文本附加展开/收起能力。使用 js 实现主要逻辑,在各浏览器间有不错的兼容性。
Downloads
35
Readme
VueTextExpand
Vue组件,用于给文本附加展开/收起能力。使用 js 实现主要逻辑,在各浏览器间有不错的兼容性。
安装
$ npm i -S vue-text-expand
使用
import Vue from 'vue'
import VueTextExpand from 'vue-text-expand'
Vue.use(VueTextExpand)
new Vue({
data: {
content: '...',
},
})
<vue-text-expand :content="content" />
属性
|参数|说明|类型|可选值|默认值| |:-:|:-:|:-:|:-:|:-:| |value/v-model|是否展开|boolean|——|false |content|文本内容|string|——|—— |fontSize|字体大小(px)|number|——|16 |openLabel|展开控件文字|string|——|展开 |closeLabel|收起控件文字|string|——|收起 |row|收起时最多显示多少行|number|——|1 |labelClass|展开/收起控件的样式|string|——|—— |labelColor|展开/收起控件的文字颜色|string|——|blue