mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-12-21 07:49:08 +08:00
Optimize: copy
This commit is contained in:
parent
126a37b847
commit
2c7ebd4e99
@ -1,8 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, h } from "vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
import { Modal, message, notification } from "ant-design-vue";
|
||||
import { PlusOutlined } from "@ant-design/icons-vue";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import CardPanel from "@/components/CardPanel.vue";
|
||||
import BetweenMenus from "@/components/BetweenMenus.vue";
|
||||
import { useScreen } from "@/hooks/useScreen";
|
||||
@ -10,7 +9,6 @@ import { arrayFilter } from "@/tools/array";
|
||||
import { useLayoutCardTools } from "@/hooks/useCardTools";
|
||||
import { imageList, containerList } from "@/services/apis/envImage";
|
||||
import type { LayoutCard, ImageInfo, ContainerInfo } from "@/types";
|
||||
import CopyButton from "@/components/CopyButton.vue";
|
||||
import { useAppRouters } from "@/hooks/useAppRouters";
|
||||
import type { AntColumnsType, AntTableCell } from "@/types/ant";
|
||||
|
||||
@ -51,8 +49,7 @@ const imageColumns = computed(() => {
|
||||
align: "center",
|
||||
title: "ID",
|
||||
dataIndex: "Id",
|
||||
key: "Id",
|
||||
minWidth: 200
|
||||
key: "Id"
|
||||
},
|
||||
{
|
||||
align: "center",
|
||||
@ -122,8 +119,7 @@ const containerColumns = computed(() => {
|
||||
align: "center",
|
||||
title: "ID",
|
||||
dataIndex: "Id",
|
||||
key: "Id",
|
||||
minWidth: 200
|
||||
key: "Id"
|
||||
},
|
||||
{
|
||||
align: "center",
|
||||
@ -238,8 +234,15 @@ onMounted(async () => {
|
||||
>
|
||||
<template #bodyCell="{ column, record }: AntTableCell">
|
||||
<template v-if="column.key === 'Id'">
|
||||
{{ record.Id }}
|
||||
<CopyButton :value="record.Id" class="ml-4" type="text" size="small" />
|
||||
<a-typography-paragraph
|
||||
class="mb-0"
|
||||
:copyable="{
|
||||
text: record.Id
|
||||
}"
|
||||
:ellipsis="{ rows: 1, expandable: false }"
|
||||
>
|
||||
{{ isPhone ? "" : record.Id }}
|
||||
</a-typography-paragraph>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-button class="mr-8" size="large" @click="showDetail(record)">
|
||||
@ -282,8 +285,15 @@ onMounted(async () => {
|
||||
>
|
||||
<template #bodyCell="{ column, record }: AntTableCell">
|
||||
<template v-if="column.key === 'Id'">
|
||||
{{ record.Id }}
|
||||
<CopyButton :value="record.Id" class="ml-4" type="text" size="small" />
|
||||
<a-typography-paragraph
|
||||
class="mb-0"
|
||||
:copyable="{
|
||||
text: record.Id
|
||||
}"
|
||||
:ellipsis="{ rows: 1, expandable: false }"
|
||||
>
|
||||
{{ isPhone ? "" : record.Id }}
|
||||
</a-typography-paragraph>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-button class="mr-8" size="large" @click="showDetail(record)">
|
||||
|
@ -22,7 +22,6 @@ import { useLayoutCardTools } from "@/hooks/useCardTools";
|
||||
import type { LayoutCard } from "@/types";
|
||||
import { arrayFilter } from "@/tools/array";
|
||||
import { GLOBAL_INSTANCE_UUID } from "@/config/const";
|
||||
import CopyButton from "@/components/CopyButton.vue";
|
||||
import NodeDetailDialog from "./NodeDetailDialog.vue";
|
||||
|
||||
const nodeDetailDialog = ref<InstanceType<typeof NodeDetailDialog>>();
|
||||
@ -200,16 +199,12 @@ const nodeOperations = computed(() =>
|
||||
{{ detail.title }}
|
||||
</div>
|
||||
<div v-if="detail.onlyCopy">
|
||||
<CopyButton type="link" size="small" :value="detail.value ?? ''" />
|
||||
<a-typography-text :copyable="{ text: detail.value ?? '' }"></a-typography-text>
|
||||
</div>
|
||||
<div v-else>
|
||||
<a-tooltip v-if="detail.warn && detail.value">
|
||||
<template #title>
|
||||
{{
|
||||
t(
|
||||
"TXT_CODE_e520908a"
|
||||
)
|
||||
}}
|
||||
{{ t("TXT_CODE_e520908a") }}
|
||||
</template>
|
||||
<span class="color-danger"><InfoCircleOutlined /> {{ detail.value }}</span>
|
||||
</a-tooltip>
|
||||
|
Loading…
Reference in New Issue
Block a user