diff --git a/pack.config.js b/pack.config.js index e3e1b1a..5a36e4b 100644 --- a/pack.config.js +++ b/pack.config.js @@ -74,6 +74,9 @@ const PAD_END_NEXT = Buffer.from(` var CSS_DEPS = {} function getBaseUrl() { + if(window.LIBS_BASE_URL){ + return + } var stack try { throw new Error() // 强制报错,以便捕获e.stack diff --git a/package.json b/package.json index ea2cbb6..8fe2fd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anot", - "version": "1.0.0", + "version": "1.0.1", "description": "Anot - 迷你mvvm框架", "main": "dist/anot.js", "files": [ diff --git a/src/06-vm.js b/src/06-vm.js index 7237337..dbcc288 100644 --- a/src/06-vm.js +++ b/src/06-vm.js @@ -166,8 +166,7 @@ function modelFactory(source, options) { } function isSkip(k) { - return - k.charAt(0) === '$' || k.slice(0, 2) === '__' || kernelProps[k] + return k.charAt(0) === '$' || k.slice(0, 2) === '__' || kernelProps[k] } //监听对象属性值的变化(注意,数组元素不是数组的属性),通过对劫持当前对象的访问器实现