npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

element-plus-vue-mention

v1.0.5

Published

A mention feature based on Element-Plus

Readme

前言

  1. 本组件是在基础之上,原来的提及不支持自定义回显(input,textarea),换成了div[contenteditable=true],

  2. 所以支持之前提及的属性和插槽,不支持input的属性和插槽

  3. 多给了一个zoom,用于在VueFlow等可以缩放的组件中定位使用

  4. 原项目地址:https://element-plus.org/zh-CN/component/mention.html 参考文档

  5. 源码地址:https://gitee.com/misszhou/element-plus-vue-mention

  6. 有bug请联系 [email protected]

使用

import install from 'element-plus-vue-mention'
const app = createApp(App)
install(app)  
 <element-plus-vue-mention 
        @mousedown.stop
        @touchstart.stop
         @click.stop
    popper-class="textarea-input-mention-popper"  
         :zoom="1" v-model="content" :options="options" :inputStyle="{ color: 'red' }" :prefix="['@']"
      :containerStyle="{ height: '100%' }">
    </element-plus-vue-mention>

例子

<script setup lang="ts">
import { ref } from 'vue'
const options = [
  { label: '流程开始', value: 'VARIABLE_NODE_ID', disabled: true, icon: 'src/assets/images/workflowStart.svg' },
  { label: '使用者ID', value: 'userId', parent: 'VARIABLE_NODE_ID'},
  { label: '文件链接', value: 'userFiles', parent: 'VARIABLE_NODE_ID' },
  { label: '许女士', value: 'xu', disabled: true, icon: 'src/assets/images/workflowStart.svg' },
  { label: '周天天', value: 'erzi', parent: 'xu' },
  { label: '我是单个的', value: 'single' },
]
const zoom = ref(1);
const content = ref("{{$VARIABLE_NODE_ID.userId$}}你111说{{$对对对d$}} {{$fdd$}} {{$3444$}}你{{$dddsd$}}是{{$VARIABLE_NODE_ID.userFiles$}}谁:? {{$VARIABLE_NODE_ID.userId$}}  没有这回事啊")
</script>

<template>
  <div class="mention">
    <element-plus-vue-mention v-model="content" :options="options" :inputStyle="{ color: 'red' }" :prefix="['@']"  :zoom="zoom"
      :containerStyle="{ height: '100%' }">
      <!-- 支持el-mention除input(input换成了div+contenteditable)的其他属性和插槽 -->
    </element-plus-vue-mention>
  </div>

  <div class="content">
    {{ content }}
  </div>
</template>

<style scoped>
.content {
  text-align: left;
  margin-top: 20px;
  height: 200px;
  width: 500px;
  padding: 4px;
  overflow-y: auto;
  border-radius: 4px;
  border: 1px solid rgb(232, 235, 240);
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>

效果

Snipaste_2025-06-23_18-01-36.png