Browse Source

chore(nc-gui): lint

pull/5193/head
Wing-Kam Wong 2 years ago
parent
commit
b60647d509
  1. 2
      packages/nc-gui/components/cell/GeoData.vue
  2. 21
      packages/nc-gui/components/dlg/TableCreate.vue
  3. 6
      packages/nc-gui/components/smartsheet/Map.vue
  4. 5
      packages/nc-gui/composables/useViewColumns.ts

2
packages/nc-gui/components/cell/GeoData.vue

@ -83,7 +83,7 @@ const onClickSetCurrentLocation = () => {
</div>
</div>
</div>
<div data-testid="nc-geo-data-lat-long-set" v-else>{{ latLongStr }}</div>
<div v-else data-testid="nc-geo-data-lat-long-set">{{ latLongStr }}</div>
<template #overlay>
<a-form :model="formState" class="flex flex-col" @finish="handleFinish">
<a-form-item>

21
packages/nc-gui/components/dlg/TableCreate.vue

@ -1,16 +1,5 @@
<script setup lang="ts">
import {
Form,
computed,
nextTick,
onMounted,
ref,
useProject,
useTable,
useTabs,
useVModel,
validateTableName,
} from '#imports'
import { Form, computed, nextTick, onMounted, ref, useProject, useTable, useTabs, useVModel, validateTableName } from '#imports'
import { TabType } from '~/lib'
const props = defineProps<{
@ -125,9 +114,8 @@ onMounted(() => {
<template #footer>
<a-button key="back" size="large" @click="dialogShow = false">{{ $t('general.cancel') }}</a-button>
<a-button key="submit" size="large" type="primary" :loading="creating" @click="_createTable">{{
$t('general.submit')
}}
<a-button key="submit" size="large" type="primary" :loading="creating" @click="_createTable"
>{{ $t('general.submit') }}
</a-button>
</template>
@ -164,8 +152,7 @@ onMounted(() => {
<div v-if="!project.prefix" class="mb-2">{{ $t('msg.info.tableNameInDb') }}</div>
<a-form-item v-if="!project.prefix" v-bind="validateInfos.table_name">
<a-input v-model:value="table.table_name" size="large" hide-details
:placeholder="$t('msg.info.tableNameInDb')" />
<a-input v-model:value="table.table_name" size="large" hide-details :placeholder="$t('msg.info.tableNameInDb')" />
</a-form-item>
<div>

6
packages/nc-gui/components/smartsheet/Map.vue

@ -3,7 +3,7 @@ import 'leaflet/dist/leaflet.css'
import L, { LatLng } from 'leaflet'
import 'leaflet.markercluster'
import { ViewTypes } from 'nocodb-sdk'
import { OpenNewRecordFormHookInj, latLongToJoinedString, onMounted, provide, ref, IsPublicInj } from '#imports'
import { IsPublicInj, OpenNewRecordFormHookInj, latLongToJoinedString, onMounted, provide, ref } from '#imports'
import type { Row as RowType } from '~/lib'
const route = useRoute()
@ -14,7 +14,7 @@ const reloadViewDataHook = inject(ReloadViewDataHookInj)
const reloadViewMetaHook = inject(ReloadViewMetaHookInj)
const { formattedData, loadMapData, loadMapMeta, mapMetaData, geoDataFieldColumn, addEmptyRow, syncCount, paginationData } =
const { formattedData, loadMapData, loadMapMeta, mapMetaData, geoDataFieldColumn, addEmptyRow, paginationData } =
useMapViewStoreOrThrow()
const markersClusterGroupRef = ref<L.MarkerClusterGroup>()
@ -88,7 +88,7 @@ const addMarker = (lat: number, long: number, row: RowType) => {
throw new Error('Marker cluster is null')
}
const newMarker = L.marker([lat, long], {
alt: `${lat}, ${long}`
alt: `${lat}, ${long}`,
}).on('click', () => {
expandForm(row)
})

5
packages/nc-gui/composables/useViewColumns.ts

@ -1,5 +1,5 @@
import { isSystemColumn, MapType, ViewTypes } from 'nocodb-sdk'
import type { ColumnType, TableType, ViewType } from 'nocodb-sdk'
import { ViewTypes, isSystemColumn } from 'nocodb-sdk'
import type { ColumnType, MapType, TableType, ViewType } from 'nocodb-sdk'
import type { ComputedRef, Ref } from 'vue'
import { IsPublicInj, computed, inject, ref, useNuxtApp, useProject, useUIPermission, watch } from '#imports'
import type { Field } from '~/lib'
@ -45,7 +45,6 @@ export function useViewColumns(
})
const loadViewColumns = async () => {
if (!meta || !view) return
let order = 1

Loading…
Cancel
Save