Commit 36d96f7841855d27eb6aaa7c5f286877ec5eb37a
Committed by
 xp.Huang
 xp.Huang
1 parent
451706de
fix: 云端产品和设备添加是否是边端产品的提示
Showing
4 changed files
with
33 additions
and
2 deletions
src/assets/icons/edgefornt.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1722937185750" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5222" id="mx_n_1722937185750" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M0 0v1024a1024 1024 0 0 1 1024-1024H0z" p-id="5223" fill="#1890ff"></path></svg> | ... | ... | 
| ... | ... | @@ -6,6 +6,7 @@ import { deviceProfile } from '/@/api/device/deviceManager'; | 
| 6 | 6 | import { h } from 'vue'; | 
| 7 | 7 | import { Tag, Tooltip } from 'ant-design-vue'; | 
| 8 | 8 | import { handeleCopy } from '../../profiles/step/topic'; | 
| 9 | +import edgefornt from '/@/assets/icons/edgefornt.svg'; | |
| 9 | 10 | |
| 10 | 11 | export enum DeviceListAuthEnum { | 
| 11 | 12 | /** | 
| ... | ... | @@ -84,8 +85,9 @@ export const columns: BasicColumn[] = [ | 
| 84 | 85 | title: '别名/设备名称', | 
| 85 | 86 | width: 210, | 
| 86 | 87 | slots: { customRender: 'name', title: 'deviceTitle' }, | 
| 88 | + className: 'device-name-edge', | |
| 87 | 89 | customRender: ({ record }) => { | 
| 88 | - return h('div', { style: 'display:flex;flex-direction:column' }, [ | |
| 90 | + return h('div', { class: 'py-3 px-3.5' }, [ | |
| 89 | 91 | record.alias && | 
| 90 | 92 | h( | 
| 91 | 93 | 'div', | 
| ... | ... | @@ -118,6 +120,19 @@ export const columns: BasicColumn[] = [ | 
| 118 | 120 | () => `${record.name}` | 
| 119 | 121 | ) | 
| 120 | 122 | ), | 
| 123 | + record.isEdge | |
| 124 | + ? h('div', { class: 'absolute top-0 left-0', fill: '#1890ff' }, [ | |
| 125 | + h('img', { src: edgefornt }), | |
| 126 | + h( | |
| 127 | + 'span', | |
| 128 | + { | |
| 129 | + class: | |
| 130 | + 'absolute top-0.5 left-0.5 text-light-50 transform -rotate-45 translate-y-0', | |
| 131 | + }, | |
| 132 | + '边' | |
| 133 | + ), | |
| 134 | + ]) | |
| 135 | + : '', | |
| 121 | 136 | ]); | 
| 122 | 137 | }, | 
| 123 | 138 | }, | ... | ... | 
| ... | ... | @@ -24,6 +24,7 @@ | 
| 24 | 24 | import { BasicCardList, useCardList } from '/@/components/CardList'; | 
| 25 | 25 | import { useRoute } from 'vue-router'; | 
| 26 | 26 | import { ref } from 'vue'; | 
| 27 | + import edgefornt from '/@/assets/icons/edgefornt.svg'; | |
| 27 | 28 | |
| 28 | 29 | defineProps<{ | 
| 29 | 30 | mode: EnumTableCardMode; | 
| ... | ... | @@ -154,7 +155,7 @@ | 
| 154 | 155 | <template #renderItem="{ item }: BasicCardListRenderItem<ProfileRecord>"> | 
| 155 | 156 | <Card hoverable> | 
| 156 | 157 | <template #cover> | 
| 157 | - <div class="h-full w-full !flex justify-center items-center text-center p-1"> | |
| 158 | + <div class="h-full w-full !flex justify-center items-center text-center p-1 relative"> | |
| 158 | 159 | <Image | 
| 159 | 160 | @click.stop | 
| 160 | 161 | wrapper-class-name="!w-32 !h-32 !flex !items-center overflow-hidden" | 
| ... | ... | @@ -162,6 +163,13 @@ | 
| 162 | 163 | placeholder | 
| 163 | 164 | :fallback="IMAGE_FALLBACK" | 
| 164 | 165 | /> | 
| 166 | + <div v-if="item.isEdge" class="absolute top-0 left-0"> | |
| 167 | + <img :src="edgefornt" /> | |
| 168 | + <span | |
| 169 | + class="absolute top-0 left-0 text-light-50 transform -rotate-45 translate-y-1 translate-x-0.5" | |
| 170 | + >边</span | |
| 171 | + > | |
| 172 | + </div> | |
| 165 | 173 | </div> | 
| 166 | 174 | </template> | 
| 167 | 175 | <template class="ant-card-actions" #actions> | ... | ... |