refactor(frontend): reduce type errors
This commit is contained in:
parent
9e20065496
commit
2177792a3c
4 changed files with 19 additions and 14 deletions
|
@ -31,7 +31,7 @@ const props = withDefaults(defineProps<{
|
|||
targetElement?: HTMLElement;
|
||||
x?: number;
|
||||
y?: number;
|
||||
text?: string;
|
||||
text: string;
|
||||
asMfm?: boolean;
|
||||
maxWidth?: number;
|
||||
direction?: 'top' | 'bottom' | 'right' | 'left';
|
||||
|
@ -53,6 +53,7 @@ const el = shallowRef<HTMLElement>();
|
|||
const zIndex = os.claimZIndex('high');
|
||||
|
||||
function setPosition() {
|
||||
if (!el.value || !props.targetElement) return;
|
||||
const data = calcPopupPosition(el.value, {
|
||||
anchorElement: props.targetElement,
|
||||
direction: props.direction,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue