Auto Commit

上级 a687cee0
......@@ -10,35 +10,29 @@ const state = reactive({
columns: [{
title: '文章名称',
dataIndex: 'title',
width: '20%',
fixed:true
}, {
title: '链接',
dataIndex: 'url',
sorter: true,
width: '20%',
}, {
title: '浏览量',
dataIndex: 'viewCount',
sorter: true,
width: '20%',
}, {
title: '收藏量',
dataIndex: 'collectCount',
sorter: true,
width: '20%',
}, {
title: '分数',
dataIndex: 'score',
sorter: true,
width: '20%',
}, {
title: '建议',
dataIndex: 'message',
width: '20%',
}, {
title: '发文时间',
dataIndex: 'postTime',
width: '20%',
}],
dataSource: []
})
......@@ -61,7 +55,7 @@ const getCsdnData = (uId) => {
})
}
onMounted(() => {
getCsdnData()
onSearch()
})
const onSearch = () => {
if (!state.searchValue) {
......@@ -116,7 +110,7 @@ function initFirstData() {
formatter: function (params) {
console.log('params', params)
const findItem = state.dataSource.find(item => {
return item.title == params.name
return item.postTime == params.name
})
return `<span style='color:blue'>-<span> 博客标题:${params.name} <br>
<span style='color:green'>-<span> 博客质量:${params.value} <br>
......@@ -160,7 +154,7 @@ function initFirstData() {
window.onresize = myChart.resize
myChart.on('click', function (params) {
const findItem = state.dataSource.find(item => {
return item.title == params.name
return item.postTime == params.name
})
if (params.name) {
window.open(findItem.src, '_blank')
......@@ -180,11 +174,11 @@ function initFirstData() {
</div>
<br>
<div>
<a-table :columns="state.columns" :data-source="state.dataSource" :loading="state.loading">
<a-table :scroll="{ x: 800 }" :columns="state.columns" :data-source="state.dataSource" :loading="state.loading">
</a-table>
</div>
<div>
<div id="first" style="width:100vw;height:100vh;"></div>
<div id="first" style="width:800px;max-height:900px;"></div>
</div>
</div>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册