Commit 5bde1faee2e8297d446e9461ef30f544dd775d28
1 parent
849339bf
perf: data component panel add show component name
Showing
4 changed files
with
37 additions
and
32 deletions
... | ... | @@ -16,7 +16,7 @@ VITE_PUBLIC_PATH = / |
16 | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
17 | 17 | VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] |
18 | 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
19 | -# VITE_PROXY = [["/api","http://192.168.10.111:8080/api"],["/thingskit-drawio","http://192.168.10.106:8080/api"]] | |
19 | +# VITE_PROXY = [["/api","http://192.168.10.136:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] | |
20 | 20 | |
21 | 21 | # 实时数据的ws地址 |
22 | 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= | ... | ... |
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | const props = defineProps<{ |
15 | 15 | id: string; |
16 | 16 | record: DataSource[]; |
17 | + panelName: string; | |
17 | 18 | }>(); |
18 | 19 | const { hasPermission } = usePermission(); |
19 | 20 | const dropMenuList = computed<DropMenu[]>(() => { |
... | ... | @@ -54,37 +55,40 @@ |
54 | 55 | </script> |
55 | 56 | |
56 | 57 | <template> |
57 | - <div class="flex justify-between w-full p-5"> | |
58 | - <div class="flex" :style="{ width: `calc(100% - 60px)` }"> | |
59 | - <div | |
60 | - v-for="(item, index) in props.record" | |
61 | - class="box-border truncate" | |
62 | - :style="{ width: `${100 / props.record.length}%` }" | |
63 | - :key="index" | |
64 | - > | |
65 | - <Tooltip :title="item.deviceName" placement="topLeft"> | |
66 | - <div class="flex p-1"> | |
67 | - <!-- <SvgIcon name="" prefix="iconfont" class="!fill-emerald-400" /> --> | |
68 | - <div class="truncate font-bold">{{ item.deviceRename || item.deviceName }}</div> | |
69 | - </div> | |
70 | - </Tooltip> | |
58 | + <div> | |
59 | + <div class="text-center pt-5 px-5 pb-3 font-bold text-lg">{{ props.panelName || '' }}</div> | |
60 | + <div class="flex justify-between w-full px-5 pb-5"> | |
61 | + <div class="flex" :style="{ width: `calc(100% - 60px)` }"> | |
62 | + <div | |
63 | + v-for="(item, index) in props.record" | |
64 | + class="box-border truncate" | |
65 | + :style="{ width: `${100 / props.record.length}%` }" | |
66 | + :key="index" | |
67 | + > | |
68 | + <Tooltip :title="item.deviceName" placement="topLeft"> | |
69 | + <div class="flex p-1"> | |
70 | + <!-- <SvgIcon name="" prefix="iconfont" class="!fill-emerald-400" /> --> | |
71 | + <div class="truncate font-bold">{{ item.deviceRename || item.deviceName }}</div> | |
72 | + </div> | |
73 | + </Tooltip> | |
74 | + </div> | |
75 | + </div> | |
76 | + <div class="flex items-center gap-5"> | |
77 | + <slot name="moreAction"></slot> | |
78 | + <Dropdown | |
79 | + v-if="dropMenuList.length" | |
80 | + :drop-menu-list="dropMenuList" | |
81 | + :trigger="['click']" | |
82 | + @menu-event="handleMenuEvent" | |
83 | + > | |
84 | + <Tooltip title="更多"> | |
85 | + <MoreOutlined | |
86 | + v-if="!getIsSharePage" | |
87 | + class="transform rotate-90 cursor-pointer w-4.5 h-4.5 text-lg" | |
88 | + /> | |
89 | + </Tooltip> | |
90 | + </Dropdown> | |
71 | 91 | </div> |
72 | - </div> | |
73 | - <div class="flex items-center gap-5"> | |
74 | - <slot name="moreAction"></slot> | |
75 | - <Dropdown | |
76 | - v-if="dropMenuList.length" | |
77 | - :drop-menu-list="dropMenuList" | |
78 | - :trigger="['click']" | |
79 | - @menu-event="handleMenuEvent" | |
80 | - > | |
81 | - <Tooltip title="更多"> | |
82 | - <MoreOutlined | |
83 | - v-if="!getIsSharePage" | |
84 | - class="transform rotate-90 cursor-pointer w-4.5 h-4.5 text-lg" | |
85 | - /> | |
86 | - </Tooltip> | |
87 | - </Dropdown> | |
88 | 92 | </div> |
89 | 93 | </div> |
90 | 94 | </template> | ... | ... |
... | ... | @@ -32,7 +32,7 @@ export const basicSchema: FormSchema[] = [ |
32 | 32 | field: BasicConfigField.NAME, |
33 | 33 | label: '组件名称', |
34 | 34 | component: 'Input', |
35 | - rules: [{ required: true, message: '组件名称为必填项' }], | |
35 | + // rules: [{ required: true, message: '组件名称为必填项' }], | |
36 | 36 | componentProps: { |
37 | 37 | placeholder: '请输入组件名称', |
38 | 38 | }, | ... | ... |