diff --git a/_config.yml b/_config.yml index a0ba1bd4c2..a7409f7b45 100644 --- a/_config.yml +++ b/_config.yml @@ -5,15 +5,15 @@ # Site title: Vue.js subtitle: -description: "The Progressive JavaScript Framework" +description: "Kademeli JavaScript Uygulama Çerçevesi" author: Evan You email: language: # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' -url: https://vuejs.org -root: / +url: https://animyrch.github.io/tr.vuejs.org/ +root: /tr.vuejs.org/ permalink: :year/:month/:day/:title/ tag_dir: tags archive_dir: archives @@ -139,7 +139,7 @@ offline: ## Docs: http://zespia.tw/hexo/docs/deployment.html deploy: type: git - repository: git@github.com:vuejs/vuejs.org.git + repository: git@github.com:animyrch/tr.vuejs.org.git feed: type: atom diff --git a/src/v2/guide/index.md b/src/v2/guide/index.md index 379bddd78f..8541a7b22c 100644 --- a/src/v2/guide/index.md +++ b/src/v2/guide/index.md @@ -1,48 +1,48 @@ --- -title: Introduction +title: Giriş type: guide order: 2 --- -## What is Vue.js? +## Vue.js nedir? -Vue (pronounced /vjuː/, like **view**) is a **progressive framework** for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with [modern tooling](single-file-components.html) and [supporting libraries](https://github.com/vuejs/awesome-vue#components--libraries). +Vue (/viyuv/ şeklinde telaffuz edilir, İngilizcedeki view kelimesi gibi) kullanıcı arayüzleri oluşturmayı sağlayan kademeli bir uygulama çerçevesidir (framework). Yazılım geliştirme ortamının her alanına nüfus eden diğer uygulama çerçevelerinin aksine Vue, basit bir temel üzerine inşa edildiğinden kademeli olarak kullanılabilir. Ana kütüphane yalnızca görüntüleme katmanına odaklanmaktadır. Öğrenmesi kolay olup diğer kütüphanelere ve mevcut projelere entegre edilebilir. Diğer taraftan, Vue [modern dosya yönetimi](single-file-components.html) ve [destekleyici kütüphaneler](https://github.com/vuejs/awesome-vue#components--libraries) eşliğinde sofistike Tek Sayfa Uygulamalar yaratmak için tamamen uygundur. -If you’d like to learn more about Vue before diving in, we created a video walking through the core principles and a sample project. +Eğer Vue öğrenmeye başlamadan önce daha fazla bilgi edinmek isterseniz, bu teknolojinin temel prensiplerinin dile getirildiği ve örnek bir projenin sunulduğu bir video hazırladık. -If you are an experienced frontend developer and want to know how Vue compares to other libraries/frameworks, check out the [Comparison with Other Frameworks](comparison.html). +Eğer kullanıcı arayüzü programcılığı alanında deneyimli iseniz ve Vue'nin diğer kütüphaneler/uygulama çerçevelerine göre bir karşılaştırmasını görmek istiyorsanız [Diğer Uygulama Çerçeveleri ile Karşılaştırma](comparison.html) sayfasına bakınız. -
+ -## Getting Started +## İlk Adımlar -Installation +Kurulum -The official guide assumes intermediate level knowledge of HTML, CSS, and JavaScript. If you are totally new to frontend development, it might not be the best idea to jump right into a framework as your first step - grasp the basics then come back! Prior experience with other frameworks helps, but is not required.
+Sitemiz üzerinde sunulan kılavuz HTML, CSS ve JavaScript alanlarında orta seviye bilgiye sahip olduğunuzu varsaymaktadır. Eğer kullanıcı arayüzü programcılığına yeni giriş yapıyorsanız ilk adım olarak bir uygulama çerçevesi öğrenmeye çalışmak doğru olmayabilir. Öncelikle o alanlardaki temel bilgileri öğrenin. Ardından bu kılavuza geri dönebilirsiniz! Diğer uygulama çerçeveleri alanında deneyim işinize yarayacaktır ancak zorunlu değildir.
-The easiest way to try out Vue.js is using the [JSFiddle Hello World example](https://jsfiddle.net/chrisvfritz/50wL7mdz/). Feel free to open it in another tab and follow along as we go through some basic examples. Or, you can create anindex.html
file and include Vue with:
+Vue.js'i denemenin en kolay yolu [JSFiddle Hello World örneği](https://jsfiddle.net/chrisvfritz/50wL7mdz/).'ne bakmaktır. Bu sayfayı başka bir sekmede açarsanız değineceğimiz birtakım basit örneklere daha yakından göz atabilirsiniz. Veya bir index.html
sayfası oluşturduktan sonra Vue'yi aşağıdaki bağlantı ile projeye dâhil edebilirsiniz:
``` html
-
+
```
-or:
+veya:
``` html
-
+
```
-The [Installation](installation.html) page provides more options of installing Vue. Note: We **do not** recommend that beginners start with `vue-cli`, especially if you are not yet familiar with Node.js-based build tools.
+[Kurulum](installation.html) sayfası Vue'nin kurulumuna dair ilave seçenekleri açıklar. Not: Özellikle Node.js bazlı proje kurma araçlarına henüz alışkın değilseniz başlangıç seviyesinde `vue-cli` kullanmanızı tavsiye **etmiyoruz**.
-If you prefer something more interactive, you can also check out [this tutorial series on Scrimba](https://scrimba.com/playlist/pXKqta), which gives you a mix of screencast and code playground that you can pause and play around with anytime.
+Eğer daha etkileşimli bir ortamı tercih ederseniz, bir taraftan ekran paylaşımlı ders diğer taraftan dilediğiniz anda durdurup kodu değiştirebileceğiniz bir deney ortamı sunan [şu Scrimba ders serisine](https://scrimba.com/playlist/pXKqta) göz atabilirsiniz.
-## Declarative Rendering
+## Beyansal Görüntüleme
-
+
-At the core of Vue.js is a system that enables us to declaratively render data to the DOM using straightforward template syntax:
+Verileri basit bir şablon sentaksı kullanarak DOM'a beyansal olarak yansıtmayı sağlayan bir sistem Vue.js'nin kalbinde yatmaktadır:
``` html
{{ message }}
- +{{ message }}
- +Video by Vue Mastery. Watch Vue Mastery’s free Intro to Vue course.
Vue Mastery videosu. Vue Mastery’nin ücretsiz Vue’ye giriş dersini izleyin.
The CLI assumes prior knowledge of Node.js and the associated build tools. If you are new to Vue or front-end build tools, we strongly suggest going through the guide without any build tools before using the CLI.
+CLI, Node.js ve ilişkili proje kurma araçları hakkında bilgiye sahip olduğunuzu var sayar. Eğer Vue veya genel olarak kullanıcı arayüzüne yönelik proje kurma araçları sizin için yeni bir konsept ise CLI’yi kullanmadan önce herhangi bir proje kurma aracı kullanmadan kılavuzu kılavuzu baştan sona okumanızı şiddetle tavsiye ederiz.
- + -## Explanation of Different Builds +## Farklı Sürümlere dair Açıklamalar -In the [`dist/` directory of the NPM package](https://cdn.jsdelivr.net/npm/vue/dist/) you will find many different builds of Vue.js. Here's an overview of the difference between them: +[NPM paketinin `dist/` klasöründe](https://cdn.jsdelivr.net/npm/vue/dist/) Vue.js’nin birçok farklı sürümünü bulabilirsiniz. Bu sürümler arasındaki farkların bir özetini aşağıda bulabilirsiniz: -| | UMD | CommonJS | ES Module (for bundlers) | ES Module (for browsers) | +| | UMD | CommonJS | ES Module (paketleyiciler için) | ES Module (tarayıcılar için) | | --- | --- | --- | --- | --- | -| **Full** | vue.js | vue.common.js | vue.esm.js | vue.esm.browser.js | -| **Runtime-only** | vue.runtime.js | vue.runtime.common.js | vue.runtime.esm.js | - | -| **Full (production)** | vue.min.js | - | - | vue.esm.browser.min.js | -| **Runtime-only (production)** | vue.runtime.min.js | - | - | - | +| **Tam** | vue.js | vue.common.js | vue.esm.js | vue.esm.browser.js | +| **Yalnızca yürütme** | vue.runtime.js | vue.runtime.common.js | vue.runtime.esm.js | - | +| **Tam (son kullanıcı için)** | vue.min.js | - | - | vue.esm.browser.min.js | +| **Yalnızca yürütme (son kullanıcı için)** | vue.runtime.min.js | - | - | - | -### Terms +### Terimler -- **Full**: builds that contain both the compiler and the runtime. +- **Tam**: İçeriğinde hem derleyiciyi hem de yürütme ortamını barındıran sürümler. -- **Compiler**: code that is responsible for compiling template strings into JavaScript render functions. +- **Derleyici**: Şablon dizgilerinin JavaScript modelleme fonksiyonlarına dönüştürmekten sorumlu kod. -- **Runtime**: code that is responsible for creating Vue instances, rendering and patching virtual DOM, etc. Basically everything minus the compiler. +- **Yürütme ortamı**: Vue örneklerinin oluşturulmasından, sanal DOM’un modellenmesi ve güncellenmesinden, vs. sorumlu kod. Bir başka deyişle derleyici hariç her şey. -- **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a ` {% endraw %} -The contents of the `span` will be replaced with the value of the `rawHtml` property, interpreted as plain HTML - data bindings are ignored. Note that you cannot use `v-html` to compose template partials, because Vue is not a string-based templating engine. Instead, components are preferred as the fundamental unit for UI reuse and composition. +`span` içerisindeki metin `rawHtml` özelliğinin değeri ile değiştirilecektir ve bu metin saf HTML olarak yorumlanacak olup veri bağları dikkate alınmayacaktır. `v-html` direktifi içerisinde dinamik şablon oluşturmak mümkün değildir zira Vue, dizgi tabanlı bir şablon motoru değildir. Bunun yerine kullanıcı arayüzü elemanlarının yeniden kullanımı ve birlikte kullanımına yönelik temel birim olarak bileşenler kullanılmaktadır. -Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS vulnerabilities](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use HTML interpolation on trusted content and **never** on user-provided content.
+İçeriği belirsiz HTML girdilerinin internet sitenizde dinamik olarak modellenmesi son derece tehlikeli olabilir zira kolayca [XSS zafiyetleri](https://tr.wikipedia.org/wiki/Siteler_aras%C4%B1_betik_%C3%A7al%C4%B1%C5%9Ft%C4%B1rma) ile sonuçlanabilir. HTML değerlerinin takibi işlevini yalnızca güvenilir içerikler üzerinde kullanın ve **asla** kullanıcı tarafından temin edilen içerik üzerinde kullanmayın.<Çp> -### Attributes +### HTML Nitelikleri -Mustaches cannot be used inside HTML attributes. Instead, use a [v-bind directive](../api/#v-bind): +HTML nitelikleri içerisinde bıyık sentaksı kullanılamaz. Bunun yerine [v-bind direktifini](../api/#v-bind) kullanın: ``` html -
+ ``` -In the case of boolean attributes, where their mere existence implies `true`, `v-bind` works a little differently. In this example: +Mevcut olmaları `true` anlamına gelen boole nitelikleri için `v-bind` biraz farklı faaliyet göstermektedir. Aşağıdaki örneğe bakalım: ``` html - + ``` -If `isButtonDisabled` has the value of `null`, `undefined`, or `false`, the `disabled` attribute will not even be included in the rendered `<%- partial('icons/play') %> - WHY VUE.JS? - ">GET STARTED + NEDEN VUE.JS? + ">ÖĞRENMEYE BAŞLAYIN <%- partial('icons/github-dark') %> GITHUB @@ -29,7 +29,7 @@
Already know HTML, CSS and JavaScript? Read the guide and start building things in no time!
+HTML, CSS ve JavaScript'e hakim misiniz? Kılavuzumuzu okuyarak projenize hızla başlayın!
An incrementally adoptable ecosystem that scales between a library and a full-featured framework.
+Projelerinizde bir kütüphaneden tam donanımlı bir uygulama çerçevesine kadar kademeli olarak kullanmaya başlayabileceğiniz bir ekosistem.
- 20KB min+gzip Runtime
- Blazing Fast Virtual DOM
- Minimal Optimization Efforts
+ Min+gzip 20KB Yürütme Ortamı
+ Yüksek Hızlı Sanal DOM
+ Asgari Optimizasyon İhtiyacı
- You can read the previous issues and listen to our podcast at news.vuejs.org. + Geçmişteki yayınları okumak ve podcastımızı dinlemek için news.vuejs.org adresini ziyaret edin.
Released under the MIT License
- Copyright © 2014-<%- new Date().getFullYear() %> Evan You
MIT Lisansı çerçevesinde yayınlanmaktadır
+ Telif Hakkı © 2014-<%- new Date().getFullYear() %> Evan You
Video by Vue Mastery. Watch Vue Mastery’s free Intro to Vue course. +
Vue Mastery videosu. Vue Mastery’nin ücretsiz Vue’ye giriş dersini izleyin.
, or missing
. Bailing hydration and performing ' + + 'full client-side render.' + ); + } + } + // either not server-rendered, or hydration failed. + // create an empty node and replace it + oldVnode = emptyNodeAt(oldVnode); + } + + // replacing existing element + var oldElm = oldVnode.elm; + var parentElm = nodeOps.parentNode(oldElm); + + // create new node + createElm( + vnode, + insertedVnodeQueue, + // extremely rare edge case: do not insert if old element is in a + // leaving transition. Only happens when combining transition + + // keep-alive + HOCs. (#4590) + oldElm._leaveCb ? null : parentElm, + nodeOps.nextSibling(oldElm) + ); + + // update parent placeholder node element, recursively + if (isDef(vnode.parent)) { + var ancestor = vnode.parent; + var patchable = isPatchable(vnode); + while (ancestor) { + for (var i = 0; i < cbs.destroy.length; ++i) { + cbs.destroy[i](ancestor); + } + ancestor.elm = vnode.elm; + if (patchable) { + for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { + cbs.create[i$1](emptyNode, ancestor); + } + // #6513 + // invoke insert hooks that may have been merged by create hooks. + // e.g. for directives that uses the "inserted" hook. + var insert = ancestor.data.hook.insert; + if (insert.merged) { + // start at index 1 to avoid re-invoking component mounted hook + for (var i$2 = 1; i$2 < insert.fns.length; i$2++) { + insert.fns[i$2](); + } + } + } else { + registerRef(ancestor); + } + ancestor = ancestor.parent; + } + } + + // destroy old node + if (isDef(parentElm)) { + removeVnodes(parentElm, [oldVnode], 0, 0); + } else if (isDef(oldVnode.tag)) { + invokeDestroyHook(oldVnode); + } + } } - vnode = createEmptyVNode(); + + invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch); + return vnode.elm + } + } + + /* */ + + var directives = { + create: updateDirectives, + update: updateDirectives, + destroy: function unbindDirectives (vnode) { + updateDirectives(vnode, emptyNode); } - // set parent - vnode.parent = _parentVnode; - return vnode }; -} -/* */ + function updateDirectives (oldVnode, vnode) { + if (oldVnode.data.directives || vnode.data.directives) { + _update(oldVnode, vnode); + } + } -var uid$3 = 0; + function _update (oldVnode, vnode) { + var isCreate = oldVnode === emptyNode; + var isDestroy = vnode === emptyNode; + var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context); + var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context); -function initMixin (Vue) { - Vue.prototype._init = function (options) { - var vm = this; - // a uid - vm._uid = uid$3++; + var dirsWithInsert = []; + var dirsWithPostpatch = []; - var startTag, endTag; - /* istanbul ignore if */ - if ("development" !== 'production' && config.performance && mark) { - startTag = "vue-perf-start:" + (vm._uid); - endTag = "vue-perf-end:" + (vm._uid); - mark(startTag); - } - - // a flag to avoid this being observed - vm._isVue = true; - // merge options - if (options && options._isComponent) { - // optimize internal component instantiation - // since dynamic options merging is pretty slow, and none of the - // internal component options needs special treatment. - initInternalComponent(vm, options); - } else { - vm.$options = mergeOptions( - resolveConstructorOptions(vm.constructor), - options || {}, - vm - ); + var key, oldDir, dir; + for (key in newDirs) { + oldDir = oldDirs[key]; + dir = newDirs[key]; + if (!oldDir) { + // new directive, bind + callHook$1(dir, 'bind', vnode, oldVnode); + if (dir.def && dir.def.inserted) { + dirsWithInsert.push(dir); + } + } else { + // existing directive, update + dir.oldValue = oldDir.value; + dir.oldArg = oldDir.arg; + callHook$1(dir, 'update', vnode, oldVnode); + if (dir.def && dir.def.componentUpdated) { + dirsWithPostpatch.push(dir); + } + } } - /* istanbul ignore else */ - { - initProxy(vm); - } - // expose real self - vm._self = vm; - initLifecycle(vm); - initEvents(vm); - initRender(vm); - callHook(vm, 'beforeCreate'); - initInjections(vm); // resolve injections before data/props - initState(vm); - initProvide(vm); // resolve provide after data/props - callHook(vm, 'created'); - /* istanbul ignore if */ - if ("development" !== 'production' && config.performance && mark) { - vm._name = formatComponentName(vm, false); - mark(endTag); - measure(("vue " + (vm._name) + " init"), startTag, endTag); + if (dirsWithInsert.length) { + var callInsert = function () { + for (var i = 0; i < dirsWithInsert.length; i++) { + callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode); + } + }; + if (isCreate) { + mergeVNodeHook(vnode, 'insert', callInsert); + } else { + callInsert(); + } } - if (vm.$options.el) { - vm.$mount(vm.$options.el); + if (dirsWithPostpatch.length) { + mergeVNodeHook(vnode, 'postpatch', function () { + for (var i = 0; i < dirsWithPostpatch.length; i++) { + callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); + } + }); } - }; -} - -function initInternalComponent (vm, options) { - var opts = vm.$options = Object.create(vm.constructor.options); - // doing this because it's faster than dynamic enumeration. - var parentVnode = options._parentVnode; - opts.parent = options.parent; - opts._parentVnode = parentVnode; - opts._parentElm = options._parentElm; - opts._refElm = options._refElm; - - var vnodeComponentOptions = parentVnode.componentOptions; - opts.propsData = vnodeComponentOptions.propsData; - opts._parentListeners = vnodeComponentOptions.listeners; - opts._renderChildren = vnodeComponentOptions.children; - opts._componentTag = vnodeComponentOptions.tag; - - if (options.render) { - opts.render = options.render; - opts.staticRenderFns = options.staticRenderFns; - } -} - -function resolveConstructorOptions (Ctor) { - var options = Ctor.options; - if (Ctor.super) { - var superOptions = resolveConstructorOptions(Ctor.super); - var cachedSuperOptions = Ctor.superOptions; - if (superOptions !== cachedSuperOptions) { - // super option changed, - // need to resolve new options. - Ctor.superOptions = superOptions; - // check if there are any late-modified/attached options (#4976) - var modifiedOptions = resolveModifiedOptions(Ctor); - // update base extend options - if (modifiedOptions) { - extend(Ctor.extendOptions, modifiedOptions); - } - options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions); - if (options.name) { - options.components[options.name] = Ctor; - } - } - } - return options -} - -function resolveModifiedOptions (Ctor) { - var modified; - var latest = Ctor.options; - var extended = Ctor.extendOptions; - var sealed = Ctor.sealedOptions; - for (var key in latest) { - if (latest[key] !== sealed[key]) { - if (!modified) { modified = {}; } - modified[key] = dedupe(latest[key], extended[key], sealed[key]); - } - } - return modified -} - -function dedupe (latest, extended, sealed) { - // compare latest and sealed to ensure lifecycle hooks won't be duplicated - // between merges - if (Array.isArray(latest)) { - var res = []; - sealed = Array.isArray(sealed) ? sealed : [sealed]; - extended = Array.isArray(extended) ? extended : [extended]; - for (var i = 0; i < latest.length; i++) { - // push original options and not sealed options to exclude duplicated options - if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) { - res.push(latest[i]); + + if (!isCreate) { + for (key in oldDirs) { + if (!newDirs[key]) { + // no longer present, unbind + callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy); + } } } - return res - } else { - return latest - } -} - -function Vue (options) { - if ("development" !== 'production' && - !(this instanceof Vue) - ) { - warn('Vue is a constructor and should be called with the `new` keyword'); } - this._init(options); -} -initMixin(Vue); -stateMixin(Vue); -eventsMixin(Vue); -lifecycleMixin(Vue); -renderMixin(Vue); + var emptyModifiers = Object.create(null); -/* */ - -function initUse (Vue) { - Vue.use = function (plugin) { - var installedPlugins = (this._installedPlugins || (this._installedPlugins = [])); - if (installedPlugins.indexOf(plugin) > -1) { - return this + function normalizeDirectives$1 ( + dirs, + vm + ) { + var res = Object.create(null); + if (!dirs) { + // $flow-disable-line + return res } - - // additional parameters - var args = toArray(arguments, 1); - args.unshift(this); - if (typeof plugin.install === 'function') { - plugin.install.apply(plugin, args); - } else if (typeof plugin === 'function') { - plugin.apply(null, args); + var i, dir; + for (i = 0; i < dirs.length; i++) { + dir = dirs[i]; + if (!dir.modifiers) { + // $flow-disable-line + dir.modifiers = emptyModifiers; + } + res[getRawDirName(dir)] = dir; + dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); } - installedPlugins.push(plugin); - return this - }; -} + // $flow-disable-line + return res + } -/* */ + function getRawDirName (dir) { + return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.'))) + } -function initMixin$1 (Vue) { - Vue.mixin = function (mixin) { - this.options = mergeOptions(this.options, mixin); - return this - }; -} + function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { + var fn = dir.def && dir.def[hook]; + if (fn) { + try { + fn(vnode.elm, dir, vnode, oldVnode, isDestroy); + } catch (e) { + handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook")); + } + } + } -/* */ + var baseModules = [ + ref, + directives + ]; -function initExtend (Vue) { - /** - * Each instance constructor, including Vue, has a unique - * cid. This enables us to create wrapped "child - * constructors" for prototypal inheritance and cache them. - */ - Vue.cid = 0; - var cid = 1; + /* */ - /** - * Class inheritance - */ - Vue.extend = function (extendOptions) { - extendOptions = extendOptions || {}; - var Super = this; - var SuperId = Super.cid; - var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {}); - if (cachedCtors[SuperId]) { - return cachedCtors[SuperId] + function updateAttrs (oldVnode, vnode) { + var opts = vnode.componentOptions; + if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) { + return } - - var name = extendOptions.name || Super.options.name; - if ("development" !== 'production' && name) { - validateComponentName(name); + if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) { + return + } + var key, cur, old; + var elm = vnode.elm; + var oldAttrs = oldVnode.data.attrs || {}; + var attrs = vnode.data.attrs || {}; + // clone observed objects, as the user probably wants to mutate it + if (isDef(attrs.__ob__)) { + attrs = vnode.data.attrs = extend({}, attrs); } - var Sub = function VueComponent (options) { - this._init(options); - }; - Sub.prototype = Object.create(Super.prototype); - Sub.prototype.constructor = Sub; - Sub.cid = cid++; - Sub.options = mergeOptions( - Super.options, - extendOptions - ); - Sub['super'] = Super; - - // For props and computed properties, we define the proxy getters on - // the Vue instances at extension time, on the extended prototype. This - // avoids Object.defineProperty calls for each instance created. - if (Sub.options.props) { - initProps$1(Sub); + for (key in attrs) { + cur = attrs[key]; + old = oldAttrs[key]; + if (old !== cur) { + setAttr(elm, key, cur); + } } - if (Sub.options.computed) { - initComputed$1(Sub); + // #4391: in IE9, setting type can reset value for input[type=radio] + // #6666: IE/Edge forces progress value down to 1 before setting a max + /* istanbul ignore if */ + if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { + setAttr(elm, 'value', attrs.value); + } + for (key in oldAttrs) { + if (isUndef(attrs[key])) { + if (isXlink(key)) { + elm.removeAttributeNS(xlinkNS, getXlinkProp(key)); + } else if (!isEnumeratedAttr(key)) { + elm.removeAttribute(key); + } + } } + } - // allow further extension/mixin/plugin usage - Sub.extend = Super.extend; - Sub.mixin = Super.mixin; - Sub.use = Super.use; - - // create asset registers, so extended classes - // can have their private assets too. - ASSET_TYPES.forEach(function (type) { - Sub[type] = Super[type]; - }); - // enable recursive self-lookup - if (name) { - Sub.options.components[name] = Sub; + function setAttr (el, key, value) { + if (el.tagName.indexOf('-') > -1) { + baseSetAttr(el, key, value); + } else if (isBooleanAttr(key)) { + // set attribute for blank value + // e.g. + if (isFalsyAttrValue(value)) { + el.removeAttribute(key); + } else { + // technically allowfullscreen is a boolean attribute for