mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-08 03:37:28 +08:00
Merge branch 'main' of github.com:nagisa77/OpenIsle
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted, watch } from 'vue'
|
||||||
import Vditor from 'vditor'
|
import Vditor from 'vditor'
|
||||||
import 'vditor/dist/index.css'
|
import 'vditor/dist/index.css'
|
||||||
|
|
||||||
@@ -25,6 +25,15 @@ export default {
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const vditorInstance = ref(null)
|
const vditorInstance = ref(null)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.modelValue,
|
||||||
|
val => {
|
||||||
|
if (vditorInstance.value && vditorInstance.value.getValue() !== val) {
|
||||||
|
vditorInstance.value.setValue(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
vditorInstance.value = new Vditor(props.editorId, {
|
vditorInstance.value = new Vditor(props.editorId, {
|
||||||
placeholder: '请输入正文...',
|
placeholder: '请输入正文...',
|
||||||
|
|||||||
@@ -197,6 +197,12 @@ L 站的愿景是成为新的**理想型社区**,让每一个一身疲惫的
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
/* width variables shared between header and article rows */
|
||||||
|
--main-width: 60%;
|
||||||
|
--avatars-width: 150px;
|
||||||
|
--comments-width: 80px;
|
||||||
|
--views-width: 80px;
|
||||||
|
--activity-width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
@@ -273,19 +279,17 @@ L 站的愿景是成为新的**理想型社区**,让每一个一身疲惫的
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header-container {
|
.header-container {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-direction: row;
|
grid-template-columns: var(--main-width) var(--avatars-width) var(--comments-width) var(--views-width) var(--activity-width);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-item {
|
.article-item {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-direction: row;
|
grid-template-columns: var(--main-width) var(--avatars-width) var(--comments-width) var(--views-width) var(--activity-width);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
|
||||||
border-bottom: 1px solid lightgray;
|
border-bottom: 1px solid lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,14 +298,25 @@ L 站的愿景是成为新的**理想型社区**,让每一个一身疲惫的
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header-item.main {
|
.header-item.main {
|
||||||
width: 60%;
|
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-item.main,
|
||||||
|
.article-main-container,
|
||||||
|
.header-item.avatars,
|
||||||
|
.article-member-avatars-container,
|
||||||
|
.header-item.comments,
|
||||||
|
.article-comments,
|
||||||
|
.header-item.views,
|
||||||
|
.article-views,
|
||||||
|
.header-item.activity,
|
||||||
|
.article-time {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.article-main-container {
|
.article-main-container {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
width: 60%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-item-title {
|
.article-item-title {
|
||||||
|
|||||||
@@ -61,7 +61,9 @@ export default {
|
|||||||
|
|
||||||
toast.success('草稿已加载')
|
toast.success('草稿已加载')
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(loadDraft)
|
onMounted(loadDraft)
|
||||||
|
|||||||
Reference in New Issue
Block a user