2023-05-01 15:58:54 +00:00
|
|
|
|
<script setup lang="ts">
|
2023-06-11 13:35:01 +00:00
|
|
|
|
import { reactive, ref } from 'vue'
|
2023-05-10 16:46:20 +00:00
|
|
|
|
import KUNGalgameTopBar from '@/components/KUNGalgameTopBar.vue'
|
|
|
|
|
import WangEditor from '@/components/WangEditor.vue'
|
2023-06-11 13:35:01 +00:00
|
|
|
|
import Tags from './components/Tags.vue'
|
|
|
|
|
import Button from './components/Button.vue'
|
2023-06-07 14:16:33 +00:00
|
|
|
|
import KUNGalgameFooter from '@/components/KUNGalgameFooter.vue'
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['tags', 'article'])
|
|
|
|
|
|
|
|
|
|
interface Topic {
|
|
|
|
|
id: ''
|
|
|
|
|
time: ''
|
|
|
|
|
authorId: ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const topicInfo = reactive({
|
|
|
|
|
title: '',
|
|
|
|
|
articleHtml: '',
|
|
|
|
|
articleText: '',
|
|
|
|
|
tags: [],
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const submit = () => {
|
|
|
|
|
// 在这里执行表单提交的逻辑,可以发送网络请求等操作
|
|
|
|
|
}
|
2023-05-01 15:58:54 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-06-07 06:15:14 +00:00
|
|
|
|
<div class="root">
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<!-- 头部 -->
|
2023-05-10 16:46:20 +00:00
|
|
|
|
<KUNGalgameTopBar />
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<!-- 内容区容器 -->
|
2023-06-11 13:35:01 +00:00
|
|
|
|
<form class="container" @submit.prevent="submit">
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<!-- 内容区容器 -->
|
2023-06-11 13:35:01 +00:00
|
|
|
|
<div class="content">
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<!-- 内容区的头部 -->
|
2023-06-11 13:35:01 +00:00
|
|
|
|
<div class="header">
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<!-- 帖子的标题 -->
|
2023-06-11 13:35:01 +00:00
|
|
|
|
<div class="title">
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<input type="text" placeholder="请输入帖子的标题(40字以内)" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 编辑器 -->
|
2023-06-11 13:35:01 +00:00
|
|
|
|
<WangEditor class="editor" @html="" />
|
2023-05-01 15:58:54 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
2023-06-11 13:35:01 +00:00
|
|
|
|
<!-- 内容区的底部 -->
|
|
|
|
|
<div class="content-footer">
|
|
|
|
|
<Tags />
|
|
|
|
|
|
|
|
|
|
<Button />
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2023-05-01 15:58:54 +00:00
|
|
|
|
<!-- 版权 -->
|
2023-06-07 15:03:41 +00:00
|
|
|
|
<KUNGalgameFooter style="margin: 0 auto" />
|
2023-06-12 15:54:06 +00:00
|
|
|
|
<span style="margin: 0 auto; color: var(--kungalgame-font-color-3)"
|
|
|
|
|
>Editor powered by wangEditor</span
|
|
|
|
|
>
|
2023-05-01 15:58:54 +00:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2023-05-25 07:55:30 +00:00
|
|
|
|
<style lang="scss" scoped>
|
2023-06-11 13:35:01 +00:00
|
|
|
|
.content {
|
2023-05-01 15:58:54 +00:00
|
|
|
|
margin: 0 auto;
|
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
2023-05-01 15:58:54 +00:00
|
|
|
|
.root {
|
|
|
|
|
height: 100vh;
|
2023-06-07 16:37:05 +00:00
|
|
|
|
min-height: 1100px;
|
2023-05-10 16:46:20 +00:00
|
|
|
|
min-width: 900px;
|
2023-05-01 15:58:54 +00:00
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 内容部分的总容器 */
|
|
|
|
|
.container {
|
2023-05-10 16:46:20 +00:00
|
|
|
|
width: 80%;
|
2023-06-07 15:03:41 +00:00
|
|
|
|
max-width: 1500px;
|
|
|
|
|
margin: 0 auto;
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 容器的阴影 */
|
2023-06-05 06:32:08 +00:00
|
|
|
|
box-shadow: var(--shadow);
|
2023-06-06 09:44:11 +00:00
|
|
|
|
background-color: var(--kungalgame-trans-white-2);
|
2023-06-05 06:32:08 +00:00
|
|
|
|
color: var(--kungalgame-font-color-3);
|
2023-06-07 15:03:41 +00:00
|
|
|
|
border: 1px solid var(--kungalgame-blue-1);
|
|
|
|
|
padding: 10px;
|
2023-05-01 15:58:54 +00:00
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 容器的顶部 */
|
2023-06-11 13:35:01 +00:00
|
|
|
|
.header {
|
2023-05-01 15:58:54 +00:00
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 帖子的发布标题 */
|
2023-06-11 13:35:01 +00:00
|
|
|
|
.title {
|
2023-06-07 15:03:41 +00:00
|
|
|
|
width: 100%;
|
2023-05-01 15:58:54 +00:00
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 帖子标题的输入框 */
|
2023-06-11 13:35:01 +00:00
|
|
|
|
.title input {
|
2023-06-05 06:32:08 +00:00
|
|
|
|
color: var(--kungalgame-font-color-2);
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 距离外轮廓的距离 */
|
|
|
|
|
padding: 7px;
|
|
|
|
|
/* 内边距盒子 */
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
width: 100%;
|
|
|
|
|
/* 标题输入字体大小 */
|
|
|
|
|
font-size: 40px;
|
2023-06-05 06:32:08 +00:00
|
|
|
|
border: 1px solid var(--kungalgame-blue-4);
|
2023-06-07 15:03:41 +00:00
|
|
|
|
background-color: var(--kungalgame-white);
|
|
|
|
|
margin-bottom: 10px;
|
2023-05-01 15:58:54 +00:00
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
2023-05-01 15:58:54 +00:00
|
|
|
|
/* 标题输入框 focus 之后的样式 */
|
2023-06-11 13:35:01 +00:00
|
|
|
|
.title input:focus {
|
2023-06-05 06:32:08 +00:00
|
|
|
|
box-shadow: 0px 0px 5px var(--kungalgame-blue-4);
|
2023-05-01 15:58:54 +00:00
|
|
|
|
}
|
2023-06-11 13:35:01 +00:00
|
|
|
|
|
|
|
|
|
.content-footer {
|
|
|
|
|
/* 距离内容区的距离 */
|
|
|
|
|
margin-top: 17px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2023-05-01 15:58:54 +00:00
|
|
|
|
</style>
|