
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
基于vue2.0的【展开、收起】组件 为了更好的实现多文本能够按指定行数显示,并通过配置两个按钮进行展开与折叠。

npm install -D phone-more
import More from 'phone-more'
Vue.component(More.name, More)
String ,待显示的文本
显示的行数,默认为2
是否显示组件内置按钮。默认为true
展开按钮的文案
收起按钮的文案
自定义省略符号,默认为...
<div>
<h6>采用组件默认按钮</h6>
<ph-more ref="moreDemo" :text="text" :line="2">
</ph-more>
</div>
<div>
<h6>自定义按钮文字</h6>
<ph-more ref="noButton" expand-text='哈哈' :text="text" :line="2">
</ph-more>
</div>
<div>
<h6>在组件外部定义按钮</h6>
<ph-more ref="noButton" :show-button="false" :text="text" :line="2">
</ph-more>
<button class="outer-button" @click="expand">{{btnTxt}}</button>
</div>
<div>
<h6>自定义省略符</h6>
<ph-more ref="moreDemo" :ellipsis="'。。。'" :text="text" :line="2">
</ph-more>
</div>
<div>
<h6>不带省略符</h6>
<ph-more ref="moreDemo" :ellipsis="''" :text="text" :line="2">
</ph-more>
</div>
FAQs
a vuejs component for expand or collapse more text
The npm package phone-more receives a total of 15 weekly downloads. As such, phone-more popularity was classified as not popular.
We found that phone-more demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.