From 6d61e12c580d24fb27d70b42abf1d1d419a02705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sun, 5 Aug 2018 19:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6;=E4=BF=AE=E5=A4=8D=E7=94=B1=E4=BA=8E=E6=8B=86?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81=E5=AF=BC=E8=87=B4=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E8=BF=94=E5=9B=9E=E5=80=BC=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pack.config.js | 3 +++ package.json | 2 +- src/06-vm.js | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) 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] } //监听对象属性值的变化(注意,数组元素不是数组的属性),通过对劫持当前对象的访问器实现