feat [api]: actor input component (one per line)
This commit is contained in:
parent
05affca69d
commit
0a18c8b312
1 changed files with 21 additions and 3 deletions
|
@ -1,5 +1,23 @@
|
|||
<template></template>
|
||||
<template>
|
||||
<textarea v-model="actorsText" class="textarea" :rows="rows" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
import { PropType } from "@vue/runtime-core"
|
||||
|
||||
<style scoped lang="sass"></style>
|
||||
const props = defineProps({
|
||||
modelValue: { type: Array as PropType<string[]>, required: true },
|
||||
rows: { type: Number, default: 5 },
|
||||
})
|
||||
const emits = defineEmits(["update:modelValue"])
|
||||
|
||||
const actorsText = computed<string>({
|
||||
get() {
|
||||
return props.modelValue.join("\n")
|
||||
},
|
||||
set(value) {
|
||||
const array = value.split("\n")
|
||||
emits(`update:modelValue`, array)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue