|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { UITypes } from 'nocodb-sdk' |
|
|
|
|
import type { ColumnType } from 'nocodb-sdk' |
|
|
|
|
import { storeToRefs } from 'pinia' |
|
|
|
|
import { |
|
|
|
@ -80,6 +81,7 @@ const checkTypeFunctions = {
|
|
|
|
|
isInt, |
|
|
|
|
isFloat, |
|
|
|
|
isTextArea, |
|
|
|
|
isLinks: (col: ColumnType) => col.uidt === UITypes.Links, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type FilterType = keyof typeof checkTypeFunctions |
|
|
|
@ -145,6 +147,7 @@ const componentMap: Partial<Record<FilterType, any>> = $computed(() => {
|
|
|
|
|
isDecimal: Decimal, |
|
|
|
|
isInt: Integer, |
|
|
|
|
isFloat: Float, |
|
|
|
|
isLinks: Integer, |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -161,6 +164,7 @@ const componentProps = $computed(() => {
|
|
|
|
|
case 'isPercent': |
|
|
|
|
case 'isDecimal': |
|
|
|
|
case 'isFloat': |
|
|
|
|
case 'isLinks': |
|
|
|
|
case 'isInt': { |
|
|
|
|
return { class: 'h-32px' } |
|
|
|
|
} |
|
|
|
@ -176,7 +180,8 @@ const componentProps = $computed(() => {
|
|
|
|
|
const hasExtraPadding = $computed(() => { |
|
|
|
|
return ( |
|
|
|
|
column.value && |
|
|
|
|
(isInt(column.value, abstractType) || |
|
|
|
|
(column.value?.uidt === UITypes.Links || |
|
|
|
|
isInt(column.value, abstractType) || |
|
|
|
|
isDate(column.value, abstractType) || |
|
|
|
|
isDateTime(column.value, abstractType) || |
|
|
|
|
isTime(column.value, abstractType) || |
|
|
|
|