From: shellingfordly <39196952+shellingfordly@users.noreply.github.com> Date: Wed, 22 Jun 2022 07:53:56 +0000 (+0800) Subject: docs: fix code block highlights (#1387) X-Git-Tag: @pinia/nuxt@0.2.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6125f6c5da0a1d6a60a8cd6dada1c2352a8c97ad;p=thirdparty%2Fvuejs%2Fpinia.git docs: fix code block highlights (#1387) Co-authored-by: liuyao --- diff --git a/packages/docs/getting-started.md b/packages/docs/getting-started.md index bf624fa1..196ba90f 100644 --- a/packages/docs/getting-started.md +++ b/packages/docs/getting-started.md @@ -16,7 +16,7 @@ If you are using the Vue CLI, you can instead give this [**unofficial plugin**]( Create a pinia instance (the root store) and pass it to the app as a plugin: -```js{2,5-6,8} +```js {2,5-6,8} import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' @@ -30,7 +30,7 @@ app.mount('#app') If you are using Vue 2, you also need to install a plugin and inject the created `pinia` at the root of the app: -```js{1,3-4,12} +```js {1,3-4,12} import { createPinia, PiniaVuePlugin } from 'pinia' Vue.use(PiniaVuePlugin) diff --git a/packages/docs/introduction.md b/packages/docs/introduction.md index 94fb0d4b..3dccd209 100644 --- a/packages/docs/introduction.md +++ b/packages/docs/introduction.md @@ -77,7 +77,7 @@ export const useCounterStore = defineStore('counter', () => { If you are still not into `setup()` and Composition API, don't worry, Pinia also support a similar set of [_map helpers_ like Vuex](https://vuex.vuejs.org/guide/state.html#the-mapstate-helper). You define stores the same way but then use `mapStores()`, `mapState()`, or `mapActions()`: -```js{22,24,28} +```js {22,24,28} const useCounterStore = defineStore('counter', { state: () => ({ count: 0 }), getters: {