From b505177647a39b49ecb4facd82cd1f1f5aeb09a8 Mon Sep 17 00:00:00 2001 From: 63f1bb74d2451104dc7d8b9f <63f1bb74d2451104dc7d8b9f@devide> Date: Thu, 29 Jun 2023 18:46:39 +0000 Subject: [PATCH] Auto Commit --- src/components/SearchGrade.vue | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/components/SearchGrade.vue b/src/components/SearchGrade.vue index 962b218..bf7ae14 100644 --- a/src/components/SearchGrade.vue +++ b/src/components/SearchGrade.vue @@ -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 `- 博客标题:${params.name}
- 博客质量:${params.value}
@@ -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() {
- +
-
+
-- GitLab