fix: update selectors

This commit is contained in:
Qiuxia Fan
2021-12-27 15:57:01 +08:00
parent 227ef4f092
commit fe81197d49
3 changed files with 15 additions and 12 deletions

View File

@@ -44,10 +44,11 @@ const props = defineProps({
type: Array as PropType<Option[]>,
default: () => [],
},
value: { type: String, default: "" },
size: { type: String, default: "small" },
placeholder: { type: String, default: "Select a option" },
});
const selected = ref<string>("");
const selected = ref<string>(props.value);
function changeSelected() {
const optionSele = props.options.filter(
(d: Option) => d.value === selected.value