forked from FoundKeyGang/FoundKey
refactoring: グローバルコンポーネントを認識するように
This commit is contained in:
parent
36a632dc02
commit
0a2e046b28
1 changed files with 53 additions and 32 deletions
|
@ -1,37 +1,58 @@
|
||||||
import { App } from 'vue';
|
import { App } from 'vue';
|
||||||
|
|
||||||
import mfm from './global/misskey-flavored-markdown.vue';
|
import Mfm from './global/misskey-flavored-markdown.vue';
|
||||||
import a from './global/a.vue';
|
import MkA from './global/a.vue';
|
||||||
import acct from './global/acct.vue';
|
import MkAcct from './global/acct.vue';
|
||||||
import avatar from './global/avatar.vue';
|
import MkAvatar from './global/avatar.vue';
|
||||||
import emoji from './global/emoji.vue';
|
import MkEmoji from './global/emoji.vue';
|
||||||
import userName from './global/user-name.vue';
|
import MkUserName from './global/user-name.vue';
|
||||||
import ellipsis from './global/ellipsis.vue';
|
import MkEllipsis from './global/ellipsis.vue';
|
||||||
import time from './global/time.vue';
|
import MkTime from './global/time.vue';
|
||||||
import url from './global/url.vue';
|
import MkUrl from './global/url.vue';
|
||||||
import i18n from './global/i18n';
|
import I18n from './global/i18n';
|
||||||
import loading from './global/loading.vue';
|
import MkLoading from './global/loading.vue';
|
||||||
import error from './global/error.vue';
|
import MkError from './global/error.vue';
|
||||||
import ad from './global/ad.vue';
|
import MkAd from './global/ad.vue';
|
||||||
import header from './global/header.vue';
|
import MkHeader from './global/header.vue';
|
||||||
import spacer from './global/spacer.vue';
|
import MkSpacer from './global/spacer.vue';
|
||||||
import stickyContainer from './global/sticky-container.vue';
|
import MkStickyContainer from './global/sticky-container.vue';
|
||||||
|
|
||||||
export default function(app: App) {
|
export default function(app: App) {
|
||||||
app.component('I18n', i18n);
|
app.component('I18n', I18n);
|
||||||
app.component('Mfm', mfm);
|
app.component('Mfm', Mfm);
|
||||||
app.component('MkA', a);
|
app.component('MkA', MkA);
|
||||||
app.component('MkAcct', acct);
|
app.component('MkAcct', MkAcct);
|
||||||
app.component('MkAvatar', avatar);
|
app.component('MkAvatar', MkAvatar);
|
||||||
app.component('MkEmoji', emoji);
|
app.component('MkEmoji', MkEmoji);
|
||||||
app.component('MkUserName', userName);
|
app.component('MkUserName', MkUserName);
|
||||||
app.component('MkEllipsis', ellipsis);
|
app.component('MkEllipsis', MkEllipsis);
|
||||||
app.component('MkTime', time);
|
app.component('MkTime', MkTime);
|
||||||
app.component('MkUrl', url);
|
app.component('MkUrl', MkUrl);
|
||||||
app.component('MkLoading', loading);
|
app.component('MkLoading', MkLoading);
|
||||||
app.component('MkError', error);
|
app.component('MkError', MkError);
|
||||||
app.component('MkAd', ad);
|
app.component('MkAd', MkAd);
|
||||||
app.component('MkHeader', header);
|
app.component('MkHeader', MkHeader);
|
||||||
app.component('MkSpacer', spacer);
|
app.component('MkSpacer', MkSpacer);
|
||||||
app.component('MkStickyContainer', stickyContainer);
|
app.component('MkStickyContainer', MkStickyContainer);
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
export interface GlobalComponents {
|
||||||
|
I18n: typeof I18n;
|
||||||
|
Mfm: typeof Mfm;
|
||||||
|
MkA: typeof MkA;
|
||||||
|
MkAcct: typeof MkAcct;
|
||||||
|
MkAvatar: typeof MkAvatar;
|
||||||
|
MkEmoji: typeof MkEmoji;
|
||||||
|
MkUserName: typeof MkUserName;
|
||||||
|
MkEllipsis: typeof MkEllipsis;
|
||||||
|
MkTime: typeof MkTime;
|
||||||
|
MkUrl: typeof MkUrl;
|
||||||
|
MkLoading: typeof MkLoading;
|
||||||
|
MkError: typeof MkError;
|
||||||
|
MkAd: typeof MkAd;
|
||||||
|
MkHeader: typeof MkHeader;
|
||||||
|
MkSpacer: typeof MkSpacer;
|
||||||
|
MkStickyContainer: typeof MkStickyContainer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue