Select add capture prop

This commit is contained in:
梁灏 2019-09-17 18:19:19 +08:00
parent 3fc2747d7a
commit 6ff66bd05c

View file

@ -1,9 +1,9 @@
<template> <template>
<div <div
:class="classes" :class="classes"
v-click-outside.capture="onClickOutside" v-click-outside:[capture]="onClickOutside"
v-click-outside:mousedown.capture="onClickOutside" v-click-outside:[capture].mousedown="onClickOutside"
v-click-outside:touchstart.capture="onClickOutside" v-click-outside:[capture].touchstart="onClickOutside"
> >
<div <div
ref="reference" ref="reference"
@ -87,7 +87,7 @@
<script> <script>
import Drop from './dropdown.vue'; import Drop from './dropdown.vue';
import Icon from '../icon'; import Icon from '../icon';
import {directive as clickOutside} from 'v-click-outside-x'; import {directive as clickOutside} from '../../directives/v-click-outside-x';
import TransferDom from '../../directives/transfer-dom'; import TransferDom from '../../directives/transfer-dom';
import { oneOf, findComponentsDownward } from '../../utils/assist'; import { oneOf, findComponentsDownward } from '../../utils/assist';
import Emitter from '../../mixins/emitter'; import Emitter from '../../mixins/emitter';
@ -266,6 +266,13 @@
allowCreate: { allowCreate: {
type: Boolean, type: Boolean,
default: false default: false
},
// 4.0.0
capture: {
type: Boolean,
default () {
return !this.$IVIEW ? true : this.$IVIEW.capture;
}
} }
}, },
mounted(){ mounted(){