mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
37 lines
1.3 KiB
4 years ago
|
<template>
|
||
2 years ago
|
<text-area-cell v-if="inputDetails.type === 'LongText'" v-model="localState" :input-details="inputDetails" />
|
||
|
<password-field v-else-if="inputDetails.type === 'Password'" v-model="localState" :input-details="inputDetails" />
|
||
|
<attachment v-else-if="inputDetails.type === 'Attachment'" v-model="localState" :input-details="inputDetails" />
|
||
|
<checkbox-field v-else-if="inputDetails.type === 'Checkbox'" v-model="localState" :input-details="inputDetails" />
|
||
3 years ago
|
<text-field v-else v-model="localState" :input-details="inputDetails" />
|
||
4 years ago
|
</template>
|
||
|
|
||
|
<script>
|
||
2 years ago
|
import TextField from '~/components/project/appStore/inputs/TextField';
|
||
|
import Attachment from '~/components/project/appStore/inputs/Attachment';
|
||
|
import PasswordField from '~/components/project/appStore/inputs/PasswordField';
|
||
|
import TextAreaCell from '~/components/project/spreadsheet/components/editableCell/TextAreaCell';
|
||
|
import CheckboxField from '~/components/project/appStore/inputs/CheckboxField';
|
||
4 years ago
|
|
||
|
export default {
|
||
3 years ago
|
name: 'FormInput',
|
||
3 years ago
|
components: { PasswordField, TextAreaCell, Attachment, TextField, CheckboxField },
|
||
4 years ago
|
props: {
|
||
|
value: String,
|
||
2 years ago
|
inputDetails: Object,
|
||
4 years ago
|
},
|
||
|
computed: {
|
||
|
localState: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return this.value;
|
||
4 years ago
|
},
|
||
3 years ago
|
set(val) {
|
||
2 years ago
|
this.$emit('input', val);
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
};
|
||
4 years ago
|
</script>
|
||
|
|
||
2 years ago
|
<style scoped></style>
|