Sha256: f1f62ee6fb270b27688b2c16696e38dbbdbf87a13f98cb487504113e79d2db6e
Contents?: true
Size: 1.56 KB
Versions: 5
Compression:
Stored size: 1.56 KB
Contents
var _ = require('./util') var extend = _.extend /** * The exposed Vue constructor. * * API conventions: * - public API methods/properties are prefiexed with `$` * - internal methods/properties are prefixed with `_` * - non-prefixed properties are assumed to be proxied user * data. * * @constructor * @param {Object} [options] * @public */ function Vue (options) { this._init(options) } /** * Mixin global API */ extend(Vue, require('./api/global')) /** * Vue and every constructor that extends Vue has an * associated options object, which can be accessed during * compilation steps as `this.constructor.options`. * * These can be seen as the default options of every * Vue instance. */ Vue.options = { directives : require('./directives'), filters : require('./filters'), partials : {}, transitions : {}, components : {} } /** * Build up the prototype */ var p = Vue.prototype /** * $data has a setter which does a bunch of * teardown/setup work */ Object.defineProperty(p, '$data', { get: function () { return this._data }, set: function (newData) { this._setData(newData) } }) /** * Mixin internal instance methods */ extend(p, require('./instance/init')) extend(p, require('./instance/events')) extend(p, require('./instance/scope')) extend(p, require('./instance/compile')) /** * Mixin public API methods */ extend(p, require('./api/data')) extend(p, require('./api/dom')) extend(p, require('./api/events')) extend(p, require('./api/child')) extend(p, require('./api/lifecycle')) module.exports = _.Vue = Vue
Version data entries
5 entries across 5 versions & 1 rubygems