This commit is contained in:
26
src/components/basic/PluginInput.vue
Normal file
26
src/components/basic/PluginInput.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="kintoneplugin-input-container flex-row">
|
||||
<plugin-label v-if="label" :label="label" />
|
||||
<kuc-text :placeholder="placeholder" className="kuc-text-input" :value="modelValue" @change="updateValue" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { KucEvent } from '@/types/my-kintone';
|
||||
import type { TextInputEventDetail } from 'kintone-ui-component';
|
||||
import { defineProps, defineEmits } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
label: string;
|
||||
modelValue: string;
|
||||
placeholder: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: string): void;
|
||||
}>();
|
||||
|
||||
const updateValue = ({ detail }: KucEvent<TextInputEventDetail>) => {
|
||||
emit('update:modelValue', detail.value || '');
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user