main
vue 43 lines 1.1 KB
Raw
1 <template>
2 <div>
3 <n-button :size @click.stop="showDetails = true">
4 <template #icon>
5 <Icon :name="MetaIcon" />
6 </template>
7 Meta Details
8 </n-button>
9
10 <n-modal
11 v-model:show="showDetails"
12 preset="card"
13 :style="{ maxWidth: 'min(800px, 90vw)', minHeight: 'min(411px, 90vh)', overflow: 'hidden' }"
14 content-class="flex flex-col"
15 :title="`${integrationName} — Meta Details`"
16 :bordered="false"
17 segmented
18 display-directive="show"
19 >
20 <CustomerIntegrationMetaDetails :customer-code :integration-name />
21 </n-modal>
22 </div>
23 </template>
24
25 <script setup lang="ts">
26 import type { ButtonSize } from "naive-ui"
27 import { NButton, NModal } from "naive-ui"
28 import { defineAsyncComponent, ref } from "vue"
29 import Icon from "@/components/common/Icon.vue"
30
31 const { integrationName, customerCode, size } = defineProps<{
32 integrationName: string
33 customerCode: string
34 size?: ButtonSize
35 }>()
36
37 const CustomerIntegrationMetaDetails = defineAsyncComponent(
38 () => import("../metadata/CustomerIntegrationMetaDetails.vue")
39 )
40
41 const MetaIcon = "carbon:data-base"
42 const showDetails = ref(false)
43 </script>