Skip to content

Commit 5dc579a

Browse files
Merge remote-tracking branch 'upstream/main'
2 parents c10a018 + 86d0a38 commit 5dc579a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+844
-575
lines changed

.vitepress/config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import fs from 'fs'
2+
import path from 'path'
3+
import { defineConfigWithTheme } from 'vitepress'
14
import type { Config as ThemeConfig } from '@vue/theme'
25
import baseConfig from '@vue/theme/config'
3-
import { defineConfigWithTheme } from 'vitepress'
4-
import fs from 'fs'
56
import { headerPlugin } from './headerMdPlugin'
6-
import { jobsPlugin } from './jobsMdPlugin'
7-
import path from 'path'
87

98
const nav: ThemeConfig['nav'] = [
109
{
@@ -90,9 +89,9 @@ const nav: ThemeConfig['nav'] = [
9089
text: 'المستجدات',
9190
items: [
9291
{ text: 'المدونة', link: 'https://blog.vuejs.org/' },
93-
{ text: 'المدونة', link: 'https://twitter.com/vuejs' },
94-
{ text: 'النشرة البريدية', link: 'https://news.vuejs.org/' },
95-
{ text: 'الفعاليات', link: 'https://events.vuejs.org/' }
92+
{ text: 'تويتر', link: 'https://twitter.com/vuejs' },
93+
{ text: 'الفعاليات', link: 'https://events.vuejs.org/' },
94+
{ text: 'النشرة البريدية', link: 'https://news.vuejs.org' }
9695
]
9796
}
9897
]
@@ -196,6 +195,7 @@ export const sidebar: ThemeConfig['sidebar'] = {
196195
},
197196
{ text: 'الخاصيات', link: '/guide/components/props' },
198197
{ text: 'الأحداث', link: '/guide/components/events' },
198+
{ text: 'الخاصية v-model', link: '/guide/components/v-model' },
199199
{
200200
text: 'السمات الإحتياطية',
201201
link: '/guide/components/attrs'
@@ -677,7 +677,7 @@ export default defineConfigWithTheme<ThemeConfig>({
677677

678678
markdown: {
679679
config(md) {
680-
md.use(headerPlugin).use(jobsPlugin)
680+
md.use(headerPlugin)
681681
}
682682
},
683683

.vitepress/theme/components/Home.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { onMounted } from 'vue'
3-
import NewsLetter from './NewsLetter.vue'
3+
import SiteMap from './SiteMap.vue';
4+
// import NewsLetter from './NewsLetter.vue'
45
import { load, data, base } from './sponsors'
56
import SponsorsGroup from './SponsorsGroup.vue'
67
import VueMasteryModal from './VueMasteryModal.vue'
@@ -89,7 +90,8 @@ onMounted(async () => {
8990
<SponsorsGroup tier="gold" placement="landing" />
9091
</section>
9192

92-
<NewsLetter />
93+
<SiteMap />
94+
<!-- <NewsLetter /> -->
9395
</template>
9496

9597
<style scoped>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<script setup lang="ts">
2+
import { VTLink } from '@vue/theme'
3+
import { useData } from 'vitepress'
4+
5+
const data = useData()
6+
const nav = data.site.value.themeConfig.nav
7+
const ecosystem = nav.find((i: any) => i.text === 'Ecosystem')
8+
const items = nav
9+
.filter((i: any) => i !== ecosystem && i.items)
10+
.concat(ecosystem.items)
11+
</script>
12+
13+
<template>
14+
<section id="sitemap">
15+
<div class="container">
16+
<div class="sitemap-col" v-for="col in items">
17+
<h4>{{ col.text }}</h4>
18+
<ul>
19+
<li v-for="row in col.items">
20+
<VTLink :href="row.link">{{ row.text }}</VTLink>
21+
</li>
22+
</ul>
23+
</div>
24+
</div>
25+
</section>
26+
</template>
27+
28+
<style>
29+
#sitemap {
30+
background: var(--vt-c-bg-soft);
31+
}
32+
33+
#sitemap .container {
34+
max-width: 900px;
35+
margin: 0 auto;
36+
columns: 1;
37+
padding: 24px 32px;
38+
}
39+
40+
@media (min-width: 768px) {
41+
#sitemap .container {
42+
columns: 2;
43+
}
44+
}
45+
46+
@media (min-width: 1024px) {
47+
#sitemap .container {
48+
columns: 3;
49+
}
50+
}
51+
52+
#sitemap h4 {
53+
font-weight: 500;
54+
color: var(--vt-c-text-1);
55+
margin-bottom: 0.25em;
56+
}
57+
58+
.sitemap-col {
59+
margin-bottom: 2em;
60+
break-inside: avoid;
61+
}
62+
63+
#sitemap .vt-link {
64+
font-size: 0.9em;
65+
color: var(--vt-c-text-2);
66+
}
67+
</style>

