mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-21 00:43:45 +08:00
parent
143bded648
commit
de380357ee
@ -17,8 +17,6 @@ import { MComponent } from '@tmagic/schema';
|
||||
import { toLine } from '@tmagic/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-component',
|
||||
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MComponent>,
|
||||
|
@ -13,7 +13,6 @@ import type { MComponent } from '@tmagic/schema';
|
||||
import useApp from '../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-button',
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MComponent>,
|
||||
|
@ -20,8 +20,6 @@ import useApp from '../useApp';
|
||||
import useCommonMethod from '../useCommonMethod';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-container',
|
||||
|
||||
components: {
|
||||
'magic-ui-component': Component,
|
||||
},
|
||||
|
@ -7,7 +7,6 @@ import { defineComponent } from 'vue';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-img',
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
|
@ -12,7 +12,6 @@ import type { MNode } from '@tmagic/schema';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-overlay',
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
|
@ -18,8 +18,6 @@ import Component from '../Component.vue';
|
||||
import useApp from '../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-page',
|
||||
|
||||
components: {
|
||||
'magic-ui-component': Component,
|
||||
},
|
||||
|
@ -9,8 +9,6 @@ import QRCode from 'qrcode';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-qrcode',
|
||||
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
|
@ -6,8 +6,6 @@ import type { MComponent } from '@tmagic/schema';
|
||||
import useApp from '../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-text',
|
||||
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MComponent>,
|
||||
|
@ -16,8 +16,6 @@ import Core from '@tmagic/core';
|
||||
import { toLine } from '@tmagic/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-component',
|
||||
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
|
@ -12,7 +12,6 @@ import { MButton, MButtonInstance, MText } from '../../../src/types';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-button',
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MButton>,
|
||||
|
@ -20,8 +20,6 @@ import useApp from '../../useApp';
|
||||
import useCommonMethod from '../../useCommonMethod';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-container',
|
||||
|
||||
components: {
|
||||
'magic-ui-component': Component,
|
||||
},
|
||||
|
@ -8,7 +8,6 @@ import { MImg } from '../../types';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-img',
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MImg>,
|
||||
|
@ -12,7 +12,6 @@ import type { MNode } from '@tmagic/schema';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-overlay',
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
|
@ -18,8 +18,6 @@ import Component from '../../Component.vue';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-page',
|
||||
|
||||
components: {
|
||||
'magic-ui-component': Component,
|
||||
},
|
||||
|
@ -10,8 +10,6 @@ import { MQrcode } from '../../types';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-qrcode',
|
||||
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MQrcode>,
|
||||
|
@ -5,7 +5,6 @@ import { MComponentInstance, MText, MTextInstance } from '../../../src/types';
|
||||
import useApp from '../../useApp';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'magic-ui-text',
|
||||
props: {
|
||||
config: {
|
||||
type: Object as PropType<MText>,
|
||||
|
@ -37,7 +37,7 @@ const app = new Core({
|
||||
|
||||
Object.keys(components).forEach((type: string) => {
|
||||
const component = components[type];
|
||||
Vue.component(component.name, component);
|
||||
Vue.component(`magic-ui-${type}`, component);
|
||||
app.registerComponent(type, component);
|
||||
});
|
||||
|
||||
|
@ -21,8 +21,8 @@ import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
|
||||
Promise.all([import('../.tmagic/comp-entry'), import('../.tmagic/plugin-entry')]).then(([components, plugins]) => {
|
||||
Object.values(components.default).forEach((component: any) => {
|
||||
Vue.component(component.name, component);
|
||||
Object.entries(components.default).forEach(([type, component]: [string, any]) => {
|
||||
Vue.component(`magic-ui-${type}`, component);
|
||||
});
|
||||
|
||||
Object.values(plugins.default).forEach((plugin: any) => {
|
||||
|
@ -32,8 +32,8 @@ const magicApp = createApp(AppComponent);
|
||||
|
||||
magicApp.use(request);
|
||||
|
||||
Object.values(components).forEach((component: any) => {
|
||||
magicApp.component(component.name, component);
|
||||
Object.entries(components).forEach(([type, component]: [string, any]) => {
|
||||
magicApp.component(`magic-ui-${type}`, component);
|
||||
});
|
||||
|
||||
Object.values(plugins).forEach((plugin: any) => {
|
||||
|
@ -23,8 +23,8 @@ import App from './App.vue';
|
||||
Promise.all([import('../.tmagic/comp-entry'), import('../.tmagic/plugin-entry')]).then(([components, plugins]) => {
|
||||
const magicApp = createApp(App);
|
||||
|
||||
Object.values(components.default).forEach((component: any) => {
|
||||
magicApp.component(component.name, component);
|
||||
Object.entries(components.default).forEach(([type, component]: [string, any]) => {
|
||||
magicApp.component(`magic-ui-${type}`, component);
|
||||
});
|
||||
|
||||
Object.values(plugins.default).forEach((plugin: any) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user