初步完成适配

This commit is contained in:
xu_yanfeng
2024-01-05 16:45:23 +08:00
parent d72e53815c
commit 0f9924d48f
13 changed files with 129 additions and 11 deletions

View File

@@ -0,0 +1 @@
console.log("background");

View File

@@ -0,0 +1 @@
console.log("content.ts");

View File

@@ -0,0 +1,3 @@
console.log("injected");
const a = 1;
const b = 2;

View File

@@ -0,0 +1,15 @@
import { createApp } from "vue";
import App from "./index.vue";
import CCP from "cc-plugin/src/ccp/entry-render";
import pluginConfig from "../../../cc-plugin.config";
import ccui from "@xuyanfeng/cc-ui";
import "@xuyanfeng/cc-ui/dist/ccui.css";
import "@xuyanfeng/cc-ui/iconfont/iconfont.css";
export default CCP.init(pluginConfig, {
ready: function (rootElement: any, args: any) {
const app = createApp(App);
app.use(ccui);
app.mount(rootElement);
},
});

View File

@@ -0,0 +1,20 @@
<template>
<div class="devtools">devtools</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, ref, provide, nextTick } from "vue";
export default defineComponent({
name: "devtools",
components: {},
setup(props, ctx) {
return {};
},
});
</script>
<style scoped lang="less">
.devtools {
widows: 10px;
height: 10px;
background-color: rebeccapurple;
}
</style>

View File

@@ -0,0 +1,15 @@
import { createApp } from "vue";
import App from "./index.vue";
import CCP from "cc-plugin/src/ccp/entry-render";
import pluginConfig from "../../../cc-plugin.config";
import ccui from "@xuyanfeng/cc-ui";
import "@xuyanfeng/cc-ui/dist/ccui.css";
import "@xuyanfeng/cc-ui/iconfont/iconfont.css";
export default CCP.init(pluginConfig, {
ready: function (rootElement: any, args: any) {
const app = createApp(App);
app.use(ccui);
app.mount(rootElement);
},
});

View File

@@ -0,0 +1,20 @@
<template>
<div class="options">options</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, ref, provide, nextTick } from "vue";
export default defineComponent({
name: "options",
components: {},
setup(props, ctx) {
return {};
},
});
</script>
<style scoped lang="less">
.options {
widows: 10px;
height: 10px;
background-color: rebeccapurple;
}
</style>

View File

@@ -0,0 +1,15 @@
import { createApp } from "vue";
import App from "./index.vue";
import CCP from "cc-plugin/src/ccp/entry-render";
import pluginConfig from "../../../cc-plugin.config";
import ccui from "@xuyanfeng/cc-ui";
import "@xuyanfeng/cc-ui/dist/ccui.css";
import "@xuyanfeng/cc-ui/iconfont/iconfont.css";
export default CCP.init(pluginConfig, {
ready: function (rootElement: any, args: any) {
const app = createApp(App);
app.use(ccui);
app.mount(rootElement);
},
});

View File

@@ -0,0 +1,20 @@
<template>
<div class="popup">popup</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, ref, provide, nextTick } from "vue";
export default defineComponent({
name: "popup",
components: {},
setup(props, ctx) {
return {};
},
});
</script>
<style scoped lang="less">
.popup {
widows: 10px;
height: 10px;
background-color: rebeccapurple;
}
</style>