多维表格
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.

49 lines
1.4 KiB

<script setup lang="ts">
import { computed, inject } from '#imports'
import { MetaInj } from '~/context'
// TODO: get editEnabled
const editEnabled = ref(true)
const meta = inject(MetaInj)
const columns = computed(() => meta?.value?.columns || [])
const hiddenColumns = computed(() => [])
function addAllColumns() {}
function removeAllColumns() {}
</script>
<template>
<a-row class="h-full">
<a-col v-if="editEnabled" :span="6" class="bg-[#f7f7f7] shadow-md pa-5">
<div class="flex">
<div class="flex flex-row flex-1 text-lg">
<span>
<!-- Fields -->
{{ $t('objects.fields') }}
</span>
</div>
<div class="flex flex-row">
<div class="cursor-pointer mr-2">
<span v-if="hiddenColumns.length" style="border-bottom: 2px solid rgb(218, 218, 218)" @click="addAllColumns()">
<!-- Add all -->
{{ $t('general.addAll') }}
</span>
<span v-if="columns.length" style="border-bottom: 2px solid rgb(218, 218, 218)" @click="removeAllColumns">
<!-- Remove all -->
{{ $t('general.removeAll') }}
</span>
</div>
</div>
</div>
TODO: Draggable
</a-col>
<a-col :span="editEnabled ? 18 : 24"> TODO: Form </a-col>
</a-row>
</template>
<style scoped lang="scss"></style>