diff --git a/src/App.vue b/src/App.vue index 5e7f5a32e9fe8e5b1c93b92c6fb30a98b836ecd1..248b7f17f13b7d3ca3a6011832ca5de7435bfdba 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,36 +3,17 @@ import SearchGrade from './components/SearchGrade.vue' diff --git a/src/assets/main.css b/src/assets/main.css index c133f9156b43080992482c4805bb9d6ad813c187..a5c155c22982726a9ce9ad34c5908e8099da91fe 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,35 +1,6 @@ -@import "./base.css"; +/* @import "./base.css"; */ -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - - font-weight: normal; -} - -a, -.green { - text-decoration: none; - color: hsla(160, 100%, 37%, 1); - transition: 0.4s; -} - -@media (hover: hover) { - a:hover { - background-color: hsla(160, 100%, 37%, 0.2); - } -} - -@media (min-width: 1024px) { - body { - display: flex; - place-items: center; - } - - #app { - display: grid; - grid-template-columns: 1fr 1fr; - padding: 0 2rem; - } +html { + margin:0; + padding:0; } diff --git a/src/components/SearchGrade.vue b/src/components/SearchGrade.vue index 31c0450d5b0726ef6e98aa6e499a47f0912253d0..962b218c58445e82e42a33ca25b71015c1611c13 100644 --- a/src/components/SearchGrade.vue +++ b/src/components/SearchGrade.vue @@ -10,6 +10,7 @@ const state = reactive({ columns: [{ title: '文章名称', dataIndex: 'title', + width: '20%', }, { title: '链接', dataIndex: 'url', @@ -33,9 +34,11 @@ const state = reactive({ }, { title: '建议', dataIndex: 'message', + width: '20%', }, { title: '发文时间', dataIndex: 'postTime', + width: '20%', }], dataSource: [] }) @@ -47,11 +50,11 @@ const getCsdnData = (uId) => { } state.loading = true axios.post(url, data, { timeout: 100000 }).then(res => { - console.log('res', res) state.dataSource = res.data.data state.loading = false initFirstData() - }).finally(() => { + }).catch((r) => { + console.log(r) state.loading = false state.dataSource = [] initFirstData() @@ -186,27 +189,4 @@ function initFirstData() { - +