diff --git a/package.json b/package.json index 0fbc7b9..b4f05c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anot", - "version": "1.0.3", + "version": "1.0.4", "description": "Anot - 迷你mvvm框架", "main": "dist/anot.js", "files": [ diff --git a/src/13-scan.js b/src/13-scan.js index 9e3bea0..762d761 100644 --- a/src/13-scan.js +++ b/src/13-scan.js @@ -120,11 +120,9 @@ function getOptionsFromTag(elem, vmodels) { if (vm.$id.slice(0, 10) === 'proxy-each') { vm = vm.$up } - if ( - vm.hasOwnProperty(attr.value) && - typeof vm[attr.value] === 'function' - ) { - ret[camelizeName] = vm[attr.value].bind(vm) + var fn = parseVmValue(vm, attr.value) + if (fn && typeof fn === 'function') { + ret[camelizeName] = fn.bind(vm) } } else { ret[camelizeName] = parseData(attr.value)