feat(dropdown): allow pass string for prop trigger (#4199)
parent
7624645d58
commit
ce6f44f918
|
@ -3,8 +3,10 @@ import { PropType } from 'vue';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
export default () => ({
|
export default () => ({
|
||||||
trigger: {
|
trigger: {
|
||||||
type: Array as PropType<('click' | 'hover' | 'contextmenu')[]>,
|
type: [Array, String] as PropType<
|
||||||
default: () => ['hover'],
|
('click' | 'hover' | 'contextmenu')[] | 'click' | 'hover' | 'contextmenu'
|
||||||
|
>,
|
||||||
|
default: 'hover',
|
||||||
},
|
},
|
||||||
overlay: PropTypes.any,
|
overlay: PropTypes.any,
|
||||||
visible: PropTypes.looseBool,
|
visible: PropTypes.looseBool,
|
||||||
|
|
|
@ -25,7 +25,9 @@ export default defineComponent({
|
||||||
overlayStyle: PropTypes.object.def(() => ({})),
|
overlayStyle: PropTypes.object.def(() => ({})),
|
||||||
placement: PropTypes.string.def('bottomLeft'),
|
placement: PropTypes.string.def('bottomLeft'),
|
||||||
overlay: PropTypes.any,
|
overlay: PropTypes.any,
|
||||||
trigger: PropTypes.array.def(['hover']),
|
trigger: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).def(
|
||||||
|
'hover',
|
||||||
|
),
|
||||||
alignPoint: PropTypes.looseBool,
|
alignPoint: PropTypes.looseBool,
|
||||||
showAction: PropTypes.array.def([]),
|
showAction: PropTypes.array.def([]),
|
||||||
hideAction: PropTypes.array.def([]),
|
hideAction: PropTypes.array.def([]),
|
||||||
|
|
Loading…
Reference in New Issue