mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 14:40:49 +08:00
feat: 评论区支持高度调整
This commit is contained in:
@@ -57,7 +57,9 @@ body {
|
||||
/*************************
|
||||
* Vditor 自定义皮肤覆写
|
||||
*************************/
|
||||
|
||||
.vditor {
|
||||
min-height: 200px;
|
||||
}
|
||||
/* .vditor {
|
||||
--textarea-background-color: transparent;
|
||||
border: none !important;
|
||||
@@ -200,6 +202,10 @@ body {
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.vditor {
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
.vditor-toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import {
|
||||
getPreviewTheme as getPreviewThemeUtil
|
||||
} from '../utils/vditor'
|
||||
import LoginOverlay from './LoginOverlay.vue'
|
||||
import { isMobile } from '../utils/screen'
|
||||
|
||||
export default {
|
||||
name: 'CommentEditor',
|
||||
@@ -74,7 +73,6 @@ export default {
|
||||
onMounted(() => {
|
||||
vditorInstance.value = createVditor(props.editorId, {
|
||||
placeholder: '说点什么...',
|
||||
height: isMobile.value ? 'auto' : 200,
|
||||
preview: {
|
||||
actions: [],
|
||||
markdown: { toc: false }
|
||||
|
||||
@@ -14,7 +14,6 @@ export function getPreviewTheme() {
|
||||
export function createVditor(editorId, options = {}) {
|
||||
const {
|
||||
placeholder = '',
|
||||
height,
|
||||
preview = {},
|
||||
input,
|
||||
after
|
||||
@@ -22,7 +21,7 @@ export function createVditor(editorId, options = {}) {
|
||||
|
||||
return new Vditor(editorId, {
|
||||
placeholder,
|
||||
height,
|
||||
height: 'auto',
|
||||
theme: getEditorTheme(),
|
||||
preview: Object.assign({ theme: { current: getPreviewTheme() } }, preview),
|
||||
cdn: 'https://openisle-1307107697.cos.ap-guangzhou.myqcloud.com/assert/vditor',
|
||||
|
||||
@@ -795,6 +795,7 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.info-content-header {
|
||||
|
||||
Reference in New Issue
Block a user