From 3fe629c2098e3c61b1dd5442443761ab8980e1f4 Mon Sep 17 00:00:00 2001 From: angu_o <127409900+anguoo@users.noreply.github.com> Date: Mon, 1 Apr 2024 20:28:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=87=8D=E6=9E=84=E5=86=99=E4=BD=9C?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E6=A0=B7=E5=BC=8F=20(#165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 4 + src/views/test-posts/modify.vue | 10 - src/views/test-posts/posts.vue | 93 ++++---- src/views/test-posts/text-editor.vue | 41 ++-- src/views/test-posts/write.vue | 305 ++++++++++++++++++++++++++- 5 files changed, 372 insertions(+), 81 deletions(-) delete mode 100644 src/views/test-posts/modify.vue diff --git a/src/router/index.ts b/src/router/index.ts index 92ccca9..ce3f94a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -75,6 +75,10 @@ const routes: RouteRecordRaw[] = [ path: '/test/editor', component: () => import('../views/test-posts/text-editor.vue'), }, + { + path: '/test/write', + component: () => import('../views/test-posts/write.vue'), + } ] const router = createRouter({ diff --git a/src/views/test-posts/modify.vue b/src/views/test-posts/modify.vue deleted file mode 100644 index f52b6a1..0000000 --- a/src/views/test-posts/modify.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/test-posts/posts.vue b/src/views/test-posts/posts.vue index 7c1befe..f97b2b2 100644 --- a/src/views/test-posts/posts.vue +++ b/src/views/test-posts/posts.vue @@ -50,37 +50,37 @@
-
-
- +
+
- -
-
-
    -
  • 二级分区1
  • -
+ + +
+
+
    +
  • 二级分区1
  • +
+
-
+
- +
@@ -181,7 +181,6 @@ import { errorMsg } from "@/utils/message"; import { useStore } from "@/store"; import { post } from '@/utils/request' import { TargetType, RelationType } from '@/utils/consts' -import { t } from '@wangeditor/editor'; const store = useStore() const navSelect = ref('all') @@ -189,6 +188,7 @@ const zoneFatherId = ref('root') const noMoreUsers = ref(false) const noMorePosts = ref(false) const isShowZonePop = ref(false) +const ismouseover = ref>([]) const userRankList = ref([]) const postRankList = ref([]) const postsList = ref({ @@ -197,7 +197,7 @@ const postRankList = ref([]) const zonePopTop = ref(0) const zonePopLeft = ref(0) const zoneList = ref([]) -const pageSize = 10; // 假设每页加载10项 +const pageSize = 99999; // 假设每页加载10项 let userPage = 1; // 当前用户列表页码 let postPage = 1; // 当前帖子列表页码 @@ -208,27 +208,6 @@ onMounted(async() => { postsList.value = await getOtherPosts() }) -//移入移出分区 -const mouseoverZone = (event: MouseEvent) => { - isShowZonePop.value = true - zonePopTop.value = event.clientY - 65 - zonePopLeft.value = event.clientX - 20 -} -const mouseoutZone = (event: any) => { - const pop = document.querySelector('.zone-pop') - if (pop) { - pop.addEventListener('mouseover', () => { - isShowZonePop.value = true - }) - pop.addEventListener('mouseout', () => { - isShowZonePop.value = false - }) - } - else if (event.target.className !== 'zone-pop') { - isShowZonePop.value = false - } -} - const splitDescription = (text: string) => { if (text.length > 6) return text.slice(0, 6) + '...' return text @@ -380,10 +359,9 @@ const unfollowerUser = (user: any) => { .posts-select { max-height: 100px; - overflow-y: auto; - border-bottom: 1px solid #f0f0f0; - display: flex; - flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(auto-fill, 1fr); + grid-template-rows: repeat(auto-fill, 50px); .zone { height: 25px; @@ -432,6 +410,7 @@ const unfollowerUser = (user: any) => { } .posts-contents { + border-top: 1px solid #f0f0f0; .content { padding: 10px; border-bottom: 1px solid #f0f0f0; diff --git a/src/views/test-posts/text-editor.vue b/src/views/test-posts/text-editor.vue index 2c81dbc..b4fa5e4 100644 --- a/src/views/test-posts/text-editor.vue +++ b/src/views/test-posts/text-editor.vue @@ -1,10 +1,9 @@