mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
fix: 修复导入插件对话框无法打开的bug,修复插件编辑页面打开多个代码编辑器消失的bug
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<a-tab-pane key="editor" tab="元数据"> </a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="metadata-body">
|
||||
<code-editor id="metadata" v-model:model-value="plugin.metadata" language="yaml" @save="doSave"></code-editor>
|
||||
<code-editor :id="`metadata_${idRef}`" v-model:model-value="plugin.metadata" language="yaml" @save="doSave"></code-editor>
|
||||
</div>
|
||||
</div>
|
||||
<div class="script">
|
||||
@@ -33,7 +33,7 @@
|
||||
<a-tab-pane key="script" tab="脚本"> </a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="script-body">
|
||||
<code-editor id="content" v-model:model-value="plugin.content" language="javascript" @save="doSave"></code-editor>
|
||||
<code-editor :id="`content_${idRef}`" v-model:model-value="plugin.content" language="javascript" @save="doSave"></code-editor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,6 +83,7 @@ function initFormOptions() {
|
||||
}
|
||||
initFormOptions();
|
||||
|
||||
const idRef = ref(route.query.id);
|
||||
async function getPlugin() {
|
||||
const id = route.query.id;
|
||||
const pluginObj = await api.GetObj(id);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import * as api from "/@/views/sys/plugin/api";
|
||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import { dict, useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import { useI18n } from "/@/locales";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import { notification } from "ant-design-vue";
|
||||
|
||||
export function usePluginImport() {
|
||||
const { openCrudFormDialog } = useFormWrapper();
|
||||
const { t } = useI18n();
|
||||
|
||||
async function openImportDialog({ crudExpose }) {
|
||||
async function openImportDialog(opts: any) {
|
||||
const { crudExpose } = opts;
|
||||
function createCrudOptions() {
|
||||
return {
|
||||
crudOptions: {
|
||||
|
||||
Reference in New Issue
Block a user