-
-
Save yuri1969/d78726311c318f3fc80121053ea9e1c7 to your computer and use it in GitHub Desktop.
Vue Element Plus select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<el-select | |
:model-value="options" | |
@update:model-value="onInput" | |
multiple | |
filterable | |
allow-create | |
default-first-option | |
clearable | |
collapse-tags | |
collapse-tags-tooltip | |
:reserve-keyword="false" | |
:persistent="false" | |
placeholder="Choose tags for your article" | |
> | |
<el-option | |
v-for="item in options" | |
:key="item" | |
:label="item" | |
:value="item" | |
/> | |
</el-select> | |
</template> | |
<script lang="ts" setup> | |
import { ref } from 'vue' | |
const onInput = (value) => options.value = value.slice(); | |
const value = ref<string[]>([]); | |
const options = ref(["foo", "bar"]); | |
// https://playcode.io/element_plus | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment