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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
| <template>
| <div class="SdkBox" v-drag>
| <div class="title">算法事件</div>
| <div class="close iconfont" @click="close()"></div>
|
| <div class="sdkList scroll">
| <el-tooltip
| v-for="(item, index) in this.TaskMange.list1"
| :key="index"
| :content="item.sdk_name"
| placement="top"
| >
| <img
| :src="item.iconBlob"
| alt=""
| draggable="true"
| @dragstart="dragstart(item)"
| @dragend="dragleave"
| />
| </el-tooltip>
| </div>
| </div>
| </template>
|
| <script>
| import bus from "@/plugin/bus";
| export default {
| created() {
| console.log(121212);
| console.log(this.TaskMange.list1);
| },
| methods: {
| close() {
| this.$emit("close");
| },
| dragstart(data) {
| this.$store.commit("setNewSdk", data);
| bus.$emit("addSdk");
| console.log(data);
| },
| dragleave() {
| bus.$emit("dragleave");
| },
| },
| };
| </script>
|
| <style lang="scss" scoped>
| .SdkBox {
| position: fixed;
| top: 192px;
| right: 44px;
| width: 240px;
| height: 534px;
| background-color: #fff;
| box-shadow: 0px 2px 16px 0px rgba(0, 43, 106, 0.25);
| z-index: 2;
|
| .title {
| box-sizing: border-box;
| padding: 20px;
| height: 64px;
| border-bottom: 1px solid #e9ebee;
| font-size: 18px;
| font-weight: 700;
| }
|
| .close {
| position: absolute;
| top: 20px;
| right: 20px;
| font-size: 12px;
| color: #666;
| cursor: pointer;
| }
|
| .sdkList {
| overflow-y: auto;
| box-sizing: border-box;
| padding: 30px 10px 30px 20px;
| display: flex;
| flex-wrap: wrap;
| justify-content: space-between;
| height: 470px;
|
| img {
| margin-bottom: 10px;
| width: 60px;
| height: 60px;
|
| &:hover {
| filter: drop-shadow(0px 4px 12px rgba(0, 51, 128, 0.18));
| }
| }
| }
| }
| </style>
|
|