Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(en): merge docs-next/master into vue-docs-next/main @ dfd86d3c #60

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
47691ed
Update Introduction example to use `components` instead of `.componen…
LSViana Oct 26, 2021
210b792
SSR Guide: Remove app.js (#1297)
CyberAP Oct 26, 2021
965d330
Add an example on why singletones are bad (#1298)
CyberAP Oct 27, 2021
ae71533
Adding Components.studio and WebComponents.dev... (#1299)
georges-gomes Oct 29, 2021
7607848
Update debugging-in-vscode.md (#1270)
deepansh96 Oct 29, 2021
7a9ad06
Fixed possessive pronouns (#1303)
0xleyth Oct 29, 2021
eef29e0
fixed missing commas (#1302)
0xleyth Oct 29, 2021
d026fc2
Update introduction.md (#1306)
wxsms Oct 30, 2021
f4311ed
Update deprecated app.config.isCustomElement (#1307)
Miguel-Bento-Github Oct 31, 2021
5ddaf35
fix: use createSSRApp instead of createApp (#1311)
skirtles-code Nov 3, 2021
563ed27
docs: expand the explanation about using VNodes with <component> (#1310)
skirtles-code Nov 3, 2021
3d84cff
Fix typo (#1315)
dews Nov 5, 2021
0097065
chore: Update partners on myself (#1318)
rstoenescu Nov 7, 2021
4fae0d0
add vue school links to supplement component documentation with video…
danielkellyio Nov 10, 2021
3c97d52
Update description about .number modifier (#1285)
zxuqian Nov 10, 2021
45b9049
fix: Explain usage of custom directives with script-setup (#1319)
LinusBorg Nov 10, 2021
813c887
enclosed a word intended to clarify meaning of diff (#1304)
0xleyth Nov 10, 2021
fc31792
A better example for v-html (#1314)
mehanalavimajd Nov 10, 2021
729d996
fix: bug in the rendering of the v-html example (#1326)
skirtles-code Nov 12, 2021
c90a0a2
Update application-api.md (#1327)
mehanalavimajd Nov 13, 2021
44b9095
Add Vue School Black Friday 21 banners (#1330)
nicodevs Nov 18, 2021
48a9e6e
Fix Black Friday banner close button (#1333)
nicodevs Nov 18, 2021
3125ee0
update component-props.md (#1336)
wxsms Nov 19, 2021
efeddd5
docs(installation): link to cli.vuejs.org and vitejs.dev (#1340)
simon04 Nov 21, 2021
bd47f2a
fix: fixed a broken link
NataliaTepluhina Nov 24, 2021
c64958c
Update sfc-script-setup.md (#1345)
wxsms Nov 24, 2021
9729c18
update component-provide-inject.md (#1343)
wxsms Nov 24, 2021
b596073
update component-slots.md (#1342)
wxsms Nov 24, 2021
131fcf0
Update Vue School banner for Cyber Monday (#1358)
nicodevs Nov 30, 2021
56eff34
docs: add indonesia translation url (#1357)
simon04 Nov 30, 2021
334ea37
update transitions-overview.md (#1352)
wxsms Nov 30, 2021
12071a7
use camelCase (#1338)
wxsms Dec 1, 2021
28b17da
update composition-api-introduction.md (#1360)
wxsms Dec 2, 2021
f8c5190
Remove Vue School's Black Friday banner (#1367)
nicodevs Dec 4, 2021
1deb5a1
Update the Firefox-beta link to lead to the latest beta release (#1368)
saeedesmaili Dec 4, 2021
eeb9e2d
Add Vue Mastery Free Weekend Promotion (#1364)
pieer Dec 7, 2021
423e949
Update Vue mastery banner url (#1371)
pieer Dec 7, 2021
4dfc045
Update Prop Mutation Docs to be more clear around mutation (#1365)
MarkTallentire Dec 9, 2021
8533189
Fixed Grammatical Errors in Community Theme Descriptions (#1376)
defyentropy Dec 13, 2021
d6e5a79
Clerification on disabling attributes inheritance. (#1370)
anchan42 Dec 13, 2021
1dcdb5a
update transitions-overview.md (#1373)
wxsms Dec 13, 2021
5136ad7
chore(vite installation guide): add installation guide using pnpm (#1…
dammy001 Dec 17, 2021
93172b9
Added comma for better readability. (#1377)
abrarum Dec 17, 2021
0fd3fff
fix(compat): add a note about Nuxt Bridge for Nuxt.js users (#1379)
superbiche Dec 17, 2021
c314406
Update vue Mastery banner (#1381)
pieer Dec 22, 2021
d47173d
Update typescript-support.md (#1387)
vladsholokhov Dec 24, 2021
dfd86d3
Fix grammatical errors and introduce app.component() in introduction.…
defyentropy Dec 24, 2021
ac4640d
docs(en): merging all conflicts
docschina-bot Dec 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/.vuepress/components/community/team/partners.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,14 @@ export default shuffle([
github: 'rstoenescu',
twitter: 'quasarframework',
work: {
role: 'Developer',
role: 'Author',
org: 'Quasar Framework',
orgUrl: 'http://quasar-framework.org/'
orgUrl: 'http://quasar.dev/'
},
reposPersonal: [
'quasarframework/quasar',
'quasarframework/quasar-cli',
'quasarframework/quasar-play'
]
'quasarframework/quasar'
],
links: ['https://quasar.dev']
},
{
name: 'Jilson Thomas',
Expand Down
4 changes: 2 additions & 2 deletions src/.vuepress/components/community/themes/theme-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default [
},
{
name: 'PrimeVue',
description: `The open-source UI component library [PrimeVue](https://www.primefaces.org/primevue/#/?af_id=4218) offers over 80 flexible components to build your apps with! They have a ton of different component themes and Vue-CLI application templates available to get the look&feel that suits you best.`,
description: `The open-source UI component library [PrimeVue](https://www.primefaces.org/primevue/#/?af_id=4218) offers over 80 flexible components to build your apps with! They have a ton of different component themes and Vue-CLI application templates available to get the look & feel that suits you best.`,
seeMoreUrl: 'https://www.primefaces.org/primevue/#/?af_id=4218',
products: [
{
Expand Down Expand Up @@ -218,7 +218,7 @@ export default [
},
{
name: 'Flatlogic',
description: `Check the admin dashboards templates built by our partners from [Flatlogic](https://flatlogic.com/templates?ref=x-fdkuTAVW). With these themes you can see how real applications is built. Additionally these templates will help you to start a new application and save you time and money.`,
description: `Check out the admin dashboard templates built by our partners from [Flatlogic](https://flatlogic.com/templates?ref=x-fdkuTAVW). With these themes you can see how real applications are built. Additionally, these templates will help you to start a new application and save you time and money.`,
seeMoreUrl: 'https://flatlogic.com/templates?ref=x-fdkuTAVW',
products: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const labels = {
export const repos = [
{ lang: 'en-us', owner: 'vuejs', repo: 'docs', branch: 'master', url: 'https://v3.vuejs.org/' },
{ lang: 'fr', owner: 'demahom18', repo: 'docs-next', branch: 'master', url: 'https://vue3-fr.netlify.app' },
{ lang: 'id', owner: 'vuejs-id', repo: 'docs-next', branch: 'indonesian' },
{ lang: 'id', owner: 'vuejs-id', repo: 'docs-next', branch: 'indonesian', url: 'https://v3-vuejsid-docs.netlify.app/' },
{ lang: 'ja', owner: 'vuejs-jp', repo: 'ja.vuejs.org', branch: 'lang-ja', url: 'https://v3.ja.vuejs.org/' },
{ lang: 'ko', owner: 'vuejs-kr', repo: 'docs-next', branch: 'rootKoKr', url: 'https://v3.ko.vuejs.org/' },
{ lang: 'pt-br', owner: 'vuejs-br', repo: 'docs-next', branch: 'master', url: 'https://vuejsbr-docs-next.netlify.app/' },
Expand Down
4 changes: 2 additions & 2 deletions src/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ module.exports = {
'link',
{
href:
'https://fonts.googleapis.com/css?family=Inter:300,400,500,600|Open+Sans:400,600;display=swap',
'https://fonts.googleapis.com/css?family=Inter:300,400,500,600|Open+Sans:400,600;display=swap',
rel: 'stylesheet'
}
],
Expand Down Expand Up @@ -510,7 +510,7 @@ module.exports = {
custom: 'CKYD62QM',
placement: 'vuejsorg'
},
topBanner: false
topBanner: true
},
plugins: [
[
Expand Down
167 changes: 0 additions & 167 deletions src/.vuepress/theme/components/BannerTop.vue

This file was deleted.

14 changes: 4 additions & 10 deletions src/.vuepress/theme/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
@touchstart="onTouchStart"
@touchend="onTouchEnd"
>
<BannerTop v-if="showTopBanner" @close="closeBannerTop" />

<Navbar v-if="shouldShowNavbar" @toggle-sidebar="toggleSidebar" />

<div class="sidebar-mask" @click="toggleSidebar(false)" />
Expand Down Expand Up @@ -52,7 +50,6 @@ import Page from '@theme/components/Page.vue'
import Sidebar from '@theme/components/Sidebar.vue'
import BuySellAds from '@theme/components/BuySellAds.vue'
import CarbonAds from '@theme/components/CarbonAds.vue'
import BannerTop from '@theme/components/BannerTop.vue'
import { resolveSidebarItems } from '../util'

export default {
Expand All @@ -63,15 +60,15 @@ export default {
Page,
Sidebar,
Navbar,
BannerTop,
BuySellAds,
CarbonAds
},

data() {
return {
showTopBanner: false,
isSidebarOpen: false
isSidebarOpen: false,
isMenuFixed: false,
menuPosition: 0
}
},

Expand Down Expand Up @@ -115,8 +112,7 @@ export default {
{
'no-navbar': !this.shouldShowNavbar,
'sidebar-open': this.isSidebarOpen,
'no-sidebar': !this.shouldShowSidebar,
'has-top-banner': this.showTopBanner
'no-sidebar': !this.shouldShowSidebar
},
userPageClass
]
Expand All @@ -131,8 +127,6 @@ export default {
this.$router.afterEach(() => {
this.isSidebarOpen = false
})

this.showTopBanner = false
},

methods: {
Expand Down
3 changes: 2 additions & 1 deletion src/api/application-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ app.directive('my-directive', {
mounted() {},
// called before the containing component's VNode is updated
beforeUpdate() {},
// called after the containing component's VNode and the VNodes of its children // have updated
// called after the containing component's VNode and the VNodes of its
// children have updated
updated() {},
// called before the bound element's parent component is unmounted
beforeUnmount() {},
Expand Down
18 changes: 10 additions & 8 deletions src/api/built-in-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { KeepAlive, Teleport, Transition, TransitionGroup } from 'vue'

- **Props:**

- `is` - `string | Component`
- `is` - `string | Component | VNode`

- **Usage:**

Expand All @@ -41,6 +41,8 @@ import { KeepAlive, Teleport, Transition, TransitionGroup } from 'vue'
<component :is="href ? 'a' : 'span'"></component>
```

- **Usage with built-in components:**

The built-in components `KeepAlive`, `Transition`, `TransitionGroup`, and `Teleport` can all be passed to `is`, but you must register them if you want to pass them by name. For example:

```js
Expand All @@ -62,15 +64,15 @@ import { KeepAlive, Teleport, Transition, TransitionGroup } from 'vue'

Registration is not required if you pass the component itself to `is` rather than its name.

- **key:**
- **Usage with VNodes:**

When using <component :is="vnode"> and passing vnode of the same type, you need to provide keys:
```html
<component :is="current" :key="selected" />
```
In advanced use cases, it can sometimes be useful to render an existing VNode via a template. Using a `<component>` makes this possible, but it should be seen as an escape hatch, used to avoid rewriting the entire template as a `render` function.

```html
<component :is="vnode" :key="aSuitableKey" />
```

Otherwise, you are passing two compiled vnodes of the same type to the renderer. Because they are compiled as completely static, they will not be updated at all.
A caveat of mixing VNodes and templates in this way is that you need to provide a suitable `key` attribute. The VNode will be considered static, so any updates will be ignored unless the `key` changes. The `key` can be on the VNode or the `<component>` tag, but either way it must change every time you want the VNode to re-render. This caveat doesn't apply if the nodes have different types, e.g. changing a `span` to a `div`.

- **See also:** [Dynamic Components](../guide/component-dynamic-async.html)

Expand Down
2 changes: 1 addition & 1 deletion src/api/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
- **Example:**

```html
<div v-html="html"></div>
<div v-html="'<h1>Hello World</h1>'"></div>
```

- **See also:** [Data Binding Syntax - Interpolations](../guide/template-syntax.html#raw-html)
Expand Down
29 changes: 29 additions & 0 deletions src/api/sfc-script-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,31 @@ import * as Form from './form-components'
</template>
```

## Using Custom Directives

Globally registered custom directives just work as expected, and local ones can be used directly in the template, much like we explained above for components.

But there's one restriction to be aware of: You must name local custom directives according to the following schema: `vNameOfDirective` in order for them to be directly usable in the template.

```html
<script setup>
const vMyDirective = {
beforeMount: (el) => {
// do something with the element
}
}
</script>
<template>
<h1 v-my-directive>This is a Heading</h1>
</template>
```
```html
<script setup>
// imports also work, and can be renamed to fit the required naming schema
import { myDirective as vMyDirective } from './MyDirective.js'
</script>
```

## `defineProps` and `defineEmits`

To declare `props` and `emits` in `<script setup>`, you must use the `defineProps` and `defineEmits` APIs, which provide full type inference support and are automatically available inside `<script setup>`:
Expand Down Expand Up @@ -218,6 +243,10 @@ export default {
</script>
```

:::warning
`render` function is not supported in this scenario. Please use one normal `<script>` with `setup` option instead.
:::

## Top-level `await`

Top-level `await` can be used inside `<script setup>`. The resulting code will be compiled as `async setup()`:
Expand Down
Loading