fix: 2568 【AI一键查重--自定义筛选】右侧添加筛选条件后,对其进行拖动,拖动一次后无法再次拖动

pull/1/head
lizijiee 2 years ago
parent f01d063e73
commit 53ab122715

@ -275,6 +275,12 @@ async function getfield() {
const userInfo = userStore.getUserInfo;
res = await getfieldList(3, userInfo.id)
}
function onMove(e) {
// e
if (e?.related?.className?.indexOf('fix') !== -1) {
return false;
}
}
onMounted(() => {
getfield();
@ -342,18 +348,14 @@ onMounted(() => {
</template>
</n-input>
<n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;" class="scroll">
<!-- filter=".draggable-li[draggable='false']" -->
<VueDraggable v-model="onList" class="draggable-ul" :animation="150" group="shared">
<div
v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id" :draggable="!item.fix" :class="{ fix: item.fix }"
class="cursor-move draggable-li"
>
<VueDraggable v-model="onList" filter=".fix" class="draggable-ul" :animation="150" group="shared"
:onMove="onMove">
<div v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id"
:draggable="!item.fix" :class="{ move: !item.fix, fix: item.fix }" class="cursor-move draggable-li">
<SvgIcon v-show="!item.fix" name="drag" size="24" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix" size="16px" style="display:block;margin-left: auto;cursor: pointer;"
name="clear" @click="removeHandler(item.id)"
/>
<SvgIcon v-if="!item.fix" size="16px" style="display:block;margin-left: auto;cursor: pointer;"
name="clear" @click="removeHandler(item.id)" />
</div>
</VueDraggable>
</n-scrollbar>
@ -444,6 +446,10 @@ onMounted(() => {
align-items: center;
}
.fix {
cursor: default !important;
}
.disable-check {
color: gainsboro;
}

Loading…
Cancel
Save