{"action":"created","issue":{"url":"https://api.github.com/repos/iview/iview/issues/3189","repository_url":"https://api.github.com/repos/iview/iview","labels_url":"https://api.github.com/repos/iview/iview/issues/3189/labels{/name}","comments_url":"https://api.github.com/repos/iview/iview/issues/3189/comments","events_url":"https://api.github.com/repos/iview/iview/issues/3189/events","html_url":"https://github.com/iview/iview/issues/3189","id":306703854,"node_id":"MDU6SXNzdWUzMDY3MDM4NTQ=","number":3189,"title":"[Bug Report]InputNumber module sets precision precision to two bits after decimal point, keyboard input can't directly enter 12.33 such numbers, need to delete one by one.\n","user":{"login":"Kunkka0229","id":18555531,"node_id":"MDQ6VXNlcjE4NTU1NTMx","avatar_url":"https://avatars0.githubusercontent.com/u/18555531?v=4","gravatar_id":"","url":"https://api.github.com/users/Kunkka0229","html_url":"https://github.com/Kunkka0229","followers_url":"https://api.github.com/users/Kunkka0229/followers","following_url":"https://api.github.com/users/Kunkka0229/following{/other_user}","gists_url":"https://api.github.com/users/Kunkka0229/gists{/gist_id}","starred_url":"https://api.github.com/users/Kunkka0229/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kunkka0229/subscriptions","organizations_url":"https://api.github.com/users/Kunkka0229/orgs","repos_url":"https://api.github.com/users/Kunkka0229/repos","events_url":"https://api.github.com/users/Kunkka0229/events{/privacy}","received_events_url":"https://api.github.com/users/Kunkka0229/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-03-20T02:16:11Z","updated_at":"2018-11-13T06:15:03Z","closed_at":null,"author_association":"NONE","body":"### Environment\r\nmac/chrome/vue 2.5.15\r\n\r\n### Reproduction link\r\n[https://jsfiddle.net/yyrzhm46/492/](https://jsfiddle.net/yyrzhm46/492/)\r\n\r\n### Steps to reproduce\r\n数字输入框直接输入12.33这样的数字，会实时进行toFixed精确小数点后两位\r\n\r\n### What is expected?\r\n期望可以键盘直接输入12.33\r\n\r\n### What is actually happening?\r\n不能直接输入，会实时精确\r\n\r\n<!-- generated by iview-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/iview/iview/issues/comments/438150202","html_url":"https://github.com/iview/iview/issues/3189#issuecomment-438150202","issue_url":"https://api.github.com/repos/iview/iview/issues/3189","id":438150202,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODE1MDIwMg==","user":{"login":"SophieU","id":22374177,"node_id":"MDQ6VXNlcjIyMzc0MTc3","avatar_url":"https://avatars2.githubusercontent.com/u/22374177?v=4","gravatar_id":"","url":"https://api.github.com/users/SophieU","html_url":"https://github.com/SophieU","followers_url":"https://api.github.com/users/SophieU/followers","following_url":"https://api.github.com/users/SophieU/following{/other_user}","gists_url":"https://api.github.com/users/SophieU/gists{/gist_id}","starred_url":"https://api.github.com/users/SophieU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SophieU/subscriptions","organizations_url":"https://api.github.com/users/SophieU/orgs","repos_url":"https://api.github.com/users/SophieU/repos","events_url":"https://api.github.com/users/SophieU/events{/privacy}","received_events_url":"https://api.github.com/users/SophieU/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T06:15:03Z","updated_at":"2018-11-13T06:15:03Z","author_association":"NONE","body":"> //重写iview InputNumber浮点方法\r\n> iview.InputNumber.computed.precisionValue = function () {\r\n> let arr = (this.currentValue + '').split('.')\r\n> if (this.precision && arr[1] && this.precision < arr[1].length)\r\n> return this.currentValue.toFixed(this.precision)\r\n> return this.currentValue;\r\n> }\r\n简单粗暴，精彩~\r\n\r\n"}}
{"actor":{"display_login":"SophieU"}}