Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input blur失焦事件bug #238

Closed
Hiver-o0o0 opened this issue Jun 24, 2019 · 1 comment
Closed

input blur失焦事件bug #238

Hiver-o0o0 opened this issue Jun 24, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@Hiver-o0o0
Copy link

bug描述
输入过程中失焦触发blur后,再次输入时,该blur事件,匪夷所思的变成了input事件的效果

复现bug的步骤

  1. 输入
  2. 失焦,触发blur
  3. 使该input 再次获焦,输入
  4. See error

问题截图

编译环境信息

  • chameleon-tool 版本:[e.g.0.3.2]
  • nodejs版本、npm版本:[node v10.15.1、npm 6.4.1]
  • 电脑操作系统: [macOS Mojave 10.14.4]

运行环境信息

  • 端版本: [Chrome浏览器 ]

代码




{{label}}:






<script> import cml from 'chameleon-api' import store from '../../store' const animation = cml.createAnimation(); class DemoCom { props = { label: { type: String, default: '手机号' }, placeholders: { type: String, default: '请输入手机号' }, reg: { type: String, default: 'phone' } } data = { message: "Hello world!", animationData: {}, current_transform: [3, 1], animationCode: 3, content: '' } computed = { ...store.mapState([ // ... 'count' ]), ...store.mapGetters([ 'getUserInfo' ]) } watch = { } methods = { ...store.mapActions({ userInfo: 'updateUserInfo' }), handleTabbarClick () { }, // 抖动动画 transform () { this.current_transform = this.current_transform[0] === 0 ? [0, 1]:[3, 1.2]; this.animationData = animation .rotate("6") // .scale(this.current_transform[1.2]) .step({ duration: 100, timingFunction: 'ease-out', delay: 0 }) .rotate("-6") .scale(1) .step({ duration: 100, timingFunction: 'ease-out', delay: 0 }) .rotate("0") .scale(1) .step({ duration: 16, timingFunction: 'ease-out', delay: 0 }) .export() }, inputBlur () { let regex = /^0?(13|15|18|14|17|16|19)[0-9]{9}$/ if (this.content && !regex.test(this.content)) { this.transform() } } } beforeCreate() { } created() { } beforeMount() { } mounted() { } beforeDestroy() { } destroyed() { } } export default new DemoCom(); </script> <style> .microloan_input{ width: 100%; padding: 10cpx 0; box-shadow: 0 1px 10px 0 red; border-radius: 10cpx; /* border: 1px solid red; */ } .cml-input{ border: 1px solid red; } .label{ height: 80cpx; line-height: 80cpx; } .flex_wrap{ flex-wrap: wrap; } </style> <script cml-type="json"> { "base": { "usingComponents": {} } } </script>
@Hiver-o0o0 Hiver-o0o0 added the bug Something isn't working label Jun 24, 2019
@Hiver-o0o0
Copy link
Author

input.txt
问题代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant