Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit da91b67

Browse files
committed
update loading and fix render diff bug
1 parent 4f6ab4f commit da91b67

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

‎src/entry-client.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { createApp } from "./main";
2-
const { app, store } = createApp();
2+
const { app, router,store } = createApp();
33

44
// prime the store with server-initialized state.
55
// the state is determined during SSR and inlined in the page markup.
66
if (window.__INITIAL_STATE__) {
77
store.replaceState(window.__INITIAL_STATE__);
88
}
9-
app.$mount("#app");
9+
router.onReady(() => {
10+
app.$mount("#app");
11+
});

‎src/views/Detail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default {
5353
methods: {
5454
// fetchData for client and server render
5555
fetchData() {
56-
this.isMounted&&this.$loading(true);
56+
this.$loading(true);
5757
return this.$store
5858
.dispatch("FETCH_TOPIC_DETAIL", {
5959
id: this.$route.params.id

‎src/views/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
methods: {
5353
// fetchData for client and server render
5454
fetchData() {
55-
this.isMounted&&this.$loading(true);
55+
this.$loading(true);
5656
const cookies = this.$ssrContext && this.$ssrContext.cookies;
5757
return this.$store
5858
.dispatch("FETCH_TOPICS_LIST", { cookies })

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /