diff --git a/docs/collocation/ssr.md b/docs/collocation/ssr.md index 8fe41d2a6946c47774a334679b8efa4c7aed2afe..e605223abac184e9e33abed3dc95e9732ae9717e 100644 --- a/docs/collocation/ssr.md +++ b/docs/collocation/ssr.md @@ -113,55 +113,56 @@ export default { ``` 2. 然后修改 main.js -```js -import { createSSRApp } from 'vue' -import App from './App.vue' -import createStore from './store' -export function createApp() { - const app = createSSRApp(App) - - const store = createStore() // 创建 store - app.use(store) - - return { - app, - store,// 必须返回 store - } -} + ```js + import { createSSRApp } from 'vue' + import App from './App.vue' + import createStore from './store' + export function createApp() { + const app = createSSRApp(App) + + const store = createStore() // 创建 store + app.use(store) + + return { + app, + store,// 必须返回 store + } + } -``` + ``` + 3. 在页面或组件中使用 -```html - - - -``` + ```html + + + + ``` #### 发行与部署@distribute