From 7bb9835510e575299d953b3b6ca752d2f2377c9d Mon Sep 17 00:00:00 2001 From: Thiago Saife Date: Tue, 18 Jun 2024 06:19:19 -0300 Subject: [PATCH 1/8] Update custom-directives.md (#2885) Removing `prevVnode` params from hooks where they aren't available. --- src/guide/reusability/custom-directives.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/guide/reusability/custom-directives.md b/src/guide/reusability/custom-directives.md index ea3e5abe..206a840a 100644 --- a/src/guide/reusability/custom-directives.md +++ b/src/guide/reusability/custom-directives.md @@ -111,23 +111,23 @@ A directive definition object can provide several hook functions (all optional): const myDirective = { // called before bound element's attributes // or event listeners are applied - created(el, binding, vnode, prevVnode) { + created(el, binding, vnode) { // see below for details on arguments }, // called right before the element is inserted into the DOM. - beforeMount(el, binding, vnode, prevVnode) {}, + beforeMount(el, binding, vnode) {}, // called when the bound element's parent component // and all its children are mounted. - mounted(el, binding, vnode, prevVnode) {}, + mounted(el, binding, vnode) {}, // called before the parent component is updated beforeUpdate(el, binding, vnode, prevVnode) {}, // called after the parent component and // all of its children have updated updated(el, binding, vnode, prevVnode) {}, // called before the parent component is unmounted - beforeUnmount(el, binding, vnode, prevVnode) {}, + beforeUnmount(el, binding, vnode) {}, // called when the parent component is unmounted - unmounted(el, binding, vnode, prevVnode) {} + unmounted(el, binding, vnode) {} } ``` From cdddfa902799a6011aa1ee9a430e0de670ada64d Mon Sep 17 00:00:00 2001 From: Mona Moxie Date: Tue, 18 Jun 2024 11:21:38 +0200 Subject: [PATCH 2/8] Fix typo: "subject the" -> "subject to" (#2889) Fix typo: "subject the" to "subject to" --- src/guide/typescript/options-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/typescript/options-api.md b/src/guide/typescript/options-api.md index bf68aac7..c7485fdc 100644 --- a/src/guide/typescript/options-api.md +++ b/src/guide/typescript/options-api.md @@ -286,7 +286,7 @@ declare module 'vue' { Now the `beforeRouteEnter` option will be properly typed. Note this is just an example - well-typed libraries like `vue-router` should automatically perform these augmentations in their own type definitions. -The placement of this augmentation is subject the [same restrictions](#type-augmentation-placement) as global property augmentations. +The placement of this augmentation is subject to the [same restrictions](#type-augmentation-placement) as global property augmentations. See also: From cba9103acd3719cc954f41a6d6317d176171c78b Mon Sep 17 00:00:00 2001 From: Wangchangxin <1571825323@qq.com> Date: Tue, 18 Jun 2024 17:26:44 +0800 Subject: [PATCH 3/8] doc: update v-model.md, fixed what I believe to be an error (#2892) --- src/guide/components/v-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/components/v-model.md b/src/guide/components/v-model.md index e08a6930..095184f8 100644 --- a/src/guide/components/v-model.md +++ b/src/guide/components/v-model.md @@ -73,7 +73,7 @@ const emit = defineEmits(['update:modelValue']) ``` -Then, `v-model="modelValue"` in the parent component will be compiled to: +Then, `v-model="foo"` in the parent component will be compiled to: ```vue-html From c0724f7b8bba510af53a1f1909001297babe0aa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:29:47 +0200 Subject: [PATCH 4/8] chore(deps): bump vue from 3.4.27 to 3.4.29 (#2897) Bumps [vue](https://github.com/vuejs/core) from 3.4.27 to 3.4.29. - [Release notes](https://github.com/vuejs/core/releases) - [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md) - [Commits](https://github.com/vuejs/core/compare/v3.4.27...v3.4.29) --- updated-dependencies: - dependency-name: vue dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 170 +++++++++++++++++++++++++++++-------------------- 1 file changed, 102 insertions(+), 68 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e2f9abf..09192a5a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 4.2.1 '@vue/theme': specifier: ^2.2.12 - version: 2.2.12(@algolia/client-search@4.23.3)(search-insights@2.14.0)(vitepress@1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.1)(postcss@8.4.38)(search-insights@2.14.0)(terser@5.31.0)(typescript@5.4.5))(vue@3.4.27(typescript@5.4.5)) + version: 2.2.12(@algolia/client-search@4.23.3)(search-insights@2.14.0)(vitepress@1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.1)(postcss@8.4.38)(search-insights@2.14.0)(terser@5.31.0)(typescript@5.4.5))(vue@3.4.29(typescript@5.4.5)) dynamics.js: specifier: ^1.1.5 version: 1.1.5 @@ -25,7 +25,7 @@ importers: version: 1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.1)(postcss@8.4.38)(search-insights@2.14.0)(terser@5.31.0)(typescript@5.4.5) vue: specifier: ^3.4.27 - version: 3.4.27(typescript@5.4.5) + version: 3.4.29(typescript@5.4.5) devDependencies: '@types/body-scroll-lock': specifier: ^3.1.2 @@ -126,6 +126,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.24.7': + resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/types@7.24.6': resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==} engines: {node: '>=6.9.0'} @@ -438,14 +443,20 @@ packages: '@vue/compiler-core@3.4.27': resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==} + '@vue/compiler-core@3.4.29': + resolution: {integrity: sha512-TFKiRkKKsRCKvg/jTSSKK7mYLJEQdUiUfykbG49rubC9SfDyvT2JrzTReopWlz2MxqeLyxh9UZhvxEIBgAhtrg==} + '@vue/compiler-dom@3.4.27': resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==} - '@vue/compiler-sfc@3.4.27': - resolution: {integrity: sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==} + '@vue/compiler-dom@3.4.29': + resolution: {integrity: sha512-A6+iZ2fKIEGnfPJejdB7b1FlJzgiD+Y/sxxKwJWg1EbJu6ZPgzaPQQ51ESGNv0CP6jm6Z7/pO6Ia8Ze6IKrX7w==} - '@vue/compiler-ssr@3.4.27': - resolution: {integrity: sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==} + '@vue/compiler-sfc@3.4.29': + resolution: {integrity: sha512-zygDcEtn8ZimDlrEQyLUovoWgKQic6aEQqRXce2WXBvSeHbEbcAsXyCk9oG33ZkyWH4sl9D3tkYc1idoOkdqZQ==} + + '@vue/compiler-ssr@3.4.29': + resolution: {integrity: sha512-rFbwCmxJ16tDp3N8XCx5xSQzjhidYjXllvEcqX/lopkoznlNPz3jyy0WGJCyhAaVQK677WWFt3YO/WUEkMMUFQ==} '@vue/devtools-api@7.2.1': resolution: {integrity: sha512-6oNCtyFOrNdqm6GUkFujsCgFlpbsHLnZqq7edeM/+cxAbMyCWvsaCsIMUaz7AiluKLccCGEM8fhOsjaKgBvb7g==} @@ -466,26 +477,29 @@ packages: typescript: optional: true - '@vue/reactivity@3.4.27': - resolution: {integrity: sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==} + '@vue/reactivity@3.4.29': + resolution: {integrity: sha512-w8+KV+mb1a8ornnGQitnMdLfE0kXmteaxLdccm2XwdFxXst4q/Z7SEboCV5SqJNpZbKFeaRBBJBhW24aJyGINg==} '@vue/repl@4.2.1': resolution: {integrity: sha512-kPpoAp0hQ1sKIGXEHtVdtdh2BgL97SAizEvCqRDB3LmgIYCPbzInwd4mqYkHstAhJPmkNslLd3rwfceMwzwinQ==} - '@vue/runtime-core@3.4.27': - resolution: {integrity: sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==} + '@vue/runtime-core@3.4.29': + resolution: {integrity: sha512-s8fmX3YVR/Rk5ig0ic0NuzTNjK2M7iLuVSZyMmCzN/+Mjuqqif1JasCtEtmtoJWF32pAtUjyuT2ljNKNLeOmnQ==} - '@vue/runtime-dom@3.4.27': - resolution: {integrity: sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==} + '@vue/runtime-dom@3.4.29': + resolution: {integrity: sha512-gI10atCrtOLf/2MPPMM+dpz3NGulo9ZZR9d1dWo4fYvm+xkfvRrw1ZmJ7mkWtiJVXSsdmPbcK1p5dZzOCKDN0g==} - '@vue/server-renderer@3.4.27': - resolution: {integrity: sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==} + '@vue/server-renderer@3.4.29': + resolution: {integrity: sha512-HMLCmPI2j/k8PVkSBysrA2RxcxC5DgBiCdj7n7H2QtR8bQQPqKAe8qoaxLcInzouBmzwJ+J0x20ygN/B5mYBng==} peerDependencies: - vue: 3.4.27 + vue: 3.4.29 '@vue/shared@3.4.27': resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==} + '@vue/shared@3.4.29': + resolution: {integrity: sha512-hQ2gAQcBO/CDpC82DCrinJNgOHI2v+FA7BDW4lMSPeBpQ7sRe2OLHWe5cph1s7D8DUQAwRt18dBDfJJ220APEA==} + '@vue/theme@2.2.12': resolution: {integrity: sha512-LR2cf3c6rKLW2UbDwPZ3cTsjdlI9RNl8WpU7T9tMKkzEfdKfkHf0aazv877iNLMqNvIVr9EY/8KdEAe8HRDcBQ==} peerDependencies: @@ -766,8 +780,8 @@ packages: peerDependencies: typescript: '*' - vue@3.4.27: - resolution: {integrity: sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==} + vue@3.4.29: + resolution: {integrity: sha512-8QUYfRcYzNlYuzKPfge1UWC6nF9ym0lx7mpGVPJYNhddxEf3DD0+kU07NTL0sXuiT2HuJuKr/iEO8WvXvT0RSQ==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -888,6 +902,10 @@ snapshots: dependencies: '@babel/types': 7.24.6 + '@babel/parser@7.24.7': + dependencies: + '@babel/types': 7.24.6 + '@babel/types@7.24.6': dependencies: '@babel/helper-string-parser': 7.24.6 @@ -1082,10 +1100,10 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@vitejs/plugin-vue@5.0.5(vite@5.2.12(@types/node@20.14.1)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5))': + '@vitejs/plugin-vue@5.0.5(vite@5.2.12(@types/node@20.14.1)(terser@5.31.0))(vue@3.4.29(typescript@5.4.5))': dependencies: vite: 5.2.12(@types/node@20.14.1)(terser@5.31.0) - vue: 3.4.27(typescript@5.4.5) + vue: 3.4.29(typescript@5.4.5) '@volar/language-core@2.2.5': dependencies: @@ -1108,42 +1126,55 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.0 + '@vue/compiler-core@3.4.29': + dependencies: + '@babel/parser': 7.24.7 + '@vue/shared': 3.4.29 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + '@vue/compiler-dom@3.4.27': dependencies: '@vue/compiler-core': 3.4.27 '@vue/shared': 3.4.27 - '@vue/compiler-sfc@3.4.27': + '@vue/compiler-dom@3.4.29': dependencies: - '@babel/parser': 7.24.6 - '@vue/compiler-core': 3.4.27 - '@vue/compiler-dom': 3.4.27 - '@vue/compiler-ssr': 3.4.27 - '@vue/shared': 3.4.27 + '@vue/compiler-core': 3.4.29 + '@vue/shared': 3.4.29 + + '@vue/compiler-sfc@3.4.29': + dependencies: + '@babel/parser': 7.24.7 + '@vue/compiler-core': 3.4.29 + '@vue/compiler-dom': 3.4.29 + '@vue/compiler-ssr': 3.4.29 + '@vue/shared': 3.4.29 estree-walker: 2.0.2 magic-string: 0.30.10 postcss: 8.4.38 source-map-js: 1.2.0 - '@vue/compiler-ssr@3.4.27': + '@vue/compiler-ssr@3.4.29': dependencies: - '@vue/compiler-dom': 3.4.27 - '@vue/shared': 3.4.27 + '@vue/compiler-dom': 3.4.29 + '@vue/shared': 3.4.29 - '@vue/devtools-api@7.2.1(vue@3.4.27(typescript@5.4.5))': + '@vue/devtools-api@7.2.1(vue@3.4.29(typescript@5.4.5))': dependencies: - '@vue/devtools-kit': 7.2.1(vue@3.4.27(typescript@5.4.5)) + '@vue/devtools-kit': 7.2.1(vue@3.4.29(typescript@5.4.5)) transitivePeerDependencies: - vue - '@vue/devtools-kit@7.2.1(vue@3.4.27(typescript@5.4.5))': + '@vue/devtools-kit@7.2.1(vue@3.4.29(typescript@5.4.5))': dependencies: '@vue/devtools-shared': 7.2.1 hookable: 5.5.3 mitt: 3.0.1 perfect-debounce: 1.0.0 speakingurl: 14.0.1 - vue: 3.4.27(typescript@5.4.5) + vue: 3.4.29(typescript@5.4.5) '@vue/devtools-shared@7.2.1': dependencies: @@ -1161,36 +1192,39 @@ snapshots: optionalDependencies: typescript: 5.4.5 - '@vue/reactivity@3.4.27': + '@vue/reactivity@3.4.29': dependencies: - '@vue/shared': 3.4.27 + '@vue/shared': 3.4.29 '@vue/repl@4.2.1': {} - '@vue/runtime-core@3.4.27': + '@vue/runtime-core@3.4.29': dependencies: - '@vue/reactivity': 3.4.27 - '@vue/shared': 3.4.27 + '@vue/reactivity': 3.4.29 + '@vue/shared': 3.4.29 - '@vue/runtime-dom@3.4.27': + '@vue/runtime-dom@3.4.29': dependencies: - '@vue/runtime-core': 3.4.27 - '@vue/shared': 3.4.27 + '@vue/reactivity': 3.4.29 + '@vue/runtime-core': 3.4.29 + '@vue/shared': 3.4.29 csstype: 3.1.3 - '@vue/server-renderer@3.4.27(vue@3.4.27(typescript@5.4.5))': + '@vue/server-renderer@3.4.29(vue@3.4.29(typescript@5.4.5))': dependencies: - '@vue/compiler-ssr': 3.4.27 - '@vue/shared': 3.4.27 - vue: 3.4.27(typescript@5.4.5) + '@vue/compiler-ssr': 3.4.29 + '@vue/shared': 3.4.29 + vue: 3.4.29(typescript@5.4.5) '@vue/shared@3.4.27': {} - '@vue/theme@2.2.12(@algolia/client-search@4.23.3)(search-insights@2.14.0)(vitepress@1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.1)(postcss@8.4.38)(search-insights@2.14.0)(terser@5.31.0)(typescript@5.4.5))(vue@3.4.27(typescript@5.4.5))': + '@vue/shared@3.4.29': {} + + '@vue/theme@2.2.12(@algolia/client-search@4.23.3)(search-insights@2.14.0)(vitepress@1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.1)(postcss@8.4.38)(search-insights@2.14.0)(terser@5.31.0)(typescript@5.4.5))(vue@3.4.29(typescript@5.4.5))': dependencies: '@docsearch/css': 3.6.0 '@docsearch/js': 3.6.0(@algolia/client-search@4.23.3)(search-insights@2.14.0) - '@vueuse/core': 10.10.0(vue@3.4.27(typescript@5.4.5)) + '@vueuse/core': 10.10.0(vue@3.4.29(typescript@5.4.5)) body-scroll-lock: 4.0.0-beta.0 normalize.css: 8.0.1 tiny-decode: 0.1.3 @@ -1204,21 +1238,21 @@ snapshots: - search-insights - vue - '@vueuse/core@10.10.0(vue@3.4.27(typescript@5.4.5))': + '@vueuse/core@10.10.0(vue@3.4.29(typescript@5.4.5))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.10.0 - '@vueuse/shared': 10.10.0(vue@3.4.27(typescript@5.4.5)) - vue-demi: 0.14.8(vue@3.4.27(typescript@5.4.5)) + '@vueuse/shared': 10.10.0(vue@3.4.29(typescript@5.4.5)) + vue-demi: 0.14.8(vue@3.4.29(typescript@5.4.5)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@vueuse/integrations@10.10.0(focus-trap@7.5.4)(vue@3.4.27(typescript@5.4.5))': + '@vueuse/integrations@10.10.0(focus-trap@7.5.4)(vue@3.4.29(typescript@5.4.5))': dependencies: - '@vueuse/core': 10.10.0(vue@3.4.27(typescript@5.4.5)) - '@vueuse/shared': 10.10.0(vue@3.4.27(typescript@5.4.5)) - vue-demi: 0.14.8(vue@3.4.27(typescript@5.4.5)) + '@vueuse/core': 10.10.0(vue@3.4.29(typescript@5.4.5)) + '@vueuse/shared': 10.10.0(vue@3.4.29(typescript@5.4.5)) + vue-demi: 0.14.8(vue@3.4.29(typescript@5.4.5)) optionalDependencies: focus-trap: 7.5.4 transitivePeerDependencies: @@ -1227,9 +1261,9 @@ snapshots: '@vueuse/metadata@10.10.0': {} - '@vueuse/shared@10.10.0(vue@3.4.27(typescript@5.4.5))': + '@vueuse/shared@10.10.0(vue@3.4.29(typescript@5.4.5))': dependencies: - vue-demi: 0.14.8(vue@3.4.27(typescript@5.4.5)) + vue-demi: 0.14.8(vue@3.4.29(typescript@5.4.5)) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -1430,17 +1464,17 @@ snapshots: '@shikijs/core': 1.6.2 '@shikijs/transformers': 1.6.2 '@types/markdown-it': 14.1.1 - '@vitejs/plugin-vue': 5.0.5(vite@5.2.12(@types/node@20.14.1)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) - '@vue/devtools-api': 7.2.1(vue@3.4.27(typescript@5.4.5)) + '@vitejs/plugin-vue': 5.0.5(vite@5.2.12(@types/node@20.14.1)(terser@5.31.0))(vue@3.4.29(typescript@5.4.5)) + '@vue/devtools-api': 7.2.1(vue@3.4.29(typescript@5.4.5)) '@vue/shared': 3.4.27 - '@vueuse/core': 10.10.0(vue@3.4.27(typescript@5.4.5)) - '@vueuse/integrations': 10.10.0(focus-trap@7.5.4)(vue@3.4.27(typescript@5.4.5)) + '@vueuse/core': 10.10.0(vue@3.4.29(typescript@5.4.5)) + '@vueuse/integrations': 10.10.0(focus-trap@7.5.4)(vue@3.4.29(typescript@5.4.5)) focus-trap: 7.5.4 mark.js: 8.11.1 minisearch: 6.3.0 shiki: 1.6.2 vite: 5.2.12(@types/node@20.14.1)(terser@5.31.0) - vue: 3.4.27(typescript@5.4.5) + vue: 3.4.29(typescript@5.4.5) optionalDependencies: postcss: 8.4.38 transitivePeerDependencies: @@ -1470,9 +1504,9 @@ snapshots: - typescript - universal-cookie - vue-demi@0.14.8(vue@3.4.27(typescript@5.4.5)): + vue-demi@0.14.8(vue@3.4.29(typescript@5.4.5)): dependencies: - vue: 3.4.27(typescript@5.4.5) + vue: 3.4.29(typescript@5.4.5) vue-template-compiler@2.7.16: dependencies: @@ -1486,12 +1520,12 @@ snapshots: semver: 7.6.2 typescript: 5.4.5 - vue@3.4.27(typescript@5.4.5): + vue@3.4.29(typescript@5.4.5): dependencies: - '@vue/compiler-dom': 3.4.27 - '@vue/compiler-sfc': 3.4.27 - '@vue/runtime-dom': 3.4.27 - '@vue/server-renderer': 3.4.27(vue@3.4.27(typescript@5.4.5)) - '@vue/shared': 3.4.27 + '@vue/compiler-dom': 3.4.29 + '@vue/compiler-sfc': 3.4.29 + '@vue/runtime-dom': 3.4.29 + '@vue/server-renderer': 3.4.29(vue@3.4.29(typescript@5.4.5)) + '@vue/shared': 3.4.29 optionalDependencies: typescript: 5.4.5 From f844eaf2eec1b560e189ad59cc23e12b78ab5cb3 Mon Sep 17 00:00:00 2001 From: Olabode-Odebunmi Oluwaseeni <64348042+seeniOlabode@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:31:23 +0100 Subject: [PATCH 5/8] Warn custom ref (#2899) * docs: warn about customRef pitfalls * docs: review the scenario and issue explanation * docs: review customRefs warning --- src/api/reactivity-advanced.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/api/reactivity-advanced.md b/src/api/reactivity-advanced.md index cb5e67f5..2e63a5ae 100644 --- a/src/api/reactivity-advanced.md +++ b/src/api/reactivity-advanced.md @@ -131,6 +131,15 @@ Creates a customized ref with explicit control over its dependency tracking and [Try it in the Playground](https://play.vuejs.org/#eNplUkFugzAQ/MqKC1SiIekxIpEq9QVV1BMXCguhBdsyaxqE/PcuGAhNfYGd3Z0ZDwzeq1K7zqB39OI205UiaJGMOieiapTUBAOYFt/wUxqRYf6OBVgotGzA30X5Bt59tX4iMilaAsIbwelxMfCvWNfSD+Gw3++fEhFHTpLFuCBsVJ0ScgUQjw6Az+VatY5PiroHo3IeaeHANlkrh7Qg1NBL43cILUmlMAfqVSXK40QUOSYmHAZHZO0KVkIZgu65kTnWp8Qb+4kHEXfjaDXkhd7DTTmuNZ7MsGyzDYbz5CgSgbdppOBFqqT4l0eX1gZDYOm057heOBQYRl81coZVg9LQWGr+IlrchYKAdJp9h0C6KkvUT3A6u8V1dq4ASqRgZnVnWg04/QWYNyYzC2rD5Y3/hkDgz8fY/cOT1ZjqizMZzGY3rDPC12KGZYyd3J26M8ny1KKx7c3X25q1c1wrZN3L9LCMWs/+AmeG6xI=) + :::warning Use with caution + When using customRef, we should be cautious about the return value of its getter, particularly when generating new object datatypes each time the getter is run. This affects the relationship between parent and child components, where such a customRef has been passed as a prop. + + The parent component's render function could be triggered by changes to a different reactive state. During rerender, the value of our customRef is reevaluated, returning a new object datatype as a prop to a child component. This prop is compared with its last value in the child component, and since they are different, the reactive dependencies of the customRef are triggered in the child component. Meanwhile, the reactive dependencies in the parent component do not run because the customRef's setter was not called, and its dependencies were not triggered as a result. + + [See it in the Playground](https://play.vuejs.org/#eNqFVEtP3DAQ/itTS9Vm1ZCt1J6WBZUiDvTQIsoNcwiOkzU4tmU7+9Aq/71jO1mCWuhlN/PyfPP45kAujCk2HSdLsnLMCuPBcd+Zc6pEa7T1cADWOa/bW17nYMPPtvRsDT3UVrcww+DZ0flStybpKSkWQQqPU0IVVUwr58FYvdvDWXgpu6ek1pqSHL0fS0vJw/z0xbN1jUPHY/Ys87Zkzzl4K5qG2zmcnUN2oAqg4T6bQ/wENKNXNk+CxWKsSlmLTSk7XlhedYxnWclYDiK+MkQCoK4wnVtnIiBJuuEJNA2qPof7hzkEoc8DXgg9yzYTBBFgNr4xyY4FbaK2p6qfI0iqFgtgulOe27HyQRy69Dk1JXY9C03JIeQ6wg4xWvJCqFpnlNytOcyC2wzYulQNr0Ao+Mhw0KnTTEttl/CIaIJiMz8NGBHFtYetVrPwa58/IL48Zag4N0ssquNYLYBoW16J0vOkC3VQtVqk7cG9QcHz1kj0QAlgVYkNMFk6d0bJ1pbGYKUkmtD42HmvFfi94WhOEiXwjUnBnlEz9OLTJwy5qCo44D4O7en71SIFjI/F9VuG4jEy/GHQKq5hQrJAKOc4uNVighBF5/cygS0GgOMoK+HQb7+EWvLdMM7weVIJy5kXWi0Rj+xaNRhLKRp1IvB9hxYegA6WJ1xkUe9PcF4e9a+suA3YwYiC5MQ79KlFUzw5rZCZEUtoRWuE5PaXCXmxtuWIkpJSSr39EXXHQcWYNWfP/9A/uV3QUXJjueN2E1ZhtPnSIqGS+er3T77D76Ox1VUn0fsd4y3HfewCxuT2vVMVwp74RbTX8WQI1dy5qx12xI1Fpa1K5AreeEHCCN8q/QXul+LrSC3s4nh93jltkVPDIYt5KJkcIKStCReo4rVQ/CZI6dyEzToCCJu7hAtry/1QH/qXncQB400KJwqPxZHxEyona0xS/E3rt1m9Ld1rZl+uhaxecRtP3EjtgddCyimtXyj9H/Ii3eId7uOGTkyk/wOEbQ9h) + + ::: + ## shallowReactive() {#shallowreactive} Shallow version of [`reactive()`](./reactivity-core#reactive). From e6512c336770deefef0d11b03a902ce89a94bc27 Mon Sep 17 00:00:00 2001 From: dfkn <102590101+dmtrfkn@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:34:30 +0700 Subject: [PATCH 6/8] Update forms.md (#2900) Added close input tags symbol "/". A few of your inputs haven't it. --- src/guide/essentials/forms.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/guide/essentials/forms.md b/src/guide/essentials/forms.md index f9745070..9a4ce5c3 100644 --- a/src/guide/essentials/forms.md +++ b/src/guide/essentials/forms.md @@ -163,26 +163,26 @@ export default { ```vue-html
Checked names: {{ checkedNames }}
- + - + - + ```
Checked names: {{ checkedNames }}
- + - + - +
From 853eff61387f1aa6d71f951c53c78031e62ef7e4 Mon Sep 17 00:00:00 2001 From: Yordan Ramchev <69005114+Yordan-Ramchev@users.noreply.github.com> Date: Tue, 18 Jun 2024 12:36:09 +0300 Subject: [PATCH 7/8] Update v-model.md (#2890) * Update v-model.md > When it is mutated by the child, it causes the parent bound value to be updated as well. Maybe adding a click event to invoke the update would help clarify the example? * Update src/guide/components/v-model.md Co-authored-by: Natalia Tepluhina --------- Co-authored-by: Natalia Tepluhina --- src/guide/components/v-model.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/guide/components/v-model.md b/src/guide/components/v-model.md index 095184f8..1c3f3683 100644 --- a/src/guide/components/v-model.md +++ b/src/guide/components/v-model.md @@ -20,6 +20,7 @@ function update() { ``` From a7d0726f7180c6a474bc13050d0ced8fd9cd68b0 Mon Sep 17 00:00:00 2001 From: Peaupoosh <45771097+Pduhard@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:36:29 +0200 Subject: [PATCH 8/8] fix: update example in guide/extras/rendering-mechanism (#2887) --- src/guide/extras/rendering-mechanism.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/extras/rendering-mechanism.md b/src/guide/extras/rendering-mechanism.md index 3b2ae85b..d188bc61 100644 --- a/src/guide/extras/rendering-mechanism.md +++ b/src/guide/extras/rendering-mechanism.md @@ -176,7 +176,7 @@ When this component needs to re-render, it only needs to traverse the flattened
... -
+
```