0.0.9 • Published 1 year ago

vue-next-ellipsis v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.2-alpha.2

1 year ago

0.0.2-alpha.1

1 year ago

0.0.1-alpha.5

1 year ago

0.0.1-alpha.4

1 year ago

0.0.1-alpha.3

1 year ago

0.0.1-alpha.2

1 year ago

0.0.1-alpha.1

1 year ago

0.0.1

1 year ago