breaking change(Popover): adjust trigger default value to click
This commit is contained in:
@@ -2,7 +2,7 @@ import { ref, watch, nextTick, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { createPopper, offsetModifier } from '@vant/popperjs';
|
||||
|
||||
// Utils
|
||||
import { createNamespace } from '../utils';
|
||||
import { createNamespace, stopPropagation } from '../utils';
|
||||
import { BORDER_BOTTOM } from '../utils/constant';
|
||||
|
||||
// Composition
|
||||
@@ -19,7 +19,6 @@ export default createComponent({
|
||||
|
||||
props: {
|
||||
show: Boolean,
|
||||
trigger: String,
|
||||
overlay: Boolean,
|
||||
offset: {
|
||||
type: Array,
|
||||
@@ -29,6 +28,10 @@ export default createComponent({
|
||||
type: String,
|
||||
default: 'light',
|
||||
},
|
||||
trigger: {
|
||||
type: String,
|
||||
default: 'click',
|
||||
},
|
||||
actions: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
@@ -159,6 +162,7 @@ export default createComponent({
|
||||
teleport={props.teleport}
|
||||
transition="van-popover-zoom"
|
||||
lockScroll={false}
|
||||
onClick={stopPropagation}
|
||||
onTouchstart={onTouchstart}
|
||||
{...{ ...attrs, 'onUpdate:show': toggle }}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user