Giter VIP home page Giter VIP logo

vue3-text-clamp's Introduction

Hi, welcome to my world

About Me

  • 🧑‍💻 Front-end Engineer
  • 📍 Shanghai/Hangzhou, China
  • ❤️ Heavy music addicts, Amateur photographer ...
  • 🌈 Love coding, enjoy life
  • 📝 Ask me about anything here
  • 👉 Project List
sherwinshen's github stats

Find Me

Gmail Github 掘金 语雀 CSDN

vue3-text-clamp's People

Contributors

dependabot[bot] avatar sherwinshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vue3-text-clamp's Issues

换行文字优化

.text-clamp > span > span {
white-space:pre-wrap;
}

建议加个样式,用于text中包含\n时支持换行

location start, 显示文本内容有误

image
location start, 应该把文本最后的内容显示出来 把前面的内容省略, 目前只是页面上在前面显示省略号, 显示的文本内容还是文本前面部分

max-line can't work right

想要的效果是最多只能展示三行,但是在 :max-lines=5的情况下最终只能展示一行,改成:max-lines=5才能最多展示三行

`v-html`

How to use it with v-html directive?
i need render my string

Feature Request: set html tag for render/

What is the problem?
It is necessary to use not only

for rendering content, but also any other block element, for example h1-h6.

Example:

<text-clamp test="Hello world" :max-length="2" tag="h2"/>

What needs to be done?
Implement the change of the div element that defaults to any other HTML element.

How use in Nuxt 3?

Please tell me how to use this component in Nuxt3.js?
I am trying to use the component locally according to the manual:

<template>
  <text-clamp text='hello world' :max-lines='2' />
</template>
<script lang='ts' setup>
import TextClamp from 'vue3-text-clamp';
</script>

but I get an error:
TypeError: Cannot read properties of undefined (reading 'defineComponent')
at file:///********/node_modules/vue3-text-clamp/lib/text-clamp.js:1:370

插件中将vue作为依赖,打包后出现异常

在打包后出现如下异常
Cannot read properties of null (reading ‘isCE‘)

经过查询,是因为库组件中使用的vue版本与项目中的vue版本不一致,最终打包后执行报错

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.