fix: datepicker not open when placeholder is chinese at ie 10 and 11 #865
parent
f9373e44ce
commit
d4f23cec69
|
@ -3,6 +3,7 @@ import BaseMixin from '../../../_util/BaseMixin';
|
||||||
import { getComponentFromProp } from '../../../_util/props-util';
|
import { getComponentFromProp } from '../../../_util/props-util';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { formatDate } from '../util';
|
import { formatDate } from '../util';
|
||||||
|
import { isIE, isIE9 } from '../../../_util/env';
|
||||||
|
|
||||||
const DateInput = {
|
const DateInput = {
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
|
@ -68,6 +69,10 @@ const DateInput = {
|
||||||
},
|
},
|
||||||
onInputChange(event) {
|
onInputChange(event) {
|
||||||
const str = event.target.value;
|
const str = event.target.value;
|
||||||
|
// https://github.com/vueComponent/ant-design-vue/issues/92
|
||||||
|
if (isIE && !isIE9 && this.str === str) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const { disabledDate, format, selectedValue } = this.$props;
|
const { disabledDate, format, selectedValue } = this.$props;
|
||||||
|
|
||||||
// 没有内容,合法并直接退出
|
// 没有内容,合法并直接退出
|
||||||
|
|
|
@ -2,6 +2,7 @@ import PropTypes from '../_util/vue-types';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { getComponentFromProp } from '../_util/props-util';
|
import { getComponentFromProp } from '../_util/props-util';
|
||||||
|
import { isIE, isIE9 } from '../_util/env';
|
||||||
|
|
||||||
const Header = {
|
const Header = {
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
|
@ -64,6 +65,11 @@ const Header = {
|
||||||
methods: {
|
methods: {
|
||||||
onInputChange(event) {
|
onInputChange(event) {
|
||||||
const str = event.target.value;
|
const str = event.target.value;
|
||||||
|
// https://github.com/vueComponent/ant-design-vue/issues/92
|
||||||
|
if (isIE && !isIE9 && this.str === str) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.showStr = true;
|
this.showStr = true;
|
||||||
this.setState({
|
this.setState({
|
||||||
str,
|
str,
|
||||||
|
|
Loading…
Reference in New Issue