diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 81da5029..adce7914 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -722,6 +722,11 @@ export default defineConfigWithTheme({ text: '繁體中文', repo: 'https://github.com/vuejs-translations/docs-zh-hk' }, + { + link: 'https://pl.vuejs.org', + text: 'Polski', + repo: 'https://github.com/vuejs-translations/docs-pl', + }, { link: '/translations/', text: 'ساعدنا في الترجمة', diff --git a/src/glossary/index.md b/src/glossary/index.md index e8a64f6b..5c8bbfbd 100644 --- a/src/glossary/index.md +++ b/src/glossary/index.md @@ -153,10 +153,16 @@ The term *hoisting* is used to describe running a section of code before it is r JavaScript uses hoisting for some constructs, such as `var`, `import` and function declarations. -In a Vue context, the template compiler applies *static hoisting* to improve performance. When converting a template to a render function, VNodes that correspond to static content can be created once and then reused. These static VNodes are described as hoisted because they are created outside the render function, before it runs. A similar form of hoisting is applied to static objects or arrays that are generated by the template compiler. +In a Vue context, the compiler applies *hoisting* to improve performance. When compiling a component, static values are moved out of the component's scope. These static values are described as 'hoisted' because they are created outside the component. + +## cache static {#cache-static} + +The term *cache* is used to describe the temporary storage of frequently accessed data to improve performance. + +The Vue template compiler identifies those static VNodes, caches them during the initial render, and reuses the same VNodes for every subsequent re-render. For more details see: -- [Guide - Rendering Mechanism - Static Hoisting](/guide/extras/rendering-mechanism.html#static-hoisting) +- [Guide - Rendering Mechanism - Cache Static](/guide/extras/rendering-mechanism.html#cache-static) ## in-DOM template {#in-dom-template} diff --git a/src/guide/extras/web-components.md b/src/guide/extras/web-components.md index 0dbad6c3..e661e4bf 100644 --- a/src/guide/extras/web-components.md +++ b/src/guide/extras/web-components.md @@ -306,9 +306,10 @@ declare module 'vue' { Here is the recommended way to enable type checking in SFC templates of Custom Elements that are not built with Vue. -> [!Note] -> This approach is one possible way to do it, but it may vary depending on the -> framework being used to create the custom elements. +:::tip Note +- This approach is one possible way to do it, but it may vary depending on the +- framework being used to create the custom elements. +::: Suppose we have a custom element with some JS properties and events defined, and it is shipped in a library called `some-lib`: @@ -389,11 +390,12 @@ type VueEmit = EmitFn<{ }> ``` -> [!Note] -> We marked `$props` and `$emit` as deprecated so that when we get a `ref` to -> a custom element we will not be tempted to use these properties, as these -> properties are for type checking purposes only when it comes to custom elements. -> These properties do not actually exist on the custom element instances. +:::tip Note +- We marked `$props` and `$emit` as deprecated so that when we get a `ref` to +- a custom element we will not be tempted to use these properties, as these +- properties are for type checking purposes only when it comes to custom elements. +- These properties do not actually exist on the custom element instances. +::: Using the type helper we can now select the JS properties that should be exposed for type checking in Vue templates: diff --git a/src/translations/index.md b/src/translations/index.md index 09e9ad2d..e5a84c52 100644 --- a/src/translations/index.md +++ b/src/translations/index.md @@ -19,13 +19,13 @@ aside: false - [Русский / Russian](https://ru.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-ru)] - [Čeština / Czech](https://cs.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-cs)] - [繁體中文 / Traditional Chinese](https://zh-hk.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-zh-hk)] +- [Polski / Polish](https://pl.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-pl)] ## Work in Progress Languages {#work-in-progress-languages} - [العربية / Arabic](https://ar.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-ar)] - [Español / Spanish](https://vue3-spanish-docs.netlify.app/) [[source](https://github.com/icarusgk/vuejs-spanish-docs)] - [Deutsch / German](https://de.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-de)] -- [Polski / Polish](https://pl.vuejs.org/) [[source](https://github.com/vuejs-translations/docs-pl)] ## Starting a new Translation {#starting-a-new-translation}