This repository has been archived on 2023-08-29. You can view files and clone it, but cannot push or open issues/pull-requests.
yutent
/
anot.js
Archived
1
0
Fork 0

修复组件事件绑定不支持绑定子属性上的方法的bug

1.x 1.0.4
宇天 2018-10-03 23:15:16 +08:00
parent ebb368ef50
commit 19ccdff478
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "anot",
"version": "1.0.3",
"version": "1.0.4",
"description": "Anot - 迷你mvvm框架",
"main": "dist/anot.js",
"files": [

View File

@ -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)