@@ -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 @@
@@ -17,7 +16,14 @@ import Vditor from 'vditor'
import "vditor/dist/index.css"
import { onMounted, ref } from 'vue';
-const vditor = ref({})
+const props = defineProps<{
+ sendOperateType: string
+}>()
+const vditor = ref()
+const title = ref('')
+const operateType = ref('')
+const emit = defineEmits(['sendEditorContents'])
+
onMounted(() => {
vditor.value = new Vditor('vditor', {
placeholder: '输入...',
@@ -81,7 +87,18 @@ onMounted(() => {
}
],
})
+ if (props.sendOperateType !== '') {
+ operateType.value = props.sendOperateType
+ }
})
+
+const sendEditorMsg = () => {
+ const text = vditor.value.getValue()
+ emit('sendEditorContents', {
+ title: title.value,
+ text
+ })
+}
\ No newline at end of file