Auto Commit

上级 91d91331
......@@ -43,16 +43,16 @@ const state = reactive({
return range[0] + '-' + range[1] + '' + total + '篇博客';
},
onShowSizeChange: changePageSize, // 改变每页数量时更新显示
onChange:changePage,//点击页码事件
onChange: changePage,//点击页码事件
}
})
function changePage(page,pageSize){
state.pagination.current= page
state.pagination.pageSize= pageSize
function changePage(page, pageSize) {
state.pagination.current = page
state.pagination.pageSize = pageSize
}
function changePageSize(current,pageSize){
state.pagination.current= current
state.pagination.pageSize= pageSize
function changePageSize(current, pageSize) {
state.pagination.current = current
state.pagination.pageSize = pageSize
}
const getCsdnData = (uId) => {
......@@ -75,9 +75,7 @@ const getCsdnData = (uId) => {
initFirstData()
})
}
onMounted(() => {
// onSearch()
})
const onSearch = () => {
if (!state.searchValue) {
return window.alert('请输入用户id')
......@@ -129,7 +127,6 @@ function initFirstData() {
},
tooltip: {
formatter: function (params) {
console.log('params', params)
const findItem = state.dataSource.find(item => {
return item.postTime == params.name
})
......@@ -154,7 +151,7 @@ function initFirstData() {
position: 'center',//在上方显示
textStyle: {//数值样式
fontSize: '2px',
color: 'white'
color: 'blue'
}
},
markPoint: {
......@@ -182,12 +179,25 @@ function initFirstData() {
window.open(findItem.src, '_blank')
}
});
onMounted(() => {
const storageUid=window.localStorage.getItem('csdnUid')
if(storageUid){
state.searchValue=storageUid
onSearch()
}
})
onUnmounted(() => {
window.onresize = null
if (!state.searchValue) {
window.localStorage.removeItem('csdnUid')
}
else {
if (!state.searchValue) {
window.localStorage.setItem('csdnUid', state.searchValue)
}
}
})
function jumpUrl(url){
window.open(url, '_blank')
}
}
</script>
......@@ -200,7 +210,7 @@ function initFirstData() {
<br>
<div>
<a-table :scroll="{ x: 800, y: 600 }" :columns="state.columns" :data-source="state.dataSource"
:loading="state.loading" :pagination="state.pagination">
:loading="state.loading" :pagination="state.pagination" bordered>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'url'">
<a :href="record.url" target="_blank">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册