初代测试版本
This commit is contained in:
@@ -61,9 +61,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="pin_block">
|
||||
<div v-if="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="pin_block">
|
||||
<a-checkbox v-model:checked="item.pin">PIN</a-checkbox>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="total > imgList.length" class="material_content_list_loding" v-observe>
|
||||
<img src="@/assets/images/homePage/loading.gif" alt="">
|
||||
@@ -131,25 +131,25 @@ export default defineComponent({
|
||||
directives:{
|
||||
observe:{
|
||||
mounted (el,binding) {
|
||||
el.addEventListener('click',()=>{
|
||||
|
||||
// console.log(binding.instance);
|
||||
const ob = new IntersectionObserver(callback,{
|
||||
root:null,
|
||||
threshold:[0.1]
|
||||
})
|
||||
ob.observe(el)
|
||||
// this.currentPage = 1
|
||||
// this.pageSize = 12
|
||||
let this_:any = binding.instance
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
this_.getLibraryList()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// updated (el,model){
|
||||
// if(model.value){
|
||||
// el.style.display="block"
|
||||
// setTimeout(() => {
|
||||
// el.classList.add("active")
|
||||
// }, 100);
|
||||
// }else{
|
||||
// el.classList.remove("active")
|
||||
// setTimeout(() => {
|
||||
// el.style.display="none"
|
||||
// }, 100);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
getSketchLabel(value:any) {
|
||||
@@ -178,26 +178,26 @@ export default defineComponent({
|
||||
this.workspaceCom = computed(()=>{
|
||||
return this.store?.state?.Workspace?.workspace
|
||||
})
|
||||
let loding = document.getElementsByClassName("material_content_list_loding")[0]
|
||||
let bodyLoding = document.getElementsByClassName("material_content_body")[0]
|
||||
const ob = new IntersectionObserver(callback,{
|
||||
root:null,
|
||||
threshold:[0.1]
|
||||
})
|
||||
ob.observe(loding)
|
||||
console.log(loding);
|
||||
// this.currentPage = 1
|
||||
// this.pageSize = 12
|
||||
// let this_ = this
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
console.log(111);
|
||||
// this_.getLibraryList()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
// let loding = document.getElementsByClassName("material_content_list_loding")[0]
|
||||
// let bodyLoding = document.getElementsByClassName("material_content_body")[0]
|
||||
// const ob = new IntersectionObserver(callback,{
|
||||
// root:null,
|
||||
// threshold:[0.1]
|
||||
// })
|
||||
// ob.observe(loding)
|
||||
// console.log(loding);
|
||||
// // this.currentPage = 1
|
||||
// // this.pageSize = 12
|
||||
// // let this_ = this
|
||||
// function callback(entries:any, observer:any) {
|
||||
// entries.forEach((entry:any) => {
|
||||
// if (entry.isIntersecting) {
|
||||
// console.log(111);
|
||||
// // this_.getLibraryList()
|
||||
// } else {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
},
|
||||
watch:{
|
||||
workspaceCom(newVal,oldVal){
|
||||
@@ -303,9 +303,11 @@ export default defineComponent({
|
||||
|
||||
//选择所有的图片
|
||||
getLibraryList(){
|
||||
let workspace = this.store.state.Workspace.workspace
|
||||
let data = {
|
||||
level1Type:this.selectCode,
|
||||
// level2Type:this.designType,
|
||||
modelSex:workspace?.sex,
|
||||
page:this.currentPage,
|
||||
pictureName:this.searchPictureName,
|
||||
size:this.pageSize+this.imgList.length,
|
||||
|
||||
Reference in New Issue
Block a user