refactor(infra): directory structure (#4615)

This commit is contained in:
Joooye_34
2023-10-18 23:30:08 +08:00
committed by GitHub
parent 814d552be8
commit bed9310519
1150 changed files with 539 additions and 584 deletions

View File

@@ -0,0 +1,17 @@
<script setup lang="ts">
import { ref } from 'vue';
const count = ref(0);
</script>
<template>
<el-button @click="count++">
{{ count }}
</el-button>
</template>
<style scoped>
.el-button {
font-size: 30px;
}
</style>

View File

@@ -0,0 +1,5 @@
declare module '*.vue' {
import type { ComponentOptions } from 'vue';
const component: ComponentOptions;
export default component;
}

View File

@@ -0,0 +1,18 @@
import type { PluginContext } from '@affine/sdk/entry';
import ElementPlus from 'element-plus';
import { createApp } from 'vue';
import App from './app.vue';
export const entry = (context: PluginContext) => {
context.register('headerItem', div => {
const app = createApp(App);
app.use(ElementPlus);
app.mount(div, false, false);
return () => {
app.unmount();
};
});
return () => {};
};