{"action":"created","issue":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/980","labels_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/980/labels{/name}","comments_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/980/comments","events_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/980/events","html_url":"https://github.com/RubyLouvre/avalon/issues/980","id":100953137,"number":980,"title":"$watch 监控的元素如果同时绑定到表单元素会多触发一次。","user":{"login":"Megic","id":1814522,"avatar_url":"https://avatars.githubusercontent.com/u/1814522?v=3","gravatar_id":"","url":"https://api.github.com/users/Megic","html_url":"https://github.com/Megic","followers_url":"https://api.github.com/users/Megic/followers","following_url":"https://api.github.com/users/Megic/following{/other_user}","gists_url":"https://api.github.com/users/Megic/gists{/gist_id}","starred_url":"https://api.github.com/users/Megic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megic/subscriptions","organizations_url":"https://api.github.com/users/Megic/orgs","repos_url":"https://api.github.com/users/Megic/repos","events_url":"https://api.github.com/users/Megic/events{/privacy}","received_events_url":"https://api.github.com/users/Megic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-14T07:36:32Z","updated_at":"2015-08-14T17:10:29Z","closed_at":"2015-08-14T17:10:29Z","body":"```\r\n<div ms-controller=\"xx\">\r\n<input  id=\"sid\"  name=\"sid\" ms-duplex=\"data.dataid\"/>\r\n</div>\r\n\r\n var vm=avalon.define({\r\n  $id:'xx',\r\n  data:{dataid:0,text:''}\r\n })\r\n vm.data.$watch('dataid',function(value, oldValue){\r\n  console.log(value, oldValue)\r\n });\r\n vm.data.dataid=2;\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/comments/131184053","html_url":"https://github.com/RubyLouvre/avalon/issues/980#issuecomment-131184053","issue_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/980","id":131184053,"user":{"login":"RubyLouvre","id":190846,"avatar_url":"https://avatars.githubusercontent.com/u/190846?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyLouvre","html_url":"https://github.com/RubyLouvre","followers_url":"https://api.github.com/users/RubyLouvre/followers","following_url":"https://api.github.com/users/RubyLouvre/following{/other_user}","gists_url":"https://api.github.com/users/RubyLouvre/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyLouvre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyLouvre/subscriptions","organizations_url":"https://api.github.com/users/RubyLouvre/orgs","repos_url":"https://api.github.com/users/RubyLouvre/repos","events_url":"https://api.github.com/users/RubyLouvre/events{/privacy}","received_events_url":"https://api.github.com/users/RubyLouvre/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T17:10:29Z","updated_at":"2015-08-14T17:10:29Z","body":"没有错\r\n\r\n因为在input里面已经变成字符串了,你强制它不转换就行\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <title>Avalon by RubyLouvre</title>\r\n        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n        <script src=\"avalon.js\" ></script>\r\n        <script>\r\n            var vm = avalon.define({\r\n                $id: 'xx',\r\n                dataid: 0\r\n            })\r\n            vm.$watch('dataid', function (value, oldValue) {\r\n                console.log(value, oldValue)\r\n            });\r\n            vm.dataid = 2;\r\n        </script>\r\n\r\n\r\n    </head>\r\n    <body>\r\n        <div ms-controller=\"xx\">\r\n            <input  id=\"sid\"  name=\"sid\" ms-duplex-number=\"dataid\"/>\r\n        </div>\r\n\r\n    </body>\r\n</html>\r\n```"}}