Browse Source

fix(gui-v2): remove unnecessary computed & type

pull/2975/head
Wing-Kam Wong 2 years ago
parent
commit
290d3d36b1
  1. 9
      packages/nc-gui-v2/components/smartsheet-column/DurationOptions.vue

9
packages/nc-gui-v2/components/smartsheet-column/DurationOptions.vue

@ -4,13 +4,12 @@ import { durationOptions } from '@/utils'
const { formState, validateInfos, setAdditionalValidations, sqlUi, onDataTypeChange, onAlter } = useColumnCreateStoreOrThrow() const { formState, validateInfos, setAdditionalValidations, sqlUi, onDataTypeChange, onAlter } = useColumnCreateStoreOrThrow()
const durationOptionList = computed(() => const durationOptionList =
durationOptions.map((o: Record<string, any>) => ({ durationOptions.map((o) => ({
...o, ...o,
// h:mm:ss (e.g. 3:45, 1:23:40) // h:mm:ss (e.g. 3:45, 1:23:40)
title: `${o.title} ${o.example}`, title: `${o.title} ${o.example}`,
})), })) || []
)
</script> </script>
<template> <template>
@ -21,7 +20,7 @@ const durationOptionList = computed(() =>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="Duration Format"> <a-form-item label="Duration Format">
<a-select v-model:value="formState.meta.duration" size="small" class="w-52"> <a-select v-model:value="formState.meta.duration" size="small" class="w-52">
<a-select-option v-for="(duration, i) in durationOptionList ?? []" :key="i" :value="duration.id"> <a-select-option v-for="(duration, i) of durationOptionList" :key="i" :value="duration.id">
{{ duration.title }} {{ duration.title }}
</a-select-option> </a-select-option>
</a-select> </a-select>

Loading…
Cancel
Save