useCanvasHeaderMachineStore.js
2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { defineStore } from 'pinia';
import { onMounted, reactive, ref } from 'vue';
import FASTPRINTIO from '@/views/assets/images/header-machine/fastprint.io.png';
import ILUX3PLUS from '@/views/assets/images/header-machine/ilux3+.png';
export const useCanvasHeaderMachineStore = defineStore('canvas-header-machine', () => {
const items = reactive([
{
key: 'iluxprodental',
name: 'iLux Pro Dental',
size: '192*108*200',
image: FASTPRINTIO,
enabled: true,
x: 192,
y: 108,
z: 200,
interval: 5,
lengthBound: 5,
distanceWidth: 1,
distanceLength: 4
},
{
key: 'fastprintio',
name: 'fastprint.io',
size: '153.6*86.4*200',
image: FASTPRINTIO,
enabled: true,
x: 153.6,
y: 86.4,
z: 200,
interval: 5,
lengthBound: 0,
distanceWidth: 1.8,
distanceLength: 3.2
},
{
key: 'Quantum',
name: 'Quantum Pro Lite Pro',
size: '192*120*200',
image: ILUX3PLUS,
enabled: true
},
{
key: 'lux3+',
name: 'Lux 3+',
size: '192*120*200',
image: ILUX3PLUS,
enabled: true
},
{
key: 'lux3+',
name: 'Lux 3+',
size: '192*120*200',
image: ILUX3PLUS,
enabled: true
},
{
key: 'lux3+',
name: 'Lux 3+',
size: '192*120*200',
image: ILUX3PLUS,
enabled: true
}
]);
const selecteditem = ref(items[0]);
const handleSelect = (val) => {
const item = items.find((el) => el.key === val);
if (item) {
selecteditem.value = item;
}
};
return {
items,
selecteditem,
handleSelect
};
});