style: format code

This commit is contained in:
tangjinzhou 2019-09-28 18:00:24 +08:00
parent c638f2adbd
commit 6dd61cdb76
2 changed files with 13 additions and 8 deletions

View File

@ -6,8 +6,8 @@ export const UA = inBrowser && window.navigator.userAgent.toLowerCase();
export const isIE = UA && /msie|trident/.test(UA);
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0;
export const isEdge = UA && UA.indexOf('edge/') > 0;
export const isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
export const isAndroid = (UA && UA.indexOf('android') > 0) || weexPlatform === 'android';
export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || weexPlatform === 'ios';
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
export const isPhantomJS = UA && /phantomjs/.test(UA);
export const isFF = UA && UA.match(/firefox\/(\d+)/);

View File

@ -51,6 +51,7 @@ import {
} from './util';
import { SelectPropTypes } from './PropTypes';
import contains from '../_util/Dom/contains';
import { isIE, isEdge } from '../_util/env';
Vue.use(ref, { name: 'ant-ref' });
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';
@ -623,13 +624,17 @@ const Select = {
},
inputBlur(e) {
const target = e.relatedTarget || document.activeElement;
// https://github.com/vueComponent/ant-design-vue/issues/999
// https://github.com/vueComponent/ant-design-vue/issues/1223
if (
e.relatedTarget === this.$refs.arrow ||
(target &&
this.selectTriggerRef &&
this.selectTriggerRef.getInnerMenu() &&
this.selectTriggerRef.getInnerMenu().$el === target) ||
contains(e.target, target)
(isIE || isEdge) &&
(e.relatedTarget === this.$refs.arrow ||
(target &&
this.selectTriggerRef &&
this.selectTriggerRef.getInnerMenu() &&
this.selectTriggerRef.getInnerMenu().$el === target) ||
contains(e.target, target))
) {
e.target.focus();
e.preventDefault();