diff --git a/src/browser/ie.js b/src/browser/ie.js index 871f2a8d8..ec990a685 100644 --- a/src/browser/ie.js +++ b/src/browser/ie.js @@ -7,7 +7,7 @@ * @file ie版本号 */ - // #[begin] allua +// #[begin] allua /** * 从userAgent中ie版本号的匹配信息 * diff --git a/src/parser/parse-directive.js b/src/parser/parse-directive.js index 21b775c6a..ef1185a28 100644 --- a/src/parser/parse-directive.js +++ b/src/parser/parse-directive.js @@ -24,7 +24,7 @@ var readUnaryExpr = require('./read-unary-expr'); var directiveParsers = { 'for': function (value) { var walker = new Walker(value); - var match = walker.match(/^\s*([\$0-9a-z_]+)(\s*,\s*([\$0-9a-z_]+))?\s+in\s+/ig, 1); + var match = walker.match(/^\s*([$0-9a-z_]+)(\s*,\s*([$0-9a-z_]+))?\s+in\s+/ig, 1); if (match) { var directive = { @@ -64,7 +64,7 @@ var directiveParsers = { }; }, - 'else': function (value) { + 'else': function () { return { value: {} }; diff --git a/src/util/union-keys.js b/src/util/union-keys.js index d8704a68b..cae955ab5 100644 --- a/src/util/union-keys.js +++ b/src/util/union-keys.js @@ -16,14 +16,15 @@ */ function unionKeys(obj1, obj2) { var result = []; + var key; - for (var key in obj1) { + for (key in obj1) { if (obj1.hasOwnProperty(key)) { result.push(key); } } - for (var key in obj2) { + for (key in obj2) { if (obj2.hasOwnProperty(key)) { !obj1[key] && result.push(key); } diff --git a/src/view/component.js b/src/view/component.js index 339d98639..906ea7e73 100644 --- a/src/view/component.js +++ b/src/view/component.js @@ -61,15 +61,15 @@ var warn = require('../util/warn'); */ function Component(options) { // eslint-disable-line - /* eslint-disable no-console */ // #[begin] error for (var key in Component.prototype) { if (this[key] !== Component.prototype[key]) { + /* eslint-disable max-len */ warn('\`' + key + '\` is a reserved key of san components. Overriding this property may cause unknown exceptions.'); + /* eslint-enable max-len */ } } // #[end] - /* eslint-disable no-console */ options = options || {}; diff --git a/src/view/create-reverse-node.js b/src/view/create-reverse-node.js index 879ee1909..3af56cb5a 100644 --- a/src/view/create-reverse-node.js +++ b/src/view/create-reverse-node.js @@ -14,6 +14,7 @@ var SlotNode = require('./slot-node'); var ForNode = require('./for-node'); var IfNode = require('./if-node'); var TemplateNode = require('./template-node'); +var AsyncComponent = require('./async-component'); // #[begin] reverse /** diff --git a/src/view/element.js b/src/view/element.js index 2531b7674..c4770c97b 100644 --- a/src/view/element.js +++ b/src/view/element.js @@ -37,6 +37,7 @@ var getNodePath = require('./get-node-path'); /** * 元素节点类 * + * @class * @param {Object} aNode 抽象节点 * @param {Component} owner 所属组件环境 * @param {Model=} scope 所属数据环境 diff --git a/src/view/for-node.js b/src/view/for-node.js index 7cf70d27c..f129bfb19 100644 --- a/src/view/for-node.js +++ b/src/view/for-node.js @@ -131,6 +131,7 @@ function createForDirectiveChild(forElement, item, index) { /** * for 指令节点类 * + * @class * @param {Object} aNode 抽象节点 * @param {Component} owner 所属组件环境 * @param {Model=} scope 所属数据环境 diff --git a/src/view/get-prop-handler.js b/src/view/get-prop-handler.js index a49e52fd0..38981b007 100644 --- a/src/view/get-prop-handler.js +++ b/src/view/get-prop-handler.js @@ -42,7 +42,7 @@ var HTML_ATTR_PROP_MAP = { * @type {Object} */ var defaultElementPropHandler = { - prop: function (el, value, name, element) { + prop: function (el, value, name) { var propName = HTML_ATTR_PROP_MAP[name] || name; value = value == null ? '' : value; // input 的 type 是个特殊属性,其实也应该用 setAttribute diff --git a/src/view/if-node.js b/src/view/if-node.js index dc9449e4d..a627f6928 100644 --- a/src/view/if-node.js +++ b/src/view/if-node.js @@ -22,6 +22,7 @@ var nodeOwnSimpleDispose = require('./node-own-simple-dispose'); /** * if 指令节点类 * + * @class * @param {Object} aNode 抽象节点 * @param {Component} owner 所属组件环境 * @param {Model=} scope 所属数据环境 diff --git a/src/view/slot-node.js b/src/view/slot-node.js index c3d3d3935..6600cc4e7 100644 --- a/src/view/slot-node.js +++ b/src/view/slot-node.js @@ -35,6 +35,7 @@ var nodeOwnOnlyChildrenAttach = require('./node-own-only-children-attach'); /** * slot 节点类 * + * @class * @param {Object} aNode 抽象节点 * @param {Component} owner 所属组件环境 * @param {Model=} scope 所属数据环境 diff --git a/src/view/template-node.js b/src/view/template-node.js index 9c89c2471..f1cc49bcd 100644 --- a/src/view/template-node.js +++ b/src/view/template-node.js @@ -23,6 +23,7 @@ var nodeOwnOnlyChildrenAttach = require('./node-own-only-children-attach'); /** * template 节点类 * + * @class * @param {Object} aNode 抽象节点 * @param {Component} owner 所属组件环境 * @param {Model=} scope 所属数据环境 diff --git a/src/view/text-node.js b/src/view/text-node.js index a4d2fa38f..7292ebf45 100644 --- a/src/view/text-node.js +++ b/src/view/text-node.js @@ -21,6 +21,7 @@ var getNodePath = require('./get-node-path'); /** * text 节点类 * + * @class * @param {Object} aNode 抽象节点 * @param {Component} owner 所属组件环境 * @param {Model=} scope 所属数据环境