PvSelect
Documentation
Example
Source
HTML
<script setup lang="ts">
import PvSelect from "@/components/base/PvSelect/PvSelect.vue";
import { OptionWithIcon } from "@/types.ts";
import { ref } from "vue";
const options: OptionWithIcon[] = [
{
label: "Option 1",
value: "option1",
iconName: "chart-area",
iconPosition: "left",
},
{
label: "Option 2",
value: "option2",
iconName: "chart-bar",
iconPosition: "left",
},
];
const selectedOptions = ref<string>("option1");
</script>
<template>
<PvSelect :options="options" v-model="selectedOptions"></PvSelect>
</template>
Properties
Prop Name | Type | Required | Default | Description |
---|---|---|---|---|
defaultText |
string | undefined |
no |
“Select an option” |
- |
disabled |
boolean | undefined |
no |
false |
- |
modelValue |
string | undefined |
no |
“” |
- |
options |
Option[] | OptionWithIcon[] |
no |
[] |
- |
Event Name | Type | Description |
---|---|---|
update:modelValue |
[value: string] |
- |