diff --git a/open-isle-cli/src/assets/global.css b/open-isle-cli/src/assets/global.css index 50bd5d544..b00a56e24 100644 --- a/open-isle-cli/src/assets/global.css +++ b/open-isle-cli/src/assets/global.css @@ -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; } diff --git a/open-isle-cli/src/components/CommentEditor.vue b/open-isle-cli/src/components/CommentEditor.vue index 4cf2d3542..46ab085f7 100644 --- a/open-isle-cli/src/components/CommentEditor.vue +++ b/open-isle-cli/src/components/CommentEditor.vue @@ -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 } diff --git a/open-isle-cli/src/utils/vditor.js b/open-isle-cli/src/utils/vditor.js index cfa3edace..2a46a0a52 100644 --- a/open-isle-cli/src/utils/vditor.js +++ b/open-isle-cli/src/utils/vditor.js @@ -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', diff --git a/open-isle-cli/src/views/PostPageView.vue b/open-isle-cli/src/views/PostPageView.vue index 6ac524488..8a729c797 100644 --- a/open-isle-cli/src/views/PostPageView.vue +++ b/open-isle-cli/src/views/PostPageView.vue @@ -795,6 +795,7 @@ export default { display: flex; flex-direction: column; gap: 10px; + width: 100%; } .info-content-header {