自使用高度 瀑布流加载
This commit is contained in:
parent
35da92f42c
commit
d35593e8e9
@ -6,6 +6,7 @@
|
|||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* >>> md*/
|
/* >>> md*/
|
||||||
@ -65,7 +66,9 @@
|
|||||||
.addbookmarkurl-input {
|
.addbookmarkurl-input {
|
||||||
width: 73%!important;
|
width: 73%!important;
|
||||||
}
|
}
|
||||||
|
.classification {
|
||||||
|
margin-left: 0px!important;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* iphone6 7 8 plus */
|
/* iphone6 7 8 plus */
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div class="filter-tbar">
|
||||||
<template >
|
<div class="filter-classification">
|
||||||
<div >
|
|
||||||
|
|
||||||
<div class="filter-tbar" >
|
|
||||||
<div class="filter-classification" >
|
|
||||||
<div class="classification " @click="showopen(0)"><span>全部</span></div>
|
<div class="classification " @click="showopen(0)"><span>全部</span></div>
|
||||||
<div class="classification" @click="showopen(1)"><span>网页</span></div>
|
<div class="classification" @click="showopen(1)"><span>网页</span></div>
|
||||||
<div class="classification" @click="showopen(2)"><span>文本</span></div>
|
<div class="classification" @click="showopen(2)"><span>文本</span></div>
|
||||||
@ -14,7 +12,7 @@
|
|||||||
<div class="filter-content">
|
<div class="filter-content">
|
||||||
<el-dropdown trigger="hover" size="small">
|
<el-dropdown trigger="hover" size="small">
|
||||||
<div class="el-dropdown-link dropdownList">
|
<div class="el-dropdown-link dropdownList">
|
||||||
<i class="el-icon-document-checked " ></i> <span>排序模式</span>
|
<i class="el-icon-document-checked "></i> <span>排序模式</span>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
|
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
|
||||||
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序(正)</el-dropdown-item>
|
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序(正)</el-dropdown-item>
|
||||||
@ -29,7 +27,7 @@
|
|||||||
<div class="filter-content">
|
<div class="filter-content">
|
||||||
<el-dropdown trigger="hover" size="small">
|
<el-dropdown trigger="hover" size="small">
|
||||||
<div class="el-dropdown-link dropdownList">
|
<div class="el-dropdown-link dropdownList">
|
||||||
<i class="el-icon-tickets " ></i> <span>卡片模式</span>
|
<i class="el-icon-tickets "></i> <span>卡片模式</span>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
|
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
|
||||||
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序(正)</el-dropdown-item>
|
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序(正)</el-dropdown-item>
|
||||||
@ -44,7 +42,7 @@
|
|||||||
<div class="filter-content">
|
<div class="filter-content">
|
||||||
<el-dropdown trigger="hover" size="small">
|
<el-dropdown trigger="hover" size="small">
|
||||||
<div class="el-dropdown-link dropdownList">
|
<div class="el-dropdown-link dropdownList">
|
||||||
<i class="el-icon-setting " ></i> <span>批量设置</span>
|
<i class="el-icon-setting "></i> <span>批量设置</span>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
|
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
|
||||||
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>编辑</el-dropdown-item>
|
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>编辑</el-dropdown-item>
|
||||||
@ -68,18 +66,25 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="bookmarklist" :style="datalist" v-loading="loading" v-if="showbookmark" v-infinite-scroll="load"
|
||||||
|
infinite-scroll-disabled="disabled" style="overflow:auto;" infinite-scroll-immediate="false">
|
||||||
<div class="bookmarklist" v-loading="loading" v-if="showbookmark" >
|
<el-row>
|
||||||
<el-row >
|
|
||||||
<hr class="bookamrk-hr"/>
|
<hr class="bookamrk-hr"/>
|
||||||
<el-col :span="24" v-for="bm in bookmarkList">
|
<el-col :span="24" v-for="bm in bookmarkList">
|
||||||
<div class="editBookamrk">
|
<div class="editBookamrk">
|
||||||
<div class="editlist">
|
<div class="editlist">
|
||||||
<div> <el-button plain size="small" @click="handleUpdate(bm.bookmarkId)">修改</el-button></div>
|
<div>
|
||||||
<div> <el-button plain size="small" @click="handleDelete(bm.bookmarkId)">删除</el-button></div>
|
<el-button plain size="small" @click="handleUpdate(bm.bookmarkId)">修改</el-button>
|
||||||
<div> <el-button plain size="small">笔记</el-button></div>
|
</div>
|
||||||
<div> <el-button plain size="small">分享</el-button></div>
|
<div>
|
||||||
|
<el-button plain size="small" @click="handleDelete(bm.bookmarkId)">删除</el-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button plain size="small">笔记</el-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button plain size="small">分享</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -92,12 +97,18 @@
|
|||||||
<div class="info-wrap">
|
<div class="info-wrap">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="bookmark-icon">
|
<div class="bookmark-icon">
|
||||||
<!-- <img :err-src='bm.icon' :ng-src="bm.icon" :src="bm.icon" />-->
|
<!-- <img :err-src='bm.icon' :ng-src="bm.icon" :src="bm.icon" />-->
|
||||||
<img :ng-src="'https://favicon.lucq.fun/?url=http://'+bm.urls" :src="'https://favicon.lucq.fun/?url=http://'+bm.urls" onerror="this.src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAAmVJREFUSMftlG1IU2EUx8+5jRHzg+5OiD64WTBBjSY5ZybUJMaMiIUICUKFIGmoIIogYWKFBmtDxN1tBKIWvlS6SR+iLFDBXqSMgmzbvQ7fkAjcINmQ5u7pQwyCiOvWx/p/fPj9/5znnPM8AP+VolRTjjHhTlmZipzEk9GYao4sVaMYxXp62NgIdpLBCuLP05mZZHOYZA3p5KgMjBcUwCmw4PfVVYiBGmbW1zMzOU4QCgtTvdAeRESEyNZyJbx+dDTjVv/9YFSjSScnfabsbPYMF+AbxsYS3F5TfwPZAacpMNfUBEAljK24mMJwlLIUClTAdfwok9FXWBTtc3Phzqv7c/RWa8KnrHZM8VltbRjC92AxGkEPRpSJInjJQPpIBJoZC6nn50M19dM5J/v6/lhRxgXXDX9Qp1POcmHh2sTEQbfbvVmrUCTbr4RPaeMe8Q0eTyI36VkrW50mftjrPWCyDn9oSUuTdj4Y/1Qpl7NdzkNC98iIqsIxHdQVFaU8eWW1U1guLy1lr3Acr3O7pXi227EhDLpcCZ8UL/kK8LIYjxtDIRhEP8xGIlI8bcAKvY3FGB/zYvf81pYUL/0PvGTKoTUvjzbgCx5ZWlJq3a5lQa1Ge3yTWnp64ASYqVcUoXn3Jtja2/EpRtHj89FF8Tb25ufDOwCo8/lSL0BF/eDPzcVXeA7WDAa6J9rES1VVdJqx41JHBwCE8BgA3JU9B+3AACziMwjv7MAaPQb/wgIAnP2rDpCWtpkncjm+Ro34bWgo3FkX0O6bnARARCT6hSR6YzazXa7DfLyigo7TNtObxNb/s/oB7V8JFvW/8IQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDItMDJUMTg6MTE6NTgrMDg6MDCoc6tpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAyLTAyVDE4OjExOjU4KzA4OjAw2S4T1QAAAGd0RVh0c3ZnOmJhc2UtdXJpAGZpbGU6Ly8vaG9tZS9hZG1pbi9pY29uLWZvbnQvdG1wL2ljb25fNWhyOG55Nmo1bWMvamluZ2RpYW5hbmxpX2tvbmd3dWppYW94aW5nX3Nob3VjYW5nLnN2Z4/vilwAAAAASUVORK5CYII='" alt="" ng-show="bm.urls">
|
<img :ng-src="'https://favicon.lucq.fun/?url=http://'+bm.urls"
|
||||||
|
:src="'https://favicon.lucq.fun/?url=http://'+bm.urls"
|
||||||
|
onerror="this.src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAAAmVJREFUSMftlG1IU2EUx8+5jRHzg+5OiD64WTBBjSY5ZybUJMaMiIUICUKFIGmoIIogYWKFBmtDxN1tBKIWvlS6SR+iLFDBXqSMgmzbvQ7fkAjcINmQ5u7pQwyCiOvWx/p/fPj9/5znnPM8AP+VolRTjjHhTlmZipzEk9GYao4sVaMYxXp62NgIdpLBCuLP05mZZHOYZA3p5KgMjBcUwCmw4PfVVYiBGmbW1zMzOU4QCgtTvdAeRESEyNZyJbx+dDTjVv/9YFSjSScnfabsbPYMF+AbxsYS3F5TfwPZAacpMNfUBEAljK24mMJwlLIUClTAdfwok9FXWBTtc3Phzqv7c/RWa8KnrHZM8VltbRjC92AxGkEPRpSJInjJQPpIBJoZC6nn50M19dM5J/v6/lhRxgXXDX9Qp1POcmHh2sTEQbfbvVmrUCTbr4RPaeMe8Q0eTyI36VkrW50mftjrPWCyDn9oSUuTdj4Y/1Qpl7NdzkNC98iIqsIxHdQVFaU8eWW1U1guLy1lr3Acr3O7pXi227EhDLpcCZ8UL/kK8LIYjxtDIRhEP8xGIlI8bcAKvY3FGB/zYvf81pYUL/0PvGTKoTUvjzbgCx5ZWlJq3a5lQa1Ge3yTWnp64ASYqVcUoXn3Jtja2/EpRtHj89FF8Tb25ufDOwCo8/lSL0BF/eDPzcVXeA7WDAa6J9rES1VVdJqx41JHBwCE8BgA3JU9B+3AACziMwjv7MAaPQb/wgIAnP2rDpCWtpkncjm+Ro34bWgo3FkX0O6bnARARCT6hSR6YzazXa7DfLyigo7TNtObxNb/s/oB7V8JFvW/8IQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDItMDJUMTg6MTE6NTgrMDg6MDCoc6tpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAyLTAyVDE4OjExOjU4KzA4OjAw2S4T1QAAAGd0RVh0c3ZnOmJhc2UtdXJpAGZpbGU6Ly8vaG9tZS9hZG1pbi9pY29uLWZvbnQvdG1wL2ljb25fNWhyOG55Nmo1bWMvamluZ2RpYW5hbmxpX2tvbmd3dWppYW94aW5nX3Nob3VjYW5nLnN2Z4/vilwAAAAASUVORK5CYII='"
|
||||||
|
alt="" ng-show="bm.urls">
|
||||||
</div>
|
</div>
|
||||||
<div class="bookmark-official">{{bm.urls}} · </div><div class="bookmark-time">{{bm.createTime|changeTime}}</div>
|
<div class="bookmark-official">{{bm.urls}} · </div>
|
||||||
|
<div class="bookmark-time">{{bm.createTime|changeTime}}</div>
|
||||||
<div class="bookmark-time" v-for="t in bm.sqTags">
|
<div class="bookmark-time" v-for="t in bm.sqTags">
|
||||||
<el-tag class="bookmark-list-tag" data-bookmarkId="t.bookmarkId" data-tagId="t.tagId}" size="mini">{{t.name}}</el-tag>
|
<el-tag class="bookmark-list-tag" data-bookmarkId="t.bookmarkId" data-tagId="t.tagId}" size="mini">
|
||||||
|
{{t.name}}
|
||||||
|
</el-tag>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -105,10 +116,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-divider class="bookmark-hr"></el-divider>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<p v-if="listloading" class="listhint"><i class="el-icon-loading"></i>加载中...</p>
|
||||||
|
<p v-if="noMore" class="listhint">没有更多了</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -117,17 +129,17 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
|
||||||
<el-form-item label="书签标题" prop="title">
|
<el-form-item label="书签标题" prop="title">
|
||||||
<el-input v-model="form.title" placeholder="请输入书签标题" />
|
<el-input v-model="form.title" placeholder="请输入书签标题"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="书签地址" prop="url">
|
<el-form-item label="书签地址" prop="url">
|
||||||
<el-input v-model="form.url" placeholder="请输入书签地址" />
|
<el-input v-model="form.url" placeholder="请输入书签地址"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="书签描述" prop="description">
|
<el-form-item label="书签描述" prop="description">
|
||||||
<el-input v-model="form.description" type="textarea" placeholder="请输入书签描述" run dev
|
<el-input v-model="form.description" type="textarea" placeholder="请输入书签描述" run dev
|
||||||
:autosize="{minRows: 3, maxRows:4}" :style="{width: '100%'}"></el-input>
|
:autosize="{minRows: 3, maxRows:4}" :style="{width: '100%'}"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属目录" prop="menuId">
|
<el-form-item label="所属目录" prop="menuId">
|
||||||
<el-input v-model="form.menuId" placeholder="请选择上级目录" />
|
<el-input v-model="form.menuId" placeholder="请选择上级目录"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
@ -162,24 +174,20 @@
|
|||||||
<el-form-item label="选择状态" prop="start">
|
<el-form-item label="选择状态" prop="start">
|
||||||
<el-radio-group v-model="form.start" size="medium">
|
<el-radio-group v-model="form.start" size="medium">
|
||||||
<el-radio v-for="(item, index) in bookmarkstatus" :key="index" :label="item.value"
|
<el-radio v-for="(item, index) in bookmarkstatus" :key="index" :label="item.value"
|
||||||
:disabled="item.disabled">{{item.name}}</el-radio>
|
:disabled="item.disabled">{{item.name}}
|
||||||
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 1.未读稍后再看 2 已读 2.續看-->
|
<!-- 1.未读稍后再看 2 已读 2.續看-->
|
||||||
<el-form-item label="选择类型" prop="type">
|
<el-form-item label="选择类型" prop="type">
|
||||||
<el-radio-group v-model="form.type" size="medium">
|
<el-radio-group v-model="form.type" size="medium">
|
||||||
<el-radio v-for="(item, index) in bookmarktype" :key="index" :label="item.value"
|
<el-radio v-for="(item, index) in bookmarktype" :key="index" :label="item.value"
|
||||||
:disabled="item.disabled">{{item.name}}</el-radio>
|
:disabled="item.disabled">{{item.name}}
|
||||||
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -188,19 +196,23 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
import { selectBymenuIdUserID,selectBydelete,selectByUseridList, getBookmark, delBookmark, addBookmark, updateBookmark, exportBookmark } from "@/api/bookmark/bookmark";
|
import {
|
||||||
import { format } from 'timeago.js';
|
selectBymenuIdUserID,
|
||||||
|
selectBydelete,
|
||||||
|
selectByUseridList,
|
||||||
|
getBookmark,
|
||||||
|
delBookmark,
|
||||||
|
addBookmark,
|
||||||
|
updateBookmark,
|
||||||
|
exportBookmark
|
||||||
|
} from "@/api/bookmark/bookmark";
|
||||||
|
import {format} from 'timeago.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -215,9 +227,10 @@
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
showbookmark:true,
|
busy: false,
|
||||||
showimg:false,
|
showbookmark: true,
|
||||||
loading:false,
|
showimg: false,
|
||||||
|
loading: false,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 15,
|
pageSize: 15,
|
||||||
@ -232,18 +245,17 @@
|
|||||||
zcount: undefined,
|
zcount: undefined,
|
||||||
idelete: undefined,
|
idelete: undefined,
|
||||||
start: undefined,
|
start: undefined,
|
||||||
sqTags:[]
|
sqTags: []
|
||||||
},
|
},
|
||||||
inputVisible: false, //标签
|
inputVisible: false, //标签
|
||||||
inputValue: '', //标签
|
inputValue: '', //标签
|
||||||
tagcount:0, //标签虚拟ID
|
tagcount: 0, //标签虚拟ID
|
||||||
bookmarkList:[],
|
bookmarkList: [],
|
||||||
urltext:'?from=yunshuqian.com',//网址域名起推广作用
|
urltext: '?from=yunshuqian.com',//网址域名起推广作用
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {},
|
||||||
},
|
|
||||||
bookmarkstatus: [{
|
bookmarkstatus: [{
|
||||||
"name": "公开",
|
"name": "公开",
|
||||||
"value": 1
|
"value": 1
|
||||||
@ -261,42 +273,67 @@
|
|||||||
"name": "待续读",
|
"name": "待续读",
|
||||||
"value": 3
|
"value": 3
|
||||||
}],
|
}],
|
||||||
|
datalist: {
|
||||||
|
height: "",
|
||||||
|
},
|
||||||
|
listloading: false,//滚动加载提示
|
||||||
|
datalistcount:500,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
//timeago.js插件
|
//timeago.js插件
|
||||||
//计算时间,类似于几分钟前,几小时前,几天前等
|
//计算时间,类似于几分钟前,几小时前,几天前等
|
||||||
changeTime(val){
|
changeTime(val) {
|
||||||
let time = new Date(val); //先将接收到的json格式的日期数据转换成可用的js对象日期
|
let time = new Date(val); //先将接收到的json格式的日期数据转换成可用的js对象日期
|
||||||
return format(time, 'zh_CN'); //转换成类似于几天前的格式
|
return format(time, 'zh_CN'); //转换成类似于几天前的格式
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
// document.querySelector("#datalist").addEventListener('scroll', this.handleScroll)
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
/**list加载完毕就禁止滚动**/
|
||||||
|
noMore() {
|
||||||
|
console.log(this.bookmarkList.length)
|
||||||
|
console.log(this.datalistcount)
|
||||||
|
// return this.bookmarkList.length >= this.datalistcount;
|
||||||
|
//TRUE 不滑动了
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
/**是否禁用滚动**/
|
||||||
|
disabled(){
|
||||||
|
return this.listloading || this.noMore
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
var that=this;
|
var that = this;
|
||||||
var routedata=that.$route.query.menuId;
|
var routedata = that.$route.query.menuId;
|
||||||
if (routedata==undefined){
|
if (routedata == undefined) {
|
||||||
that.queryParams.menuId=1;
|
that.queryParams.menuId = 1;
|
||||||
}else {
|
} else {
|
||||||
that.queryParams.menuId=routedata;
|
that.queryParams.menuId = routedata;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (routedata=='BOOKMARK'){
|
if (routedata == 'BOOKMARK') {
|
||||||
//全部书签
|
//全部书签
|
||||||
this.getBookmarkList();
|
this.getBookmarkList();
|
||||||
|
|
||||||
}else if(routedata=='RECYCLE'){
|
} else if (routedata == 'RECYCLE') {
|
||||||
//回收站
|
//回收站
|
||||||
this.getrecycleList();
|
this.getrecycleList();
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
//根据menuId查询
|
//根据menuId查询
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//自动获取高度
|
||||||
|
window.addEventListener('resize', this.getHeight);
|
||||||
|
this.getHeight()
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
//初始化
|
|
||||||
this.newBookmark();
|
this.newBookmark();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -306,6 +343,22 @@
|
|||||||
document.getElementsByClassName("classification")[0].classList.add("classification-click");
|
document.getElementsByClassName("classification")[0].classList.add("classification-click");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**自动获取高度**/
|
||||||
|
getHeight() {
|
||||||
|
// if (window.innerHeight<=750) {
|
||||||
|
// this.asideHeight.height=='750px';
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
this.datalist.height = (window.innerHeight - (window.innerHeight / 7.5)) + 'px';
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**滚动监控**/
|
||||||
|
load() {
|
||||||
|
this.listloading = true
|
||||||
|
this.bookmarkList = this.bookmarkList.concat(this.bookmarkList, this.bookmarkList);
|
||||||
|
this.listloading = false
|
||||||
|
},
|
||||||
|
|
||||||
/**切换显示 全部 网页 文本 其他**/
|
/**切换显示 全部 网页 文本 其他**/
|
||||||
showopen(e) {
|
showopen(e) {
|
||||||
@ -328,11 +381,11 @@
|
|||||||
var index = this.form.sqTags.indexOf(tina[0]);
|
var index = this.form.sqTags.indexOf(tina[0]);
|
||||||
//3. 如果存在则将其删除,index > -1 代表存在
|
//3. 如果存在则将其删除,index > -1 代表存在
|
||||||
// index > -1 && this.form.sqTags.splice(index, 1);
|
// index > -1 && this.form.sqTags.splice(index, 1);
|
||||||
if (index > -1){
|
if (index > -1) {
|
||||||
if (this.form.sqTags[index].tagId<0){
|
if (this.form.sqTags[index].tagId < 0) {
|
||||||
this.form.sqTags.splice(index, 1);
|
this.form.sqTags.splice(index, 1);
|
||||||
}
|
}
|
||||||
this.form.sqTags[index].name="TAGDELETE";
|
this.form.sqTags[index].name = "TAGDELETE";
|
||||||
}
|
}
|
||||||
console.log(this.form.sqTags);
|
console.log(this.form.sqTags);
|
||||||
},
|
},
|
||||||
@ -346,9 +399,9 @@
|
|||||||
handleInputConfirm() {
|
handleInputConfirm() {
|
||||||
let inputValue = this.inputValue;
|
let inputValue = this.inputValue;
|
||||||
if (inputValue) {
|
if (inputValue) {
|
||||||
this.tagcount=this.tagcount-1;
|
this.tagcount = this.tagcount - 1;
|
||||||
//添加
|
//添加
|
||||||
var updatetag ={name: inputValue, bookmarkId: this.form.bookmarkId,tagId:this.tagcount};
|
var updatetag = {name: inputValue, bookmarkId: this.form.bookmarkId, tagId: this.tagcount};
|
||||||
|
|
||||||
this.form.sqTags.push(updatetag);
|
this.form.sqTags.push(updatetag);
|
||||||
}
|
}
|
||||||
@ -377,7 +430,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 修改和新增 */
|
/** 提交按钮 修改和新增 */
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.bookmarkId != undefined) {
|
if (this.form.bookmarkId != undefined) {
|
||||||
@ -407,12 +460,13 @@
|
|||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(function() {
|
}).then(function () {
|
||||||
return delBookmark(bookmarkIds);
|
return delBookmark(bookmarkIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
}).catch(function() {});
|
}).catch(function () {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -442,11 +496,11 @@
|
|||||||
getrecycleList() {
|
getrecycleList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
selectBydelete(this.queryParams).then(response => {
|
selectBydelete(this.queryParams).then(response => {
|
||||||
if (response.total!=0&&response.code==200){
|
if (response.total != 0 && response.code == 200) {
|
||||||
this.bookmarkList = response.rows;
|
this.bookmarkList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}else {
|
} else {
|
||||||
this.showbookmark = false;
|
this.showbookmark = false;
|
||||||
this.showimg = true;
|
this.showimg = true;
|
||||||
}
|
}
|
||||||
@ -456,11 +510,11 @@
|
|||||||
getBookmarkList() {
|
getBookmarkList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
selectByUseridList(this.queryParams).then(response => {
|
selectByUseridList(this.queryParams).then(response => {
|
||||||
if (response.total!=0&&response.code==200){
|
if (response.total != 0 && response.code == 200) {
|
||||||
this.bookmarkList = response.rows;
|
this.bookmarkList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}else {
|
} else {
|
||||||
this.showbookmark = false;
|
this.showbookmark = false;
|
||||||
this.showimg = true;
|
this.showimg = true;
|
||||||
}
|
}
|
||||||
@ -472,22 +526,21 @@
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
selectBymenuIdUserID(this.queryParams).then(response => {
|
selectBymenuIdUserID(this.queryParams).then(response => {
|
||||||
if (response.total!=0&&response.code==200){
|
if (response.total != 0 && response.code == 200) {
|
||||||
this.bookmarkList = response.rows;
|
this.bookmarkList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}else {
|
} else {
|
||||||
this.showbookmark = false;
|
this.showbookmark = false;
|
||||||
this.showimg = true;
|
this.showimg = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
windowurl(url,bookmarkId){
|
windowurl(url, bookmarkId) {
|
||||||
// window.open(url+this.urltext);
|
// window.open(url+this.urltext);
|
||||||
window.open(url);
|
window.open(url);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -496,14 +549,14 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
|
||||||
/**编辑标签 开始**/
|
/**编辑标签 开始**/
|
||||||
.el-tag + .el-tag {
|
.el-tag + .el-tag {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-new-tag {
|
.button-new-tag {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
@ -511,21 +564,17 @@
|
|||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-new-tag {
|
.input-new-tag {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**编辑标签 结束**/
|
/**编辑标签 结束**/
|
||||||
|
|
||||||
|
|
||||||
|
.filler-tag span {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.filler-tag span{
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
@ -533,46 +582,51 @@
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filler-tag span:hover{
|
.filler-tag span:hover {
|
||||||
background-color: #E8F3FC;
|
background-color: #E8F3FC;
|
||||||
color: #1988E0;
|
color: #1988E0;
|
||||||
}
|
}
|
||||||
.bookamrk-hr{
|
|
||||||
|
.bookamrk-hr {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.filter-sort-dropdown{
|
.filter-sort-dropdown {
|
||||||
box-shadow: 0 2px 15px 0 rgba(0,0,0,.2)!important;
|
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .2) !important;
|
||||||
font-weight: 600!important;
|
font-weight: 600 !important;
|
||||||
}
|
}
|
||||||
.filter-sort-dropdown div{
|
|
||||||
display: none!important;
|
.filter-sort-dropdown div {
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
.nullbookmark{
|
|
||||||
|
.nullbookmark {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
margin-top: 10%;
|
margin-top: 10%;
|
||||||
}
|
}
|
||||||
.nullbookmark-img{
|
|
||||||
|
.nullbookmark-img {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width:250px;
|
width: 250px;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
background-image: url("https://s1.ax1x.com/2020/08/22/dawFp9.png") ;
|
background-image: url("https://s1.ax1x.com/2020/08/22/dawFp9.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nullbookmark-text{
|
.nullbookmark-text {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width:250px;
|
width: 250px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #D4D4D4!important;
|
color: #D4D4D4 !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
.editBookamrk{
|
|
||||||
|
.editBookamrk {
|
||||||
width: 270px;
|
width: 270px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -580,25 +634,28 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.editlist{
|
|
||||||
|
.editlist {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
flex-flow: wrap;
|
flex-flow: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.editlist div{
|
|
||||||
margin-left:10px;
|
.editlist div {
|
||||||
|
margin-left: 10px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.bookmarktag{
|
|
||||||
|
.bookmarktag {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-tbar{
|
.filter-tbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -617,33 +674,36 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.setUpThe{
|
|
||||||
|
.setUpThe {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.filter-content{
|
|
||||||
|
.filter-content {
|
||||||
margin-left: 18px;
|
margin-left: 18px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdownList{
|
.dropdownList {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
.dropdownList i{
|
|
||||||
margin-right: 4px;
|
.dropdownList i {
|
||||||
|
margin-right: 4px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.dropdownList span{
|
|
||||||
|
.dropdownList span {
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.classification {
|
||||||
.classification{
|
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 27px;
|
height: 27px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
@ -651,7 +711,8 @@ margin-right: 4px;
|
|||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
color: #a4a4a4;
|
color: #a4a4a4;
|
||||||
}
|
}
|
||||||
.classification-click{
|
|
||||||
|
.classification-click {
|
||||||
border-radius: 19px;
|
border-radius: 19px;
|
||||||
background: #606c88; /* fallback for old browsers */
|
background: #606c88; /* fallback for old browsers */
|
||||||
background: -webkit-linear-gradient(to right, #3f4c6b, #606c88); /* Chrome 10-25, Safari 5.1-6 */
|
background: -webkit-linear-gradient(to right, #3f4c6b, #606c88); /* Chrome 10-25, Safari 5.1-6 */
|
||||||
@ -659,10 +720,18 @@ margin-right: 4px;
|
|||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.4)
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.4)
|
||||||
}
|
}
|
||||||
.bookmark-list-tag{
|
|
||||||
|
.bookmark-list-tag {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
color: #5094d5;
|
color: #5094d5;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.listhint {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
background: #dcdfe682;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user