diff --git a/.gitignore b/.gitignore index 8b7ec505e3..835b6798a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ + .DS_Store Thumbs.db db.json @@ -7,3 +8,5 @@ public/ .deploy*/ src/_drafts package-lock.json +.idea +.cache diff --git a/README.md b/README.md index 34710306eb..838dec5b98 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,9 @@ -# vuejs.org +

ar.vuejs.org

-This site is built with [hexo](http://hexo.io/). Site content is written in Markdown format located in `src`. Pull requests welcome! +

تم بناء هذا الموقع بواسطة hexo. تم كتابة محتوى الموقع بواسطة صياغة Markdown الموجود في ملف src. طلبات السحب مرحب بها!

-## Developing - -``` bash -$ npm install -$ npm start # dev server at http://localhost:4000 -``` +

التطوير

+
$ npm install
$ npm start # dev server at http://localhost:4000
## Deploying @@ -21,12 +17,9 @@ Translations for this documentation project are currently maintained in separate ### Arabic -Arabic translation is maintained by [Interstellar Club](https://github.com/InterstellarClub) +Arabic translation is maintained by [Vue.js AR](https://github.com/vuejs-ar) -* Translation Repo - [/interstellarClub/ar.vuejs.org](https://github.com/interstellarClub/ar.vuejs.org) -* Primary Maintainers : - * [Ilyes Chouia](https://github.com/celyes) - * [Ahmed Aissaoui](https://github.com/Aissaoui-Ahmed) +* Translation Repo - [/vuejs-ar/ar.vuejs.org](https://github.com/vuejs-ar/ar.vuejs.org) ### French diff --git a/package.json b/package.json index 030bfdfb41..653846d76a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vuejs.org", "private": true, "hexo": { - "version": "3.8.0" + "version": "3.9.0" }, "scripts": { "start": "hexo server", @@ -29,4 +29,4 @@ "hoek": "^6.1.2", "request": "^2.85.0" } -} +} \ No newline at end of file diff --git a/src/coc/index.md b/src/coc/index.md index fd53230a08..a32d04b191 100644 --- a/src/coc/index.md +++ b/src/coc/index.md @@ -1,4 +1,4 @@ -# Code Of Conduct +# القواعد السلوكية ## Our Pledge diff --git a/src/images/search-by-algolia.png b/src/images/search-by-algolia.png index 94e435328b..474d28f1e2 100644 Binary files a/src/images/search-by-algolia.png and b/src/images/search-by-algolia.png differ diff --git a/src/perf/index.md b/src/perf/index.md index 7a2fdc3d37..975179402b 100644 --- a/src/perf/index.md +++ b/src/perf/index.md @@ -1,5 +1,5 @@ --- -title: Performance Comparisons +title: مقارنات الاداء --- ## TodoMVC Benchmark diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 81fa7ce5b7..91e31d714e 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -1,33 +1,33 @@ --- -title: API +title: واجهة برمجة التطبيقات (API) type: api --- -## Global Config +## الاعدادات العامة -`Vue.config` is an object containing Vue's global configurations. You can modify its properties listed below before bootstrapping your application: +`Vue.config` هو كائن يحتوي على إعدادات Vue العامة والمتوفرة لجميع العناصر الأخرى. يمكنك أن تغير خصائصه المذكورة بالأسفل قبل أن تقوم ببدء تطبيقك: ### silent -- **Type:** `boolean` +- **النوع:** `boolean` -- **Default:** `false` +- **القيمة الافتراضية:** `false` -- **Usage:** +- **طريقة الاستخدام:** ``` js Vue.config.silent = true ``` - Suppress all Vue logs and warnings. + منع ظهور جميع سجلات وتحذيرات Vue. ### optionMergeStrategies -- **Type:** `{ [key: string]: Function }` +- **النوع:** `{ [key: string]: Function }` -- **Default:** `{}` +- **القيمة الافتراضية:** `{}` -- **Usage:** +- **طريقة الاستخدام:** ``` js Vue.config.optionMergeStrategies._my_option = function (parent, child, vm) { @@ -49,26 +49,26 @@ type: api ### devtools -- **Type:** `boolean` +- **النوع:** `boolean` -- **Default:** `true` (`false` in production builds) +- **القيمة الافتراضية:** `true` (`false` في وضع الاخراج النهائي) -- **Usage:** +- **طريقة الاستخدام:** ``` js // make sure to set this synchronously immediately after loading Vue Vue.config.devtools = true ``` - Configure whether to allow [vue-devtools](https://github.com/vuejs/vue-devtools) inspection. This option's default value is `true` in development builds and `false` in production builds. You can set it to `true` to enable inspection for production builds. + اعداد يسمح لـ[ادوات مطوري Vue](https://github.com/vuejs/vue-devtools) بالعمل في وضع فحص المستعرض (inspection). القيمة الافتراضية لهذا الاعداد هي `true` في وضع التطوير و `false` في وضع الاخراج النهائي. كما يمكنك جعلها `true` للسماح بتشغيلها في وضع الاخراج النهائي. ### errorHandler -- **Type:** `Function` +- **النوع:** `Function` -- **Default:** `undefined` +- **القيمة الافتراضية:** `undefined` -- **Usage:** +- **طريقة الاستخدام:** ``` js Vue.config.errorHandler = function (err, vm, info) { @@ -90,13 +90,13 @@ type: api ### warnHandler -> New in 2.4.0+ +جديد في الاصدار 2.4.0+ -- **Type:** `Function` +- **النوع:** `Function` -- **Default:** `undefined` +- **القيمة الافتراضية:** `undefined` -- **Usage:** +- **طريقة الاستخدام:** ``` js Vue.config.warnHandler = function (msg, vm, trace) { @@ -108,11 +108,11 @@ type: api ### ignoredElements -- **Type:** `Array` +- **النوع:** `Array` -- **Default:** `[]` +- **القيمة الافتراضية:** `[]` -- **Usage:** +- **طريقة الاستخدام:** ``` js Vue.config.ignoredElements = [ @@ -128,11 +128,11 @@ type: api ### keyCodes -- **Type:** `{ [key: string]: number | Array }` +- **النوع:** `{ [key: string]: number | Array }` -- **Default:** `{}` +- **القيمة الافتراضية:** `{}` -- **Usage:** +- **طريقة الاستخدام:** ``` js Vue.config.keyCodes = { @@ -154,25 +154,25 @@ type: api ### performance -> New in 2.2.0+ +> جديد في الاصدار 2.2.0+ -- **Type:** `boolean` +- **النوع:** `boolean` -- **Default:** `false (from 2.2.3+)` +- **القيمة الافتراضية:** `false (from 2.2.3+)` -- **Usage**: +- **طريقة الاستخدام**: Set this to `true` to enable component init, compile, render and patch performance tracing in the browser devtool performance/timeline panel. Only works in development mode and in browsers that support the [performance.mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) API. ### productionTip -> New in 2.2.0+ +جديد في الاصدار 2.2.0+ -- **Type:** `boolean` +- **النوع:** `boolean` -- **Default:** `true` +- **القيمة الافتراضية:** `true` -- **Usage**: +- **طريقة الاستخدام**: Set this to `false` to prevent the production tip on Vue startup. @@ -183,7 +183,7 @@ type: api - **Arguments:** - `{Object} options` -- **Usage:** +- **طريقة الاستخدام:** Create a "subclass" of the base Vue constructor. The argument should be an object containing component options. @@ -223,7 +223,7 @@ type: api - `{Function} [callback]` - `{Object} [context]` -- **Usage:** +- **طريقة الاستخدام:** Defer the callback to be executed after the next DOM update cycle. Use it immediately after you've changed some data to wait for the DOM update. @@ -242,7 +242,7 @@ type: api }) ``` - > New in 2.1.0+: returns a Promise if no callback is provided and Promise is supported in the execution environment. Please note that Vue does not come with a Promise polyfill, so if you target browsers that don't support Promises natively (looking at you, IE), you will have to provide a polyfill yourself. + جديد في الاصدار 2.1.0+: returns a Promise if no callback is provided and Promise is supported in the execution environment. Please note that Vue does not come with a Promise polyfill, so if you target browsers that don't support Promises natively (looking at you, IE), you will have to provide a polyfill yourself. - **See also:** [Async Update Queue](../guide/reactivity.html#Async-Update-Queue) @@ -255,7 +255,7 @@ type: api - **Returns:** the set value. -- **Usage:** +- **طريقة الاستخدام:** Adds a property to a reactive object, ensuring the new property is also reactive, so triggers view updates. This must be used to add new properties to reactive objects, as Vue cannot detect normal property additions (e.g. `this.myObject.newProperty = 'hi'`). @@ -271,7 +271,7 @@ type: api > Only in 2.2.0+: Also works with Array + index. -- **Usage:** +- **طريقة الاستخدام:** Delete a property on an object. If the object is reactive, ensure the deletion triggers view updates. This is primarily used to get around the limitation that Vue cannot detect property deletions, but you should rarely need to use it. @@ -285,7 +285,7 @@ type: api - `{string} id` - `{Function | Object} [definition]` -- **Usage:** +- **طريقة الاستخدام:** Register or retrieve a global directive. @@ -316,7 +316,7 @@ type: api - `{string} id` - `{Function} [definition]` -- **Usage:** +- **طريقة الاستخدام:** Register or retrieve a global filter. @@ -338,7 +338,7 @@ type: api - `{string} id` - `{Function | Object} [definition]` -- **Usage:** +- **طريقة الاستخدام:** Register or retrieve a global component. Registration also automatically sets the component's `name` with the given `id`. @@ -360,7 +360,7 @@ type: api - **Arguments:** - `{Object | Function} plugin` -- **Usage:** +- **طريقة الاستخدام:** Install a Vue.js plugin. If the plugin is an Object, it must expose an `install` method. If it is a function itself, it will be treated as the install method. The install method will be called with Vue as the argument. @@ -375,7 +375,7 @@ type: api - **Arguments:** - `{Object} mixin` -- **Usage:** +- **طريقة الاستخدام:** Apply a mixin globally, which affects every Vue instance created afterwards. This can be used by plugin authors to inject custom behavior into components. **Not recommended in application code**. @@ -386,7 +386,7 @@ type: api - **Arguments:** - `{string} template` -- **Usage:** +- **طريقة الاستخدام:** Compiles a template string into a render function. **Only available in the full build.** @@ -406,12 +406,12 @@ type: api ### Vue.observable( object ) -> New in 2.6.0+ +جديد في الاصدار 2.6.0+ - **Arguments:** - `{Object} object` -- **Usage:** +- **طريقة الاستخدام:** Make an object reactive. Internally, Vue uses this on the object returned by the `data` function. @@ -437,7 +437,7 @@ type: api - **Details**: Provides the installed version of Vue as a string. This is especially useful for community plugins and components, where you might use different strategies for different versions. -- **Usage**: +- **طريقة الاستخدام**: ```js var version = Number(Vue.version.split('.')[0]) @@ -455,7 +455,7 @@ type: api ### data -- **Type:** `Object | Function` +- **النوع:** `Object | Function` - **Restriction:** Only accepts `Function` when used in a component definition. @@ -503,7 +503,7 @@ type: api ### props -- **Type:** `Array | Object` +- **النوع:** `Array | Object` - **Details:** @@ -548,7 +548,7 @@ type: api ### propsData -- **Type:** `{ [key: string]: any }` +- **النوع:** `{ [key: string]: any }` - **Restriction:** only respected in instance creation via `new`. @@ -573,7 +573,7 @@ type: api ### computed -- **Type:** `{ [key: string]: Function | { get: Function, set: Function } }` +- **النوع:** `{ [key: string]: Function | { get: Function, set: Function } }` - **Details:** @@ -620,7 +620,7 @@ type: api ### methods -- **Type:** `{ [key: string]: Function }` +- **النوع:** `{ [key: string]: Function }` - **Details:** @@ -647,7 +647,7 @@ type: api ### watch -- **Type:** `{ [key: string]: string | Function | Object | Array}` +- **النوع:** `{ [key: string]: string | Function | Object | Array}` - **Details:** @@ -707,7 +707,7 @@ type: api ### el -- **Type:** `string | Element` +- **النوع:** `string | Element` - **Restriction:** only respected in instance creation via `new`. @@ -729,7 +729,7 @@ type: api ### template -- **Type:** `string` +- **النوع:** `string` - **Details:** @@ -747,7 +747,7 @@ type: api ### render - - **Type:** `(createElement: () => VNode) => VNode` + - **النوع:** `(createElement: () => VNode) => VNode` - **Details:** @@ -761,9 +761,9 @@ type: api ### renderError -> New in 2.2.0+ +جديد في الاصدار 2.2.0+ - - **Type:** `(createElement: () => VNode, error: Error) => VNode` + - **النوع:** `(createElement: () => VNode, error: Error) => VNode` - **Details:** @@ -792,7 +792,7 @@ type: api ### beforeCreate -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -802,7 +802,7 @@ type: api ### created -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -812,7 +812,7 @@ type: api ### beforeMount -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -824,7 +824,7 @@ type: api ### mounted -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -847,7 +847,7 @@ type: api ### beforeUpdate -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -859,7 +859,7 @@ type: api ### updated -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -884,7 +884,7 @@ type: api ### activated -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -898,7 +898,7 @@ type: api ### deactivated -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -912,7 +912,7 @@ type: api ### beforeDestroy -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -924,7 +924,7 @@ type: api ### destroyed -- **Type:** `Function` +- **النوع:** `Function` - **Details:** @@ -936,9 +936,9 @@ type: api ### errorCaptured -> New in 2.5.0+ +جديد في الاصدار 2.5.0+ -- **Type:** `(err: Error, vm: Component, info: string) => ?boolean` +- **النوع:** `(err: Error, vm: Component, info: string) => ?boolean` - **Details:** @@ -960,7 +960,7 @@ type: api ### directives -- **Type:** `Object` +- **النوع:** `Object` - **Details:** @@ -970,7 +970,7 @@ type: api ### filters -- **Type:** `Object` +- **النوع:** `Object` - **Details:** @@ -980,7 +980,7 @@ type: api ### components -- **Type:** `Object` +- **النوع:** `Object` - **Details:** @@ -992,7 +992,7 @@ type: api ### parent -- **Type:** `Vue instance` +- **النوع:** `Vue instance` - **Details:** @@ -1002,7 +1002,7 @@ type: api ### mixins -- **Type:** `Array` +- **النوع:** `Array` - **Details:** @@ -1028,7 +1028,7 @@ type: api ### extends -- **Type:** `Object | Function` +- **النوع:** `Object | Function` - **Details:** @@ -1050,9 +1050,9 @@ type: api ### provide / inject -> New in 2.2.0+ +جديد في الاصدار 2.2.0+ -- **Type:** +- **النوع:** - **provide:** `Object | () => Object` - **inject:** `Array | { [key: string]: string | Symbol | Object }` @@ -1181,7 +1181,7 @@ type: api ### name -- **Type:** `string` +- **النوع:** `string` - **Restriction:** only respected when used as a component option. @@ -1193,9 +1193,9 @@ type: api ### delimiters -- **Type:** `Array` +- **النوع:** `Array` -- **Default:** `{% raw %}["{{", "}}"]{% endraw %}` +- **القيمة الافتراضية:** `{% raw %}["{{", "}}"]{% endraw %}` - **Restrictions:** This option is only available in the full build, with in-browser compilation. @@ -1215,7 +1215,7 @@ type: api ### functional -- **Type:** `boolean` +- **النوع:** `boolean` - **Details:** @@ -1225,9 +1225,9 @@ type: api ### model -> New in 2.2.0 +جديد في الاصدار 2.2.0 -- **Type:** `{ prop?: string, event?: string }` +- **النوع:** `{ prop?: string, event?: string }` - **Details:** @@ -1270,11 +1270,11 @@ type: api ### inheritAttrs -> New in 2.4.0+ +جديد في الاصدار 2.4.0+ -- **Type:** `boolean` +- **النوع:** `boolean` -- **Default:** `true` +- **القيمة الافتراضية:** `true` - **Details:** @@ -1284,11 +1284,11 @@ type: api ### comments -> New in 2.4.0+ +جديد في الاصدار 2.4.0+ -- **Type:** `boolean` +- **النوع:** `boolean` -- **Default:** `false` +- **القيمة الافتراضية:** `false` - **Restrictions:** This option is only available in the full build, with in-browser compilation. @@ -1300,7 +1300,7 @@ type: api ### vm.$data -- **Type:** `Object` +- **النوع:** `Object` - **Details:** @@ -1310,9 +1310,9 @@ type: api ### vm.$props -> New in 2.2.0+ +جديد في الاصدار 2.2.0+ -- **Type:** `Object` +- **النوع:** `Object` - **Details:** @@ -1320,7 +1320,7 @@ type: api ### vm.$el -- **Type:** `Element` +- **النوع:** `Element` - **Read only** @@ -1330,7 +1330,7 @@ type: api ### vm.$options -- **Type:** `Object` +- **النوع:** `Object` - **Read only** @@ -1349,7 +1349,7 @@ type: api ### vm.$parent -- **Type:** `Vue instance` +- **النوع:** `Vue instance` - **Read only** @@ -1359,7 +1359,7 @@ type: api ### vm.$root -- **Type:** `Vue instance` +- **النوع:** `Vue instance` - **Read only** @@ -1369,7 +1369,7 @@ type: api ### vm.$children -- **Type:** `Array` +- **النوع:** `Array` - **Read only** @@ -1379,7 +1379,7 @@ type: api ### vm.$slots -- **Type:** `{ [name: string]: ?Array }` +- **النوع:** `{ [name: string]: ?Array }` - **Read only** @@ -1431,9 +1431,9 @@ type: api ### vm.$scopedSlots -> New in 2.1.0+ +جديد في الاصدار 2.1.0+ -- **Type:** `{ [name: string]: props => Array | undefined }` +- **النوع:** `{ [name: string]: props => Array | undefined }` - **Read only** @@ -1456,7 +1456,7 @@ type: api ### vm.$refs -- **Type:** `Object` +- **النوع:** `Object` - **Read only** @@ -1470,7 +1470,7 @@ type: api ### vm.$isServer -- **Type:** `boolean` +- **النوع:** `boolean` - **Read only** @@ -1482,9 +1482,9 @@ type: api ### vm.$attrs -> New in 2.4.0+ +جديد في الاصدار 2.4.0+ -- **Type:** `{ [key: string]: string }` +- **النوع:** `{ [key: string]: string }` - **Read only** @@ -1494,9 +1494,9 @@ type: api ### vm.$listeners -> New in 2.4.0+ +جديد في الاصدار 2.4.0+ -- **Type:** `{ [key: string]: Function | Array }` +- **النوع:** `{ [key: string]: Function | Array }` - **Read only** @@ -1517,7 +1517,7 @@ type: api - **Returns:** `{Function} unwatch` -- **Usage:** +- **طريقة الاستخدام:** Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression only accepts dot-delimited paths. For more complex expressions, use a function instead. @@ -1614,7 +1614,7 @@ type: api - **Returns:** the set value. -- **Usage:** +- **طريقة الاستخدام:** This is the **alias** of the global `Vue.set`. @@ -1626,7 +1626,7 @@ type: api - `{Object | Array} target` - `{string | number} propertyName/index` -- **Usage:** +- **طريقة الاستخدام:** This is the **alias** of the global `Vue.delete`. @@ -1640,7 +1640,7 @@ type: api - `{string | Array} event` (array only supported in 2.2.0+) - `{Function} callback` -- **Usage:** +- **طريقة الاستخدام:** Listen for a custom event on the current vm. Events can be triggered by `vm.$emit`. The callback will receive all the additional arguments passed into these event-triggering methods. @@ -1660,7 +1660,7 @@ type: api - `{string} event` - `{Function} callback` -- **Usage:** +- **طريقة الاستخدام:** Listen for a custom event, but only once. The listener will be removed once it triggers for the first time. @@ -1670,7 +1670,7 @@ type: api - `{string | Array} event` (array only supported in 2.2.2+) - `{Function} [callback]` -- **Usage:** +- **طريقة الاستخدام:** Remove custom event listener(s). @@ -1823,7 +1823,7 @@ type: api - **Returns:** `vm` - the instance itself -- **Usage:** +- **طريقة الاستخدام:** If a Vue instance didn't receive the `el` option at instantiation, it will be in "unmounted" state, without an associated DOM element. `vm.$mount()` can be used to manually start the mounting of an unmounted Vue instance. @@ -1855,7 +1855,7 @@ type: api ### vm.$forceUpdate() -- **Usage:** +- **طريقة الاستخدام:** Force the Vue instance to re-render. Note it does not affect all child components, only the instance itself and child components with inserted slot content. @@ -1864,11 +1864,11 @@ type: api - **Arguments:** - `{Function} [callback]` -- **Usage:** +- **طريقة الاستخدام:** Defer the callback to be executed after the next DOM update cycle. Use it immediately after you've changed some data to wait for the DOM update. This is the same as the global `Vue.nextTick`, except that the callback's `this` context is automatically bound to the instance calling this method. - > New in 2.1.0+: returns a Promise if no callback is provided and Promise is supported in the execution environment. Please note that Vue does not come with a Promise polyfill, so if you target browsers that don't support Promises natively (looking at you, IE), you will have to provide a polyfill yourself. + جديد في الاصدار 2.1.0+: returns a Promise if no callback is provided and Promise is supported in the execution environment. Please note that Vue does not come with a Promise polyfill, so if you target browsers that don't support Promises natively (looking at you, IE), you will have to provide a polyfill yourself. - **Example:** @@ -1897,7 +1897,7 @@ type: api ### vm.$destroy() -- **Usage:** +- **طريقة الاستخدام:** Completely destroy a vm. Clean up its connections with other existing vms, unbind all its directives, turn off all event listeners. @@ -1951,7 +1951,7 @@ type: api - **Expects:** `any` -- **Usage:** +- **طريقة الاستخدام:** Toggles the element's `display` CSS property based on the truthy-ness of the expression value. @@ -1963,7 +1963,7 @@ type: api - **Expects:** `any` -- **Usage:** +- **طريقة الاستخدام:** Conditionally render the element based on the truthy-ness of the expression value. The element and its contained directives / components are destroyed and re-constructed during toggles. If the element is a `