mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
docs(components): [mention] add an example of using props (#22139)
This commit is contained in:
36
docs/examples/mention/props.vue
Normal file
36
docs/examples/mention/props.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<el-mention
|
||||
v-model="value"
|
||||
:options="options"
|
||||
:props="props"
|
||||
style="width: 320px"
|
||||
placeholder="Please input"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const value = ref('@')
|
||||
const props = { label: 'name', value: 'id', disabled: 'unable' }
|
||||
const options = ref([
|
||||
{
|
||||
name: 'Fuphoenixes',
|
||||
id: 'Fuphoenixes',
|
||||
unable: true,
|
||||
},
|
||||
{
|
||||
name: 'kooriookami',
|
||||
id: 'kooriookami',
|
||||
},
|
||||
{
|
||||
name: 'Jeremy',
|
||||
id: 'Jeremy',
|
||||
unable: true,
|
||||
},
|
||||
{
|
||||
name: 'btea',
|
||||
id: 'btea',
|
||||
},
|
||||
])
|
||||
</script>
|
||||
Reference in New Issue
Block a user