.vitepress/theme/components/SponsorsGroup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { onMounted, onUnmounted } from 'vue'
3-
import { SponsorData, data, base, load } from './sponsors';
3+
import { SponsorData, data, base, load } from './sponsors'
44
55
const { tier, placement = 'aside' } = defineProps<{
66
tier: keyof SponsorData

.vitepress/theme/components/VueJobs.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ const base = 'https://app.vuejobs.com/feed/vuejs/docs?format=json'
55
let items = $ref<Jobs[]>([])
66
77
type Jobs = {
8-
organization: Organization;
9-
title: string;
10-
link: string;
11-
locations: string[];
12-
remote: false | 'ALLOWED' | 'ONLY';
13-
};
8+
organization: Organization
9+
title: string
10+
link: string
11+
locations: string[]
12+
remote: false | 'ALLOWED' | 'ONLY'
13+
}
1414
1515
type Organization = {
16-
name: string;
17-
avatar: string;
18-
};
16+
name: string
17+
avatar: string
18+
}
1919
</script>
2020
2121
<script setup lang="ts">

.vitepress/theme/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
filterHeadersByPreference
99
} from './components/preferences'
1010
import SponsorsAside from './components/SponsorsAside.vue'
11-
import VueJobs from './components/VueJobs.vue'
1211
import VueSchoolLink from './components/VueSchoolLink.vue'
1312
// import Banner from './components/Banner.vue'
1413

@@ -26,6 +25,5 @@ export default Object.assign({}, VPTheme, {
2625
app.provide('prefer-sfc', preferSFC)
2726
app.provide('filter-headers', filterHeadersByPreference)
2827
app.component('VueSchoolLink', VueSchoolLink)
29-
app.component('VueJobs', VueJobs)
3028
}
3129
})

.vitepress/theme/styles/vue-mastery.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
.vue-mastery-link .banner {
1414
background-color: var(--vt-c-white-soft);
1515
border-radius: 4px;
16-
width:96px;
17-
height:56px;
16+
width: 96px;
17+
height: 56px;
1818
object-fit: cover;
1919
}
2020

@@ -50,7 +50,7 @@
5050

5151
@media (max-width: 576px) {
5252
.vue-mastery-link .banner {
53-
width:56px;
53+
width: 56px;
5454
}
5555

5656
.vue-mastery-link .description {

src/about/team/TeamHero.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
font-size: 14px;
6767
font-weight: 500;
6868
color: var(--vt-c-brand);
69-
transition: color .25s;
69+
transition: color 0.25s;
7070
}
7171
7272
.action :deep(a:hover) {

src/about/team/members-core.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -276,27 +276,6 @@
276276
},
277277
"sponsor": true
278278
},
279-
{
280-
"name": "Damian Dulisz",
281-
"title": "Consultant",
282-
"projects": [
283-
{
284-
"label": "news.vuejs.org",
285-
"url": "https://news.vuejs.org"
286-
},
287-
{
288-
"label": "vue-multiselect",
289-
"url": "https://vue-multiselect.js.org/"
290-
}
291-
],
292-
"location": "Wrocław, Poland",
293-
"languages": ["Polish", "English"],
294-
"socials": {
295-
"github": "shentao",
296-
"twitter": "DamianDulisz"
297-
},
298-
"sponsor": true
299-
},
300279
{
301280
"name": "GU Yiling",
302281
"title": "Senior web developer",

src/about/team/members-emeriti.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,5 +237,26 @@
237237
"github": "michalsnik",
238238
"twitter": "michalsnik"
239239
}
240+
},
241+
{
242+
"name": "Damian Dulisz",
243+
"title": "Consultant",
244+
"projects": [
245+
{
246+
"label": "news.vuejs.org",
247+
"url": "https://news.vuejs.org"
248+
},
249+
{
250+
"label": "vue-multiselect",
251+
"url": "https://vue-multiselect.js.org/"
252+
}
253+
],
254+
"location": "Wrocław, Poland",
255+
"languages": ["Polish", "English"],
256+
"socials": {
257+
"github": "shentao",
258+
"twitter": "DamianDulisz"
259+
},
260+
"sponsor": true
240261
}
241262
]

