initial public commit
This commit is contained in:
17
ui/src/components/base/MultipleValueInput.svelte
Normal file
17
ui/src/components/base/MultipleValueInput.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script>
|
||||
import CommonHelper from "@/utils/CommonHelper";
|
||||
|
||||
export let value = [];
|
||||
export let separator = ",";
|
||||
|
||||
$: valueStr = (value || []).join(",");
|
||||
</script>
|
||||
|
||||
<input
|
||||
type={$$restProps.type || "text"}
|
||||
value={valueStr}
|
||||
on:input={(e) => {
|
||||
value = CommonHelper.splitNonEmpty(e.target.value, separator);
|
||||
}}
|
||||
{...$$restProps}
|
||||
/>
|
||||
Reference in New Issue
Block a user