|
|
|
@ -333,7 +333,20 @@ function queryData(value, type) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function zhidingfun(item){
|
|
|
|
|
let obj = item;
|
|
|
|
|
let newarr= onShowList.value
|
|
|
|
|
// 先检查并移除对象是否已经存在于数组中
|
|
|
|
|
let index = newarr.indexOf(obj);
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
newarr.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 使用 unshift 方法将对象放到数组的第一位
|
|
|
|
|
newarr.unshift(obj);
|
|
|
|
|
onShowList.value=newarr
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const moreThanSix = computed(() => {
|
|
|
|
|
return selectIds.value.length >= 6
|
|
|
|
|
})
|
|
|
|
@ -432,7 +445,6 @@ const moreThanSix = computed(() => {
|
|
|
|
|
:class="{ fix: item.fix }"
|
|
|
|
|
class="cursor-move draggable-item"
|
|
|
|
|
>
|
|
|
|
|
<SvgIcon name="drag" size="14" />
|
|
|
|
|
<span class="ml-2">{{ item.name }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -453,6 +465,20 @@ const moreThanSix = computed(() => {
|
|
|
|
|
>
|
|
|
|
|
<SvgIcon name="drag" size="14" />
|
|
|
|
|
<span class="ml-2">{{ item.name }}</span>
|
|
|
|
|
<div class="zhiding">
|
|
|
|
|
<n-popover trigger="hover" placement="bottom">
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<SvgIcon
|
|
|
|
|
v-if="!item.fix"
|
|
|
|
|
size="16px"
|
|
|
|
|
style="display: block; cursor: pointer;margin-left:10px"
|
|
|
|
|
name="topbt"
|
|
|
|
|
@click="zhidingfun(item)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<span>置顶</span>
|
|
|
|
|
</n-popover>
|
|
|
|
|
</div>
|
|
|
|
|
<SvgIcon
|
|
|
|
|
v-if="!item.fix"
|
|
|
|
|
size="16"
|
|
|
|
@ -589,7 +615,13 @@ const moreThanSix = computed(() => {
|
|
|
|
|
color: gainsboro;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zhiding{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.draggable-item:hover {
|
|
|
|
|
.zhiding{
|
|
|
|
|
display: block;
|
|
|
|
|
}}
|
|
|
|
|
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) {
|
|
|
|
|
border: 0px;
|
|
|
|
|
}
|
|
|
|
|