|
@@ -2,7 +2,7 @@
|
|
|
<div class="VueDraggable">
|
|
|
<el-input @change="handleSearch" clearable size="medium" placeholder="请输入内容" suffix-icon="search" v-model="search" class="input-with-select"> </el-input>
|
|
|
<VueDraggable v-if="list.length" class="draggable" ref="el" v-model="searchList" @sort="onChange">
|
|
|
- <div class="item" v-for="(item, index) in searchList" :key="item.id" @click="handleItem(index)">
|
|
|
+ <div class="item" v-for="(item, index) in searchList" :key="item.id" @click="handleItem(item.id)">
|
|
|
<img class="itemImg" :src="item.imgUrl" alt="" />
|
|
|
<div class="text">
|
|
|
<div :title="item.imgInfo">{{ item.imgInfo }}</div>
|
|
@@ -46,7 +46,9 @@ async function onChange() {
|
|
|
await caseUpdateSort(apiList)
|
|
|
emit("changeList", apiList);
|
|
|
}
|
|
|
-function handleItem(index) {
|
|
|
+function handleItem(id) {
|
|
|
+ let index = list.value.findIndex(item => item.id === id)
|
|
|
+ console.log(index)
|
|
|
emit("handleItem", index);
|
|
|
|
|
|
}
|