Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa-nematpour committed Jan 1, 2024
2 parents 4cebea7 + e19c6be commit ba71d95
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/api/compile-time-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -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__` <sup class="vt-badge" data-text="3.4+" />
## `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` <sup class="vt-badge" data-text="3.4+" /> {#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):

Expand All @@ -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:

Expand All @@ -70,7 +70,7 @@ module.exports = {
}
```

### webpack
### webpack {#webpack}

Flags should be defined using webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/):

Expand All @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion src/api/sfc-script-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions src/guide/components/v-model.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Component v-model {#component-v-model}

## استفاده پایه
## استفاده پایه {#basic-usage}

با استفاده از `v-model` روی یک کامپوننت می‌توان یک اتصال دوطرفه ایجاد کرد.

Expand Down Expand Up @@ -49,7 +49,7 @@ const model = defineModel()

[مثال در Playground](https://play.vuejs.org/#eNqFUtFKwzAU/ZWYl06YLbK30Q10DFSYigq+5KW0t11mmoQknZPSf/cm3eqEsT0l555zuefmpKV3WsfbBuiUpjY3XDtiwTV6ziSvtTKOLNZcFKQ0qiZRnATkG6JB0BIDJen2kp5iMlfSOlLbisw8P4oeQAhFPpURxVV0zWSa9PNwEgIHtRaZA0SEpOvbeduG5q5LE0Sh2jvZ3tSqADFjFHlGSYJkmhz10zF1FseXvIo3VklcrfX9jOaq1lyAedGOoz1GpyQwnsvQ3fdTqDnTwPhQz9eQf52ob+zO1xh9NWDBbIHRgXOZqcD19PL9GXZ4H0h03whUnyHfwCrReI+97L6RBdo+0gW3j+H9uaw+7HLnQNrDUt6oV3ZBzyhmsjiz+p/dSTwJfUx2+IpD1ic+xz5enwQGXEDJJaw8Gl2I1upMzlc/hEvdOBR6SNKAjqP1J6P/o6XdL11L5h4=)

### در زیر پوسته
### در زیر پوسته {#under-the-hood}

`defineModel` یک ماکرو میانبر است. کامپایلر آن را برای موارد زیر توسعه می‌دهد:

Expand Down
2 changes: 1 addition & 1 deletion src/guide/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ footer: false

:::info شما در حال خواندن مستندات نسخه ۳ از Vue هستید!

- پشتیبانی نسخه ۲ در تاریخ ۱۰ دی ۱۴۰۲ به اتمام می‌رسد. درباره [تداوم نسخه‌ی پایدار ۲](https://v2.vuejs.org/lts/) بیشتر بدانید.
- پشتیبانی نسخه ۲ در تاریخ **۱۰ دی ۱۴۰۲** به اتمام رسید. درباره [Vue 2 EOL](https://v2.vuejs.org/eol/) بیشتر بدانید.
- مستندات نسخه ۲ به [v2.vuejs.org](https://v2.vuejs.org/) منتقل شده است.
- درحال ارتقا از نسخه ۲ هستید؟ [راهنمای مهاجرت](https://v3-migration.vuejs.org/) را مطالعه کنید.
:::
Expand Down
4 changes: 3 additions & 1 deletion src/guide/typescript/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default defineComponent({
### استفاده در کامپوننت‌های تک فایلی {#usage-in-single-file-components}

برای استفاده از TypeScript در کامپوننت‌های تک فایلی (Single-File Components)، ویژگی `lang="ts"` را به تگ `<script>` اضافه کنید. وقتی `lang="ts"` موجود است، همه عبارات قالب نیز از یک بررسی نوع دقیق‌تر بهره‌مند می‌شوند.

```vue
<script lang="ts">
import { defineComponent } from 'vue'
Expand Down Expand Up @@ -209,9 +210,10 @@ let x: string | number = 1
در صورت استفاده از Vue CLI یا یک پیکربندی مبتنی بر webpack، استفاده از TypeScript در عبارات قالب نیاز به `vue-loader@^16.8.0` دارد.
:::

### استفاده از TSX
### استفاده از TSX {#usage-with-tsx}

Vue نیز از نوشتن کامپوننت‌ها با استفاده از JSX / TSX پشتیبانی می‌کند. جزئیات مربوط به این موضوع در راهنمای [تابع رندر و JSX](/guide/extras/render-function.html#jsx-tsx) توضیح داده شده است.

## کامپوننت‌های جنریک {#generic-components}

کامپوننت‌های جنریک در دو حالت زیر پشتیبانی می‌شوند:
Expand Down

0 comments on commit ba71d95

Please sign in to comment.