From 7db27799c0f7bec50a1235fee0f7af384c820698 Mon Sep 17 00:00:00 2001 From: satori Date: Tue, 8 Feb 2022 03:37:22 +0800 Subject: [PATCH] =?UTF-8?q?like=20=E4=B8=8E=20admin=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/sass/main.sass | 5 +++++ components/Drawer.vue | 18 ++++++++++++---- components/PostList.vue | 45 +++++++++++++++++++++++++++++++++++++-- components/ThreadList.vue | 1 + layouts/default.vue | 1 + pages/thread.vue | 3 ++- pages/thread/_id.vue | 5 ++++- pages/thread/create.vue | 13 +++++------ pages/thread/index.vue | 3 +++ 9 files changed, 80 insertions(+), 14 deletions(-) create mode 100644 pages/thread/index.vue diff --git a/assets/sass/main.sass b/assets/sass/main.sass index 3c6e40c..6b06e2b 100644 --- a/assets/sass/main.sass +++ b/assets/sass/main.sass @@ -31,6 +31,11 @@ max-width: 1200px margin-left: auto margin-right: auto + //@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min--moz-device-pixel-ratio: 1.5) + // background: #ff1414 + // padding: 2rem + // margin: 4rem + // 汇聚 converge // 控制台 diff --git a/components/Drawer.vue b/components/Drawer.vue index 88dd812..4587e60 100644 --- a/components/Drawer.vue +++ b/components/Drawer.vue @@ -10,7 +10,8 @@ :class="{ show: show, hidden: !show }", @click.stop ) - slot + .containerbox + slot diff --git a/components/ThreadList.vue b/components/ThreadList.vue index 522408b..a394c95 100644 --- a/components/ThreadList.vue +++ b/components/ThreadList.vue @@ -38,6 +38,7 @@ background: rgba(0, 0, 0, .05) border-radius: 50% overflow: hidden + margin-right: .5rem .content flex: 1 .title diff --git a/layouts/default.vue b/layouts/default.vue index 1016a4e..5a89ec2 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -53,6 +53,7 @@ export default { "padding:4px;border:1px solid #e9546b;" ); this.$store.dispatch("account/profile"); + console.log(window.devicePixelRatio); }, }; diff --git a/pages/thread.vue b/pages/thread.vue index 62ef497..02e2bb0 100644 --- a/pages/thread.vue +++ b/pages/thread.vue @@ -1,3 +1,4 @@ diff --git a/pages/thread/_id.vue b/pages/thread/_id.vue index 5bc9b58..98345f3 100644 --- a/pages/thread/_id.vue +++ b/pages/thread/_id.vue @@ -68,7 +68,10 @@ export default { createpost() { console.log(this.post); this.$axios.post("/api/post", this.post).then((res) => { - console.log(res.data); + if (res.status === 200) { + this.postlist.push(res.data); + this.post.data = ""; + } }); }, }, diff --git a/pages/thread/create.vue b/pages/thread/create.vue index 4b7bdd8..77e7d74 100644 --- a/pages/thread/create.vue +++ b/pages/thread/create.vue @@ -9,12 +9,10 @@ .tags span.tag test span.tag demo - .content.main-width - p {{ thread.data }} - .content.main-width - input.title(v-model="thread.title") - textarea.data(v-model="thread.data", rows="32") - button.submit(@click="submit") 发表 + .content.circumscription + input.title(v-model="thread.title") + textarea.data(v-model="thread.data", rows="32") + button.submit(@click="submit") 发表