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

Loading…
Cancel
Save