Merge branch '1.x' into 'dev'
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Icon from '../icon';
|
||||
import Cell from '../cell';
|
||||
import { cellProps } from '../cell/shared';
|
||||
import { preventDefault } from '../utils/event';
|
||||
import { getRootScrollTop } from '../utils/scroll';
|
||||
import { use, isObj, isDef, isIOS, suffixPx } from '../utils';
|
||||
|
||||
@@ -129,7 +130,7 @@ export default sfc({
|
||||
},
|
||||
|
||||
onClear(event) {
|
||||
event.preventDefault();
|
||||
preventDefault(event);
|
||||
this.$emit('input', '');
|
||||
this.$emit('clear');
|
||||
},
|
||||
@@ -140,8 +141,9 @@ export default sfc({
|
||||
const allowPoint = String(this.value).indexOf('.') === -1;
|
||||
const isValidKey =
|
||||
(keyCode >= 48 && keyCode <= 57) || (keyCode === 46 && allowPoint) || keyCode === 45;
|
||||
|
||||
if (!isValidKey) {
|
||||
event.preventDefault();
|
||||
preventDefault(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user