fix: 修复跳转刷新问题
This commit is contained in:
@@ -9,14 +9,16 @@
|
||||
<el-button
|
||||
style="width: 100%; margin-bottom: 0.8rem"
|
||||
@click="loadDiscuss(true)"
|
||||
>主题首页</el-button
|
||||
>主题首页
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="isAddArticle && isArticleUser"
|
||||
@click="addArticle('00000000-0000-0000-0000-000000000000')"
|
||||
type="primary"
|
||||
style="width: 100%; margin-bottom: 0.8rem; margin-left: 0"
|
||||
>添加子文章</el-button
|
||||
>添加子文章
|
||||
</el-button
|
||||
>
|
||||
<!--目录在这里 -->
|
||||
<el-scrollbar style="min-height: 410px">
|
||||
@@ -111,14 +113,16 @@
|
||||
size="default"
|
||||
v-if="isEditTheme && isArticleUser"
|
||||
@click="updateHander(route.params.discussId)"
|
||||
>编辑</el-button
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
style="margin-left: 1rem"
|
||||
type="danger"
|
||||
v-if="isRemoveTheme && isArticleUser"
|
||||
@click="delHander(route.params.discussId)"
|
||||
>删除</el-button
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</li>
|
||||
<li>分类: <span>主题</span></li>
|
||||
@@ -146,7 +150,8 @@
|
||||
style="width: 100%; justify-content: left"
|
||||
type="primary"
|
||||
text
|
||||
>{{ `${i + 1} : ${item}` }}</el-button
|
||||
>{{ `${i + 1} : ${item}` }}
|
||||
</el-button
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -391,7 +396,14 @@ onMounted(async () => {
|
||||
await loadAuthorData();
|
||||
await loadThemeData();
|
||||
});
|
||||
|
||||
//路由发送变化,重新加载
|
||||
watch(() => route.params, async () => {
|
||||
await loadDiscuss();
|
||||
await loadArticleData();
|
||||
await loadAuthorData();
|
||||
await loadThemeData();
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => currentArticle.value,
|
||||
@@ -418,8 +430,7 @@ watch(
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.subtitle
|
||||
{
|
||||
.subtitle {
|
||||
color: #999AAA;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -427,6 +438,7 @@ watch(
|
||||
.article-box {
|
||||
width: 1500px;
|
||||
height: 100%;
|
||||
|
||||
.comment {
|
||||
min-height: 40rem;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,6 @@ const seeNumLength = ref(props.themeData.seeNum.toString().length);
|
||||
|
||||
const handleClickTheme = (id) => {
|
||||
router.push(`/article/${id}`);
|
||||
router.go(0);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user