This commit is contained in:
John Ryan Camatog 2017-06-23 00:48:14 +08:00
parent 909c879738
commit b8f1f2ec07

View file

@ -12,7 +12,7 @@ export default {
},
render(createElement, { children, data, props }) {
const getItemComponent = () => {
const nativeOn = data.nativeOn;
const on = data.on;
const interactionEvents = [
'contextmenu',
'dblclick',
@ -27,16 +27,6 @@ export default {
return MdListItemLink;
}
if (nativeOn) {
let counter = interactionEvents.length;
while (counter--) {
if (nativeOn[interactionEvents[counter]]) {
return MdListItemButton;
}
}
}
while (childrenCount--) {
const options = children[childrenCount].componentOptions;
@ -59,6 +49,16 @@ export default {
}
}
if (on) {
let counter = interactionEvents.length;
while (counter--) {
if (on[interactionEvents[counter]]) {
return MdListItemButton;
}
}
}
return MdListItemDefault;
};