![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
vue-tag-textarea-demo
Advanced tools
Readme
可插入自定义标签的 textarea
$ npm install vue-tag-textarea -S
在 main.js
文件中引入插件并注册
# main.js
import VueTagTextarea from 'vue-tag-textarea'
import 'vue-tag-textarea/lib/vue-tag-textarea.css'
Vue.use(VueTagTextarea)
在项目中用使用 VueTagTextarea
<template>
<w-textarea v-model="text" />
</template>
<script>
export default {
data () {
return {
text: 'demo'
}
}
}
</script>
注意:标签为 <w-textarea>
<wise>
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
tag | 自定义标签名 | String | wise |
tools | 配置工具栏 | Array | [{ type: 'link', text: '添加超链接' }, { type: 'tag', text: '添加模版标签' }] |
maxlength | 最大字符长度 | String, Number | - |
自定义 tag 的时候,需要添加该标签的样式
事件名称 | 说明 | 回调参数 |
---|---|---|
add | 点击工具栏上的“添加xx”按钮时触发 | type |
工具栏可以通过 tools 参数进行配置,tools 的元素是一个包含 type 和 text 的对象,其中 text 为工具栏按钮的文字。
当点击工具栏按钮的时候,触发 add 事件,接收一个 type 参数,该参数为 tools 中定义的 type 属性值。
具体的交互逻辑需要自行开发,最后需要通过 $refs 调用 VueTagTextarea 内部的 addLink() 或者 addTag() 方法,完成添加标签。
当调用 addTag() 的时候,需要传入一个 text 参数,值为标签的文本内容。
当调用 addLink() 的时候,需要传入 url 和 text,其中 url 为超链接地址,text 为超链接文本。
VueTagTextarea 最终返回的值是一个 innerHTML。
FAQs
> 可插入自定义标签的 textarea
The npm package vue-tag-textarea-demo receives a total of 0 weekly downloads. As such, vue-tag-textarea-demo popularity was classified as not popular.
We found that vue-tag-textarea-demo 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.