diff --git a/index.html b/index.html index faecc24e41070093abdbe5c7f053ae89750ab66c..34993e9a92e3f8f4e3a947a0ceeec800a1e7d91b 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - csdn 用户查分 + csdn 用户快捷查分该文章
diff --git a/src/components/SearchGrade.vue b/src/components/SearchGrade.vue index ef3c1c5711054494ae08de65acc8207a816e2bfb..34e4fd278e0be391ff27e2ed4723e475e8a8e6a4 100644 --- a/src/components/SearchGrade.vue +++ b/src/components/SearchGrade.vue @@ -184,17 +184,17 @@ function initFirstData() { }); onMounted(() => { - // const storageUid = window.localStorage.getItem('csdnUid') - // console.log('window.localStorage', window.localStorage) - // console.log('storageUid', storageUid) - // if (storageUid) { - // state.searchValue = storageUid - // onSearch() - // } - // storage - if (state.dataSource) { - initFirstData(); + const storageUid = localStorage.getItem('csdnUid') + console.log('window.localStorage', localStorage) + console.log('storageUid', storageUid) + if (storageUid) { + state.searchValue = storageUid + onSearch() } + // storage + // if (state.dataSource) { + // initFirstData(); + // } }) onUnmounted(() => { @@ -220,7 +220,7 @@ function initFirstData() { + diff --git a/src/components/const.js b/src/components/const.js index cc0cb428209677a11ba2ec20fab5f00a61bc5c4a..9c2aec92e9c03bbd521fa8e0d120d120bd4ac680 100644 --- a/src/components/const.js +++ b/src/components/const.js @@ -31,4 +31,8 @@ export const tableColumns= [{ }, { title: '发文时间', dataIndex: 'postTime', + sorter: (a, b) => new Date(a.postTime) - new Date(b.postTime), + }, { + title: '操作', + key: 'option', }] \ No newline at end of file