mirror of
https://github.com/tenrok/vue-context.git
synced 2026-06-24 02:30:32 +03:00
Code format/cleanup
This commit is contained in:
@@ -38,13 +38,13 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'menu'
|
default: 'menu'
|
||||||
},
|
},
|
||||||
tag: {
|
|
||||||
type: String,
|
|
||||||
default: 'ul'
|
|
||||||
},
|
|
||||||
subMenuOffset: {
|
subMenuOffset: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 10
|
default: 10
|
||||||
|
},
|
||||||
|
tag: {
|
||||||
|
type: String,
|
||||||
|
default: 'ul'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -113,9 +113,7 @@ export default {
|
|||||||
|
|
||||||
focusItem(index, items) {
|
focusItem(index, items) {
|
||||||
const el = items.find((el, idx) => idx === index);
|
const el = items.find((el, idx) => idx === index);
|
||||||
if (el && el.focus) {
|
el && el.focus();
|
||||||
el.focus();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
focusNext(event, up) {
|
focusNext(event, up) {
|
||||||
@@ -240,7 +238,7 @@ export default {
|
|||||||
// first set the display and afterwards execute position calculation for correct element offsets
|
// first set the display and afterwards execute position calculation for correct element offsets
|
||||||
subMenuElement.style.display = 'block';
|
subMenuElement.style.display = 'block';
|
||||||
|
|
||||||
let [elementTop, elementLeft] = this.positionMenu(bcr.top, bcr.right - (this.subMenuOffset), subMenuElement);
|
let [elementTop, elementLeft] = this.positionMenu(bcr.top, bcr.right - this.subMenuOffset, subMenuElement);
|
||||||
|
|
||||||
subMenuElement.style.left = `${elementLeft}px`;
|
subMenuElement.style.left = `${elementLeft}px`;
|
||||||
subMenuElement.style.top = `${elementTop}px`;
|
subMenuElement.style.top = `${elementTop}px`;
|
||||||
|
|||||||
Reference in New Issue
Block a user