src/about/team/members-partner.json

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@
161161
{
162162
"name": "Sebastien Chopin",
163163
"title": "#1 Nuxt Brother",
164-
"company": "NuxtJS",
165-
"companyLink": "https://nuxtjs.org",
164+
"company": "NuxtLabs",
165+
"companyLink": "https://nuxtlabs.com",
166166
"location": "Bordeaux, France",
167167
"languages": ["French", "English"],
168168
"projects": [
@@ -171,12 +171,12 @@
171171
"url": "https://github.com/nuxt"
172172
},
173173
{
174-
"label": "nuxt-community/*",
175-
"url": "https://github.com/nuxt-community"
174+
"label": "nuxt-modules/*",
175+
"url": "https://github.com/nuxt-modules"
176176
},
177177
{
178-
"label": "nuxt/vue-meta",
179-
"url": "https://github.com/nuxt/vue-meta"
178+
"label": "nuxt-themes/*",
179+
"url": "https://github.com/nuxt-themes"
180180
}
181181
],
182182
"socials": {
@@ -187,8 +187,8 @@
187187
{
188188
"name": "Alexandre Chopin",
189189
"title": "#1 Nuxt Brother",
190-
"company": "NuxtJS",
191-
"companyLink": "https://nuxtjs.org",
190+
"company": "NuxtLabs",
191+
"companyLink": "https://nuxtlabs.com",
192192
"location": "Bordeaux, France",
193193
"languages": ["French", "English"],
194194
"projects": [
@@ -197,12 +197,8 @@
197197
"url": "https://github.com/nuxt"
198198
},
199199
{
200-
"label": "nuxt-community/*",
201-
"url": "https://github.com/nuxt-community"
202-
},
203-
{
204-
"label": "vue-flexboxgrid",
205-
"url": "https://github.com/alexchopin/vue-flexboxgrid"
200+
"label": "nuxt-modules/*",
201+
"url": "https://github.com/nuxt-modules"
206202
}
207203
],
208204
"socials": {

src/api/built-in-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ Create a two-way binding on a form input element or a component.
362362
- **See also:**
363363

364364
- [Form Input Bindings](/guide/essentials/forms.html)
365-
- [Component Events - Usage with `v-model`](/guide/components/events.html#usage-with-v-model)
365+
- [Component Events - Usage with `v-model`](/guide/components/v-model.html)
366366

367367
## v-slot {#v-slot}
368368

src/api/built-in-special-elements.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Built-in Special Elements {#built-in-special-elements}
22

33
:::info Not Components
4-
`<component>` and `<slot>` are component-like features and part of the template syntax. They are not true components and are compiled away during template compilation. As such, they are conventionally written with lowercase in templates.
4+
`<component>`, `<slot>` and `<template>` are component-like features and part of the template syntax. They are not true components and are compiled away during template compilation. As such, they are conventionally written with lowercase in templates.
55
:::
66

77
## `<component>` {#component}
@@ -139,3 +139,26 @@ Denotes slot content outlets in templates.
139139
`<slot>` elements in Vue templates are compiled into JavaScript, so they are not to be confused with [native `<slot>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot).
140140

141141
- **See also:** [Component - Slots](/guide/components/slots.html)
142+
143+
## `<template>` {#template}
144+
145+
The `<template>` tag is used as a placeholder when we want to use a built-in directive without rendering an element in the DOM.
146+
147+
- **Details:**
148+
149+
The special handling for `<template>` is only triggered if it is used with one of these directives:
150+
151+
- `v-if`, `v-else-if`, or `v-else`
152+
- `v-for`
153+
- `v-slot`
154+
155+
If none of those directives are present then it will be rendered as a [native `<template>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template) instead.
156+
157+
A `<template>` with a `v-for` can also have a [`key` attribute](/api/built-in-special-attributes.html#key). All other attributes and directives will be discarded, as they aren't meaningful without a corresponding element.
158+
159+
Single-file components use a [top-level `<template>` tag](/api/sfc-spec.html#language-blocks) to wrap the entire template. That usage is separate from the use of `<template>` described above. That top-level tag is not part of the template itself and doesn't support template syntax, such as directives.
160+
161+
- **See also:**
162+
- [Guide - `v-if` on `<template>`](/guide/essentials/conditional.html#v-if-on-template)
163+
- [Guide - `v-for` on `<template>`](/guide/essentials/list.html#v-for-on-template)
164+
- [Guide - Named slots](/guide/components/slots.html#named-slots)

src/api/reactivity-core.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,34 @@ Watches one or more reactive data sources and invokes a callback function when t
453453
flush: 'post',
454454
onTrack(e) {
455455
debugger
456+
},
457+
onTrigger(e) {
458+
debugger
456459
}
457460
})
458461
```
459462
463+
Stopping the watcher:
464+
465+
```js
466+
const stop = watch(source, callback)
467+
468+
// when the watcher is no longer needed:
469+
stop()
470+
```
471+
472+
Side effect cleanup:
473+
474+
```js
475+
watch(id, async (newId, oldId, onCleanup) => {
476+
const { response, cancel } = doAsyncWork(newId)
477+
// `cancel` will be called if `id` changes, cancelling
478+
// the previous request if it hasn't completed yet
479+
onCleanup(cancel)
480+
data.value = await response
481+
})
482+
```
483+
460484
- **See also**:
461485
462486
- [Guide - Watchers](/guide/essentials/watchers.html)

0 commit comments

Comments
 (0)