refactor(frontend): reduce type errors

This commit is contained in:
syuilo 2024-01-05 12:52:24 +09:00
parent 9e20065496
commit 2177792a3c
4 changed files with 19 additions and 14 deletions

View file

@ -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,