“c37a6805b271a99e0c16a529ccdb5987f198e8cd”上不存在“make/sun/nio/git@gitcode.net:openanolis/dragonwell8_jdk.git”

Auto Commit

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