mirror of https://github.com/certd/certd
chore: v21适配多数据库
parent
ba72fa3f05
commit
359079c3e6
|
@ -4,15 +4,11 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
插件编辑
|
插件编辑
|
||||||
<span class="sub">
|
<span class="sub">
|
||||||
<span class="name">
|
<span class="name flex-inline"> 插件名称:<fs-copyable :model-value="pluginName"></fs-copyable> </span>
|
||||||
<a-tag color="green">{{ plugin.title }}</a-tag>
|
|
||||||
【{{ plugin.author }}/{{ plugin.name }}】
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
<a-button class="mr-1" type="primary" :loading="saveLoading" @click="doSave">保存</a-button>
|
<a-button class="mr-1" type="primary" :loading="saveLoading" @click="doSave">保存</a-button>
|
||||||
<a-button type="primary" @click="doTest">测试运行</a-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="pi-plugin-editor">
|
<div class="pi-plugin-editor">
|
||||||
|
@ -44,12 +40,13 @@
|
||||||
</fs-page>
|
</fs-page>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, provide, ref, Ref } from "vue";
|
import { onMounted, provide, ref, Ref, computed } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { notification } from "ant-design-vue";
|
import { notification } from "ant-design-vue";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { useColumns } from "@fast-crud/fast-crud";
|
import { useColumns } from "@fast-crud/fast-crud";
|
||||||
|
//@ts-ignore
|
||||||
import yaml from "js-yaml";
|
import yaml from "js-yaml";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
@ -104,6 +101,16 @@ onMounted(async () => {
|
||||||
getPlugin();
|
getPlugin();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const pluginName = computed(() => {
|
||||||
|
if (!plugin.value) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (plugin.value.author) {
|
||||||
|
return `${plugin.value.author}/${plugin.value.name}`;
|
||||||
|
}
|
||||||
|
return plugin.value.name;
|
||||||
|
});
|
||||||
|
|
||||||
provide("get:plugin", () => {
|
provide("get:plugin", () => {
|
||||||
return plugin;
|
return plugin;
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN `pluginType` varchar(100);
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN `metadata` longtext;
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN `author` varchar(100);
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN `extra` longtext;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `pi_sub_domain`
|
||||||
|
(
|
||||||
|
`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
||||||
|
`user_id` bigint,
|
||||||
|
`domain` varchar(100),
|
||||||
|
`disabled` boolean NOT NULL DEFAULT false,
|
||||||
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE INDEX `index_sub_domain_user_id` ON `pi_sub_domain` (`user_id`);
|
||||||
|
CREATE INDEX `index_sub_domain_domain` ON `pi_sub_domain` (`domain`);
|
|
@ -0,0 +1,20 @@
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN "pluginType" varchar(100);
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN "metadata" text;
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN "author" varchar(100);
|
||||||
|
ALTER TABLE pi_plugin ADD COLUMN "extra" text;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE "pi_sub_domain"
|
||||||
|
(
|
||||||
|
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL,
|
||||||
|
"user_id" bigint,
|
||||||
|
"domain" varchar(100),
|
||||||
|
"disabled" boolean NOT NULL DEFAULT (false),
|
||||||
|
"create_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||||
|
"update_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE INDEX "index_sub_domain_user_id" ON "pi_sub_domain" ("user_id");
|
||||||
|
CREATE INDEX "index_sub_domain_domain" ON "pi_sub_domain" ("domain");
|
|
@ -1,7 +1,7 @@
|
||||||
ALTER TABLE pi_plugin ADD COLUMN "pluginType" varchar(100);
|
ALTER TABLE pi_plugin ADD COLUMN "pluginType" varchar(100);
|
||||||
ALTER TABLE pi_plugin ADD COLUMN "metadata" varchar(40960);
|
ALTER TABLE pi_plugin ADD COLUMN "metadata" text;
|
||||||
ALTER TABLE pi_plugin ADD COLUMN "author" varchar(100);
|
ALTER TABLE pi_plugin ADD COLUMN "author" varchar(100);
|
||||||
ALTER TABLE pi_plugin ADD COLUMN "extra" varchar(40960);
|
ALTER TABLE pi_plugin ADD COLUMN "extra" text;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue