feat: add new post page mobile

This commit is contained in:
Tim
2025-07-21 17:48:43 +08:00
parent 50a6db2da1
commit 9e729f1166
4 changed files with 41 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ import Vditor from 'vditor'
import { themeState } from '../utils/theme'
import 'vditor/dist/index.css'
import LoginOverlay from './LoginOverlay.vue'
import { isMobile } from '../utils/screen'
export default {
name: 'CommentEditor',
@@ -72,7 +73,7 @@ export default {
onMounted(() => {
vditorInstance.value = new Vditor(props.editorId, {
placeholder: '说点什么...',
height: 200,
height: isMobile.value ? 'auto' : 200,
theme: getEditorTheme(),
preview: {
actions: [],
@@ -175,4 +176,10 @@ export default {
.comment-submit:hover {
background-color: var(--primary-color-hover);
}
@media (max-width: 768px) {
.comment-editor-container {
margin-bottom: 10px;
}
}
</style>

View File

@@ -93,7 +93,7 @@ export default {
name: 'BaseDropdown',
props: {
modelValue: { type: [Array, String, Number], default: () => [] },
placeholder: { type: String, default: '请选择' },
placeholder: { type: String, default: '返回' },
multiple: { type: Boolean, default: false },
fetchOptions: { type: Function, required: true },
remote: { type: Boolean, default: false },