Commit dfeb15db6fb2cba7a1cb08216ba8eea63d41e8e7

Authored by fengtao
1 parent 07b5fc75

pref:产品topic列表部分字段未对齐

@@ -22,45 +22,47 @@ @@ -22,45 +22,47 @@
22 </script> 22 </script>
23 23
24 <template> 24 <template>
25 - <section class="bg-gray-100 p-4 dark:bg-dark-900 w-full h-full"> 25 + <!-- <section class="bg-gray-100 p-4 dark:bg-dark-900 w-full h-full"> -->
  26 + <div>
26 <BasicTable @register="register"> 27 <BasicTable @register="register">
27 <template #function="{ record }"> 28 <template #function="{ record }">
28 <a-tooltip :title="record.function"> 29 <a-tooltip :title="record.function">
29 - <a-button type="text" class="ml-2" @click="handeleCopy(record.function)"> 30 + <a-button type="text" class="" @click="handeleCopy(record.function)">
30 <span>{{ record.function.slice(0, 13) }}</span> 31 <span>{{ record.function.slice(0, 13) }}</span>
31 </a-button> 32 </a-button>
32 </a-tooltip> 33 </a-tooltip>
33 </template> 34 </template>
34 <template #release="{ record }"> 35 <template #release="{ record }">
35 <a-tooltip :title="record.release"> 36 <a-tooltip :title="record.release">
36 - <a-button type="text" class="ml-2" @click="handeleCopy(record.release)"> 37 + <a-button type="text" class="" @click="handeleCopy(record.release)">
37 <span>{{ record.release.slice(0, 30) }}</span> 38 <span>{{ record.release.slice(0, 30) }}</span>
38 </a-button> 39 </a-button>
39 </a-tooltip> 40 </a-tooltip>
40 </template> 41 </template>
41 <template #subscribe="{ record }"> 42 <template #subscribe="{ record }">
42 <a-tooltip :title="record.subscribe"> 43 <a-tooltip :title="record.subscribe">
43 - <a-button type="text" class="ml-2" @click="handeleCopy(record.subscribe)"> 44 + <a-button type="text" class="" @click="handeleCopy(record.subscribe)">
44 <span>{{ record.subscribe.slice(0, 30) }}</span> 45 <span>{{ record.subscribe.slice(0, 30) }}</span>
45 </a-button> 46 </a-button>
46 </a-tooltip> 47 </a-tooltip>
47 </template> 48 </template>
48 <template #platform="{ record }"> 49 <template #platform="{ record }">
49 <a-tooltip :title="record.platform"> 50 <a-tooltip :title="record.platform">
50 - <a-button type="text" class="ml-2" @click="handeleCopy(record.platform)"> 51 + <a-button type="text" style="margin-left: -10px" @click="handeleCopy(record.platform)">
51 <span>{{ record.platform }}</span> 52 <span>{{ record.platform }}</span>
52 </a-button> 53 </a-button>
53 </a-tooltip> 54 </a-tooltip>
54 </template> 55 </template>
55 <template #device="{ record }"> 56 <template #device="{ record }">
56 <a-tooltip :title="record.device"> 57 <a-tooltip :title="record.device">
57 - <a-button type="text" class="ml-2" @click="handeleCopy(record.device)"> 58 + <a-button type="text" style="margin-left: -10px" @click="handeleCopy(record.device)">
58 <span>{{ record.device }}</span> 59 <span>{{ record.device }}</span>
59 </a-button> 60 </a-button>
60 </a-tooltip> 61 </a-tooltip>
61 </template> 62 </template>
62 </BasicTable> 63 </BasicTable>
63 - </section> 64 + </div>
  65 + <!-- </section> -->
64 </template> 66 </template>
65 <style scoped> 67 <style scoped>
66 :deep(.ant-table-body) { 68 :deep(.ant-table-body) {
@@ -4,7 +4,7 @@ export const topicTableColumn: BasicColumn[] = [ @@ -4,7 +4,7 @@ export const topicTableColumn: BasicColumn[] = [
4 { 4 {
5 title: '设备类型', 5 title: '设备类型',
6 dataIndex: 'deviceType', 6 dataIndex: 'deviceType',
7 - width: 50, 7 + width: 40,
8 customRender: ({ text, index }: { text: any; index: number }) => { 8 customRender: ({ text, index }: { text: any; index: number }) => {
9 const obj: any = { 9 const obj: any = {
10 children: text, 10 children: text,
@@ -28,31 +28,31 @@ export const topicTableColumn: BasicColumn[] = [ @@ -28,31 +28,31 @@ export const topicTableColumn: BasicColumn[] = [
28 { 28 {
29 title: '功能', 29 title: '功能',
30 dataIndex: 'function', 30 dataIndex: 'function',
31 - width: 100, 31 + width: 80,
32 slots: { customRender: 'function' }, 32 slots: { customRender: 'function' },
33 }, 33 },
34 { 34 {
35 title: '发布主题', 35 title: '发布主题',
36 dataIndex: 'release', 36 dataIndex: 'release',
37 - width: 120, 37 + width: 80,
38 slots: { customRender: 'release' }, 38 slots: { customRender: 'release' },
39 }, 39 },
40 { 40 {
41 title: '订阅主题', 41 title: '订阅主题',
42 dataIndex: 'subscribe', 42 dataIndex: 'subscribe',
43 - width: 120, 43 + width: 80,
44 slots: { customRender: 'subscribe' }, 44 slots: { customRender: 'subscribe' },
45 }, 45 },
46 { 46 {
47 title: '平台', 47 title: '平台',
48 dataIndex: 'platform', 48 dataIndex: 'platform',
49 - width: 30, 49 + width: 50,
50 slots: { customRender: 'platform' }, 50 slots: { customRender: 'platform' },
51 }, 51 },
52 { 52 {
53 title: '设备', 53 title: '设备',
54 dataIndex: 'device', 54 dataIndex: 'device',
55 - width: 30, 55 + width: 50,
56 slots: { customRender: 'device' }, 56 slots: { customRender: 'device' },
57 }, 57 },
58 ]; 58 ];