refactor(components): update band selector
allow for custom label to be passed to the form item
This commit is contained in:
parent
3afcd2b602
commit
26c0352504
@ -3,7 +3,7 @@
|
|||||||
import { RuleExpression, useField } from "vee-validate";
|
import { RuleExpression, useField } from "vee-validate";
|
||||||
import { cs } from "@client/storyFormSchema";
|
import { cs } from "@client/storyFormSchema";
|
||||||
import { IBand } from "@models/band";
|
import { IBand } from "@models/band";
|
||||||
|
const props = defineProps<{ label: string }>();
|
||||||
const bandlist = inject<IBand[]>("bandlist");
|
const bandlist = inject<IBand[]>("bandlist");
|
||||||
const fname = inject<string>("curName");
|
const fname = inject<string>("curName");
|
||||||
const { updateBands, sb } = inject<any>("selectedBands");
|
const { updateBands, sb } = inject<any>("selectedBands");
|
||||||
@ -22,10 +22,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a-form-item :validate-status="!!errorMessage ? 'error' : undefined" :help="errorMessage as any" label="Bands">
|
<a-form-item :validate-status="!!errorMessage ? 'error' : undefined" :help="errorMessage as any" :label="label || 'Bands'">
|
||||||
<a-select
|
<a-select
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:allow-clear="true"
|
:allow-clear="true"
|
||||||
|
placement="topLeft"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
option-filter-prop="label"
|
option-filter-prop="label"
|
||||||
@change="
|
@change="
|
||||||
|
Loading…
x
Reference in New Issue
Block a user