Добавил иконки

This commit is contained in:
Ilia Miheev
2026-03-09 17:59:08 +03:00
parent dad1498a68
commit 23f65a101e
8 changed files with 23 additions and 5 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+23 -5
View File
@@ -1,5 +1,5 @@
<script setup> <script setup>
import {ref, onMounted} from "vue"; import {ref, onMounted, h} from "vue";
import izitoast from "./shared/izitoast"; import izitoast from "./shared/izitoast";
import {useEventListener} from "@vueuse/core"; import {useEventListener} from "@vueuse/core";
import MyDialog from "./components/MyDialog.vue"; import MyDialog from "./components/MyDialog.vue";
@@ -214,7 +214,15 @@ function deletePointMap(item) {
item.BgImg = 'images/ArUco-marker.jpg' item.BgImg = 'images/ArUco-marker.jpg'
} }
} }
function createIcon(src) {
return h('img', {
src: src,
style: {
width: '20px',
height: '20px',
}
})
}
function onContextMenu(e, item) { function onContextMenu(e, item) {
ContextMenu.showContextMenu({ ContextMenu.showContextMenu({
theme: 'mac dark', theme: 'mac dark',
@@ -222,41 +230,51 @@ function onContextMenu(e, item) {
y: e.y, y: e.y,
items: [ items: [
{ {
label: "Платформы", label: "Платформа",
icon: createIcon('icons/base_square.webp'),
children: [ children: [
{ {
label: "Белая", label: "Белая",
onClick: () => createPlatform(item, 'white'), onClick: () => createPlatform(item, 'white'),
icon: createIcon('icons/white_square.webp'),
}, },
{ {
label: "Синяя", label: "Синяя",
onClick: () => createPlatform(item, 'blue'), onClick: () => createPlatform(item, 'blue'),
icon: createIcon('icons/blue_square.webp'),
}, },
{ {
label: "Красная", label: "Красная",
onClick: () => createPlatform(item, 'red'), onClick: () => createPlatform(item, 'red'),
icon: createIcon('icons/red_square.webp'),
}, },
{ {
label: "Удалить", label: "Удалить",
onClick: () => deletePlatform(item), onClick: () => deletePlatform(item),
icon: createIcon('icons/trash.webp'),
}, },
] ]
}, },
{ {
label: "QR код", label: "QR код",
icon: createIcon('icons/qr_code.png'),
children: [ children: [
{ {
label: "Добавить", label: "Добавить",
onClick: () => createQR(item) onClick: () => createQR(item),
icon: createIcon('icons/plus.webp')
}, },
{ {
label: "Удалить", label: "Удалить",
onClick: () => deleteQR(item) onClick: () => deleteQR(item),
icon: createIcon('icons/trash.webp')
}, },
], ],
}, },
{ {
label: "Удалить", label: "Удалить",
icon: createIcon('icons/trash.webp'),
onClick: () => deletePointMap(item), onClick: () => deletePointMap(item),
}, },
] ]