mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 03:58:05 +08:00
style: format code
This commit is contained in:
parent
c638f2adbd
commit
6dd61cdb76
@ -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+)/);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user