mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-24 05:26:16 +00:00
feat: post ui
This commit is contained in:
@@ -28,7 +28,7 @@ export default {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
vditorInstance.value = new Vditor(props.editorId, {
|
vditorInstance.value = new Vditor(props.editorId, {
|
||||||
placeholder: '请输入正文...',
|
placeholder: '请输入正文...',
|
||||||
height: 400,
|
height: 500,
|
||||||
theme: 'classic',
|
theme: 'classic',
|
||||||
preview: {
|
preview: {
|
||||||
theme: { current: 'light' },
|
theme: { current: 'light' },
|
||||||
@@ -71,7 +71,9 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.post-editor-container {
|
.post-editor-container {
|
||||||
border: 1px solid #e2e2e2;
|
border-right: 1px solid #e2e2e2;
|
||||||
|
border-top: 1px solid #e2e2e2;
|
||||||
|
border-bottom: 1px solid #e2e2e2;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<div class="new-post-page">
|
<div class="new-post-page">
|
||||||
<div class="new-post-form">
|
<div class="new-post-form">
|
||||||
<input class="post-title-input" v-model="title" placeholder="标题" />
|
<input class="post-title-input" v-model="title" placeholder="标题" />
|
||||||
<PostEditor v-model="content" />
|
<div class="post-editor-container">
|
||||||
|
<PostEditor v-model="content" />
|
||||||
|
</div>
|
||||||
<div class="post-submit" @click="submitPost">发布</div>
|
<div class="post-submit" @click="submitPost">发布</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,24 +34,25 @@ export default {
|
|||||||
.new-post-page {
|
.new-post-page {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-post-form {
|
.new-post-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 800px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-title-input {
|
.post-title-input {
|
||||||
width: calc(100% - 20px);
|
|
||||||
padding: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
border: 1px solid #ccc;
|
border: none;
|
||||||
border-radius: 10px;
|
outline: none;
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
font-size: 42px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-submit {
|
.post-submit {
|
||||||
|
margin-left: 20px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user