一键导入
el-mention
Mention component for mentioning users or items in input. Invoke when user needs to implement @mentions, user tagging, or item references in text inputs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Mention component for mentioning users or items in input. Invoke when user needs to implement @mentions, user tagging, or item references in text inputs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Element Plus Skills Library - A comprehensive skill library for AI agents to understand and utilize Element Plus UI components. Invoke when user needs to work with Element Plus components, theming, i18n, dark mode, or design specifications.
Affix component for fixing elements to a specific visible area. Invoke when user needs to create sticky navigation, fixed headers, or elements that remain visible while scrolling.
Alert component for displaying important alert messages. Invoke when user needs to show non-dismissible notifications, status messages, or important information that requires user attention.
Anchor component for anchor navigation. Invoke when user needs to create page anchor navigation, table of contents, or quick navigation to specific sections.
Autocomplete component for input suggestions. Invoke when user needs to provide input suggestions, autocomplete functionality, or search-as-you-type features.
Avatar component for representing people or objects with images, icons, or characters. Invoke when user needs to display user avatars, profile pictures, or entity representations.
| name | el-mention |
| description | Mention component for mentioning users or items in input. Invoke when user needs to implement @mentions, user tagging, or item references in text inputs. |
| metadata | {"author":"jiaiyan","version":"1.0.0"} |
Mention allows users to mention someone or something in an input field.
<template>
<el-mention
v-model="value"
:options="options"
placeholder="Type @ to mention"
/>
</template>
<script setup>
import { ref } from 'vue'
const value = ref('')
const options = [
{ value: 'user1', label: 'User 1' },
{ value: 'user2', label: 'User 2' },
{ value: 'user3', label: 'User 3' }
]
</script>
<template>
<el-mention
v-model="value"
:options="options"
type="textarea"
placeholder="Type @ to mention"
/>
</template>
<template>
<el-mention
v-model="value"
:options="options"
:props="{ value: 'id', label: 'name' }"
/>
</template>
<script setup>
import { ref } from 'vue'
const value = ref('')
const options = [
{ id: '1', name: 'User 1' },
{ id: '2', name: 'User 2' }
]
</script>
<template>
<el-mention v-model="value" :options="options">
<template #label="{ item }">
<div style="display: flex; align-items: center;">
<el-avatar :size="24" />
<span>{{ item.label }}</span>
</div>
</template>
</el-mention>
</template>
<template>
<el-mention
v-model="value"
:options="options"
:loading="loading"
@search="handleSearch"
/>
</template>
<script setup>
import { ref } from 'vue'
const value = ref('')
const options = ref([])
const loading = ref(false)
const handleSearch = async (pattern, prefix) => {
loading.value = true
const res = await fetch(`/api/users?q=${pattern}`)
options.value = await res.json()
loading.value = false
}
</script>
<template>
<el-mention
v-model="value"
:options="options"
prefix="#"
placeholder="Type # to tag"
/>
</template>
<template>
<el-mention
v-model="value"
:options="options"
whole
/>
</template>
| Name | Description | Type | Default |
|---|---|---|---|
| model-value / v-model | Input value | string | — |
| options | Mention options | MentionOption[] | [] |
| props | Configuration options | MentionOptionProps | {value: 'value', label: 'label', disabled: 'disabled'} |
| prefix | Trigger character | string | string[] | '@' |
| split | Split character | string | ' ' |
| filter-option | Custom filter logic | (pattern, option) => boolean | — |
| placement | Popup placement | 'bottom' | 'top' | 'bottom' |
| show-arrow | Show dropdown arrow | boolean | false |
| offset | Dropdown offset | number | 0 |
| whole | Delete mention as whole | boolean | false |
| check-is-whole | Custom whole check | (pattern, prefix) => boolean | — |
| loading | Loading state | boolean | false |
| popper-class | Custom dropdown class | string | object | '' |
| popper-style | Custom dropdown style | string | object | — |
| Name | Description | Type |
|---|---|---|
| search | Triggered on prefix hit | (pattern, prefix) => void |
| select | Option selected | (option, prefix) => void |
| whole-remove | Whole mention removed | (pattern, prefix) => void |
| Name | Description | Type |
|---|---|---|
| label | Custom option label | { item, index } |
| loading | Loading content | — |
| header | Dropdown header | — |
| footer | Dropdown footer | — |
| Name | Description | Type |
|---|---|---|
| input | Input component instance | Ref<InputInstance> |
| tooltip | Tooltip component instance | Ref<TooltipInstance> |
| dropdownVisible | Dropdown visibility | ComputedRef<boolean> |
loading for async option loadingprefix for different trigger characterswhole for better UX when deleting mentions