From 9f8e5b1008b0f63aec6585eedb078728982f4ed3 Mon Sep 17 00:00:00 2001 From: Michel EDIGHOFFER Date: Sun, 31 Dec 2023 10:43:23 +0100 Subject: [PATCH 1/2] fix: add missing anchors on new titles (#2638) --- src/api/compile-time-flags.md | 16 ++++++++-------- src/api/sfc-script-setup.md | 2 +- src/guide/components/v-model.md | 4 ++-- src/guide/typescript/overview.md | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/api/compile-time-flags.md b/src/api/compile-time-flags.md index d240e9db..046f3b9f 100644 --- a/src/api/compile-time-flags.md +++ b/src/api/compile-time-flags.md @@ -14,27 +14,27 @@ Vue will work even if these flags are not explicitly configured. However, it is See [Configuration Guides](#configuration-guides) on how to configure them depending on your build tool. -## `__VUE_OPTIONS_API__` +## `__VUE_OPTIONS_API__` {#VUE_OPTIONS_API} - **Default:** `true` Enable / disable Options API support. Disabling this will result in smaller bundles, but may affect compatibility with 3rd party libraries if they rely on Options API. -## `__VUE_PROD_DEVTOOLS__` +## `__VUE_PROD_DEVTOOLS__` {#VUE_PROD_DEVTOOLS} - **Default:** `false` Enable / disable devtools support in production builds. This will result in more code included in the bundle, so it is recommended to only enable this for debugging purposes. -## `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` +## `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` {#VUE_PROD_HYDRATATION_MISMATCH_DETAILS} - **Default:** `false` Enable/disable detailed warnings for hydration mismatches in production builds. This will result in more code included in the bundle, so it is recommended to only enable this for debugging purposes. -## Configuration Guides +## Configuration Guides {#configuration-guides} -### Vite +### Vite {#vite} `@vitejs/plugin-vue` automatically provides default values for these flags. To change the default values, use Vite's [`define` config option](https://vitejs.dev/config/shared-options.html#define): @@ -50,7 +50,7 @@ export default defineConfig({ }) ``` -### vue-cli +### vue-cli {#vue-cli} `@vue/cli-service` automatically provides default values for some of these flags. To configure /change the values: @@ -70,7 +70,7 @@ module.exports = { } ``` -### webpack +### webpack {#webpack} Flags should be defined using webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/): @@ -88,7 +88,7 @@ module.exports = { } ``` -### Rollup +### Rollup {#rollup} Flags should be defined using [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace): diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index 9cacce04..ebe17040 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -253,7 +253,7 @@ function inc() { } ``` -### Modifiers and Transformers +### Modifiers and Transformers {#modifiers-and-transformers} To access modifiers used with the `v-model` directive, we can destructure the return value of `defineModel()` like this: diff --git a/src/guide/components/v-model.md b/src/guide/components/v-model.md index 9fe01e4b..61b844ed 100644 --- a/src/guide/components/v-model.md +++ b/src/guide/components/v-model.md @@ -1,6 +1,6 @@ # Component v-model {#component-v-model} -## Basic Usage +## Basic Usage {#basic-usage} `v-model` can be used on a component to implement a two-way binding. @@ -49,7 +49,7 @@ const model = defineModel() [Playground Example](https://play.vuejs.org/#eNqFUtFKwzAU/ZWYl06YLbK30Q10DFSYigq+5KW0t11mmoQknZPSf/cm3eqEsT0l555zuefmpKV3WsfbBuiUpjY3XDtiwTV6ziSvtTKOLNZcFKQ0qiZRnATkG6JB0BIDJen2kp5iMlfSOlLbisw8P4oeQAhFPpURxVV0zWSa9PNwEgIHtRaZA0SEpOvbeduG5q5LE0Sh2jvZ3tSqADFjFHlGSYJkmhz10zF1FseXvIo3VklcrfX9jOaq1lyAedGOoz1GpyQwnsvQ3fdTqDnTwPhQz9eQf52ob+zO1xh9NWDBbIHRgXOZqcD19PL9GXZ4H0h03whUnyHfwCrReI+97L6RBdo+0gW3j+H9uaw+7HLnQNrDUt6oV3ZBzyhmsjiz+p/dSTwJfUx2+IpD1ic+xz5enwQGXEDJJaw8Gl2I1upMzlc/hEvdOBR6SNKAjqP1J6P/o6XdL11L5h4=) -### Under the Hood +### Under the Hood {#under-the-hood} `defineModel` is a convenience macro. The compiler expands it to the following: diff --git a/src/guide/typescript/overview.md b/src/guide/typescript/overview.md index 8edac482..c9377da0 100644 --- a/src/guide/typescript/overview.md +++ b/src/guide/typescript/overview.md @@ -210,7 +210,7 @@ let x: string | number = 1 If using Vue CLI or a webpack-based setup, TypeScript in template expressions requires `vue-loader@^16.8.0`. ::: -### Usage with TSX +### Usage with TSX {#usage-with-tsx} Vue also supports authoring components with JSX / TSX. Details are covered in the [Render Function & JSX](/guide/extras/render-function.html#jsx-tsx) guide. From e19c6be837f13ee1b1082688b6039a847d8e2524 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 31 Dec 2023 17:51:42 +0800 Subject: [PATCH 2/2] update vue 2 mention on intro page --- src/guide/introduction.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/guide/introduction.md b/src/guide/introduction.md index 463d0cbf..4f834e09 100644 --- a/src/guide/introduction.md +++ b/src/guide/introduction.md @@ -6,8 +6,7 @@ footer: false :::info You are reading the documentation for Vue 3! -- Vue 2 support will end on Dec 31, 2023. Learn more about [Vue 2 Extended LTS](https://v2.vuejs.org/lts/). -- Vue 2 documentation has been moved to [v2.vuejs.org](https://v2.vuejs.org/). +- Vue 2 support has ended on **Dec 31, 2023**. Learn more about [Vue 2 EOL](https://v2.vuejs.org/eol/). - Upgrading from Vue 2? Check out the [Migration Guide](https://v3-migration.vuejs.org/). ::: @@ -281,4 +280,3 @@ Different developers have different learning styles. Feel free to pick a learnin

Explore examples of core features and common UI tasks.

-