mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
4 changed files with 20 additions and 20 deletions
@ -1,15 +1,14 @@
|
||||
import { useNuxtApp } from "#app"; |
||||
import { TableType } from "nocodb-sdk"; |
||||
import { Ref } from "vue"; |
||||
import type { TableType } from 'nocodb-sdk' |
||||
import type { Ref } from 'vue' |
||||
import { useNuxtApp } from '#app' |
||||
|
||||
export default function(meta: Ref<TableType>) { |
||||
const views = ref(); |
||||
const { $api } = useNuxtApp(); |
||||
export default function (meta: Ref<TableType>) { |
||||
const views = ref() |
||||
const { $api } = useNuxtApp() |
||||
|
||||
const loadViews = async () => { |
||||
if (meta.value?.id) |
||||
views.value = (await $api.dbView.list(meta.value?.id)).list; |
||||
}; |
||||
if (meta.value?.id) views.value = (await $api.dbView.list(meta.value?.id)).list |
||||
} |
||||
|
||||
return { views, loadViews }; |
||||
return { views, loadViews } |
||||
} |
||||
|
@ -1,11 +1,11 @@
|
||||
import { ViewTypes } from 'nocodb-sdk' |
||||
|
||||
export const viewIcons = { |
||||
export const viewIcons = { |
||||
[ViewTypes.GRID]: { icon: 'mdi-grid-large', color: 'blue' }, |
||||
// [ViewTypes.GRID]: { icon: "mdi-grid-large", color: "blue" },
|
||||
[ViewTypes.FORM]: { icon: 'mdi-form-select', color: 'pink' }, |
||||
calendar: { icon: 'mdi-calendar', color: 'purple' }, |
||||
[ViewTypes.GALLERY]: { icon: 'mdi-camera-image', color: 'orange' }, |
||||
[ViewTypes.KANBAN]: { icon: 'mdi-tablet-dashboard', color: 'green' }, |
||||
view: { icon: 'mdi-eye-circle-outline', color: 'blue' } |
||||
view: { icon: 'mdi-eye-circle-outline', color: 'blue' }, |
||||
} |
||||
|
@ -1,11 +1,11 @@
|
||||
import { ViewTypes } from 'nocodb-sdk' |
||||
|
||||
export const viewIcons = { |
||||
export const viewIcons = { |
||||
[ViewTypes.GRID]: { icon: 'mdi-grid-large', color: 'blue' }, |
||||
// [ViewTypes.GRID]: { icon: "mdi-grid-large", color: "blue" },
|
||||
[ViewTypes.FORM]: { icon: 'mdi-form-select', color: 'pink' }, |
||||
calendar: { icon: 'mdi-calendar', color: 'purple' }, |
||||
[ViewTypes.GALLERY]: { icon: 'mdi-camera-image', color: 'orange' }, |
||||
[ViewTypes.KANBAN]: { icon: 'mdi-tablet-dashboard', color: 'green' }, |
||||
view: { icon: 'mdi-eye-circle-outline', color: 'blue' } |
||||
view: { icon: 'mdi-eye-circle-outline', color: 'blue' }, |
||||
} |
||||
|
Loading…
Reference in new issue