This commit is contained in:
syuilo 2020-09-20 10:17:47 +09:00
parent 485579fa55
commit 208343a3da
5 changed files with 16 additions and 8 deletions

View file

@ -33,8 +33,8 @@ import { emojilist } from '../../misc/emojilist';
import contains from '@/scripts/contains';
import { twemojiSvgBase } from '../../misc/twemoji-base';
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
import MkUserSelect from './user-select.vue';
import { acct } from '../filters/user';
import MkUserSelect from '@/components/user-select.vue';
import { acct } from '@/filters/user';
import * as os from '@/os';
type EmojiDef = {

View file

@ -46,6 +46,10 @@ export function api(endpoint: string, data: Record<string, any> = {}, token?: st
}
export function popup(component: Component, props: Record<string, any>, events = {}, option?) {
if (_DEV_) {
console.log('os:popup', component, props, events);
}
return new PCancelable((resolve, reject, onCancel) => {
markRaw(component);
const id = Math.random().toString(); // TODO: uuidとか使う
@ -77,6 +81,10 @@ export function popup(component: Component, props: Record<string, any>, events =
}
export function modal(component: Component, props: Record<string, any>, events = {}, option?: { source?: any; position?: any; cancelableByBgClick?: boolean; }) {
if (_DEV_) {
console.log('os:modal', component, props, events, option);
}
return new PCancelable((resolve, reject, onCancel) => {
markRaw(component);
const id = Math.random().toString(); // TODO: uuidとか使う

View file

@ -146,7 +146,7 @@ export class Autocomplete {
this.opening = false;
} else {
const MkAutocomplete = await import('@/components/autocomplete.vue');
const MkAutocomplete = await import('@/components/autocomplete.vue').then(x => x.default);
const _x = ref(x);
const _y = ref(y);