0.0.9 • Published 3 years ago

vue-next-ellipsis v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue-next-ellipsis npm

Install and basic usage

$ npm install vue-next-ellipsis

Register the component

<script lang="ts" setup>
import { Ellipsis } from 'vue-next-ellipsis';
</script>
<template>
  <div style="font-size:20px">
    <Ellipsis
      content="测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字"
      :rows="3"
      fold-text="全文>"
      ellipsis-text="..."
      @fold-click="location.href = 'https://github.com/huogui'"
    />
  </div>
</template>
// main.ts
import { createApp } from 'vue'
import Ellipsis from 'vue-next-ellipsis'
import App from './App.vue'

const app = createApp(App)
app.use(Ellipsis)
app.mount('#app')

Options

export const ellipsisProps = {
  content: {
    type: String,
    default: '',
  },
  rows: {
    type: Number,
    default: 3,
  },
  foldVisible: Boolean,
  foldText: {
    type: String,
    default: 'more>',
  },
  ellipsisText: {
    type: String,
    default: '...',
  },
}

License

MIT

0.0.9

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.2-alpha.2

3 years ago

0.0.2-alpha.1

3 years ago

0.0.1-alpha.5

3 years ago

0.0.1-alpha.4

3 years ago

0.0.1-alpha.3

3 years ago

0.0.1-alpha.2

3 years ago

0.0.1-alpha.1

3 years ago

0.0.1

3 years ago