0.4.0 • Published 12 months ago

text-view v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Vue 3 TextView

一个基于 vue3.x 版本的文本展开收起组件

文档链接

https://au1996.github.io/text-view/

使用指南

安装

第一步是使用 npmyarn 安装它:

npm install text-view --save

# 或者使用 yarn
yarn add text-view

用法

main.js

import { createApp } from 'vue'
import TextView from 'text-view'
import App from './App.vue'

const app = createApp(App)
app.use(TextView)

App.vue

<template>
  <TextView :content="text" :rows="1" />
</template>

<script setup>
import { ref } from 'vue'

const text = ref('这里是很长的一段文本')
</script>
参数说明类型默认值
content文本内容string-
rows控制多少行出现按钮number2
open-text控制展开按钮文本string展开
close-text控制收起按钮文本string收起
link控制是否跳转外部链接string-
is-clicktrue时,不会展开收起,只会向外传递btn-click事件booleanfalse
content-color文本颜色string-
button-color按钮字体颜色string#077fef
button-background按钮背景颜色string#fff
0.3.0

1 year ago

0.4.0

12 months ago

0.3.1

1 year ago

0.1.0

2 years ago

0.1.2

2 years ago

0.0.3

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago