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.
31 lines
830 B
31 lines
830 B
2 years ago
|
<script setup lang="ts">
|
||
2 years ago
|
import { dateFormats } from '~/utils'
|
||
2 years ago
|
|
||
2 years ago
|
interface Props {
|
||
|
value: Record<string, any>
|
||
|
}
|
||
|
|
||
|
const props = defineProps<Props>()
|
||
|
const emit = defineEmits(['update:value'])
|
||
|
const vModel = useVModel(props, 'value', emit)
|
||
2 years ago
|
|
||
2 years ago
|
if (!vModel.value.meta?.date_format) {
|
||
|
if (!vModel.value.meta) vModel.value.meta = {}
|
||
|
vModel.value.meta.date_format = dateFormats[0]
|
||
2 years ago
|
}
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<a-form-item label="Date Format">
|
||
2 years ago
|
<a-select v-model:value="vModel.meta.date_format" dropdown-class-name="nc-dropdown-date-format">
|
||
2 years ago
|
<a-select-option v-for="(format, i) of dateFormats" :key="i" :value="format">
|
||
|
<div class="flex flex-row items-center">
|
||
|
<div class="text-xs">
|
||
|
{{ format }}
|
||
|
</div>
|
||
|
</div>
|
||
|
</a-select-option>
|
||
|
</a-select>
|
||
|
</a-form-item>
|
||
|
</template>
|