mirror of https://github.com/certd/certd
refactor: fix
parent
baec15dfc6
commit
68c1eff81d
|
@ -1,6 +1,6 @@
|
|||
export class Registry {
|
||||
constructor () {
|
||||
this.collection = new Map()
|
||||
this.collection = {}
|
||||
}
|
||||
|
||||
install (target) {
|
||||
|
@ -8,7 +8,7 @@ export class Registry {
|
|||
return
|
||||
}
|
||||
if (this.collection == null) {
|
||||
this.collection = new Map()
|
||||
this.collection = {}
|
||||
}
|
||||
let defineName = target.define ? target.define().name : null
|
||||
if (defineName == null) {
|
||||
|
@ -22,15 +22,15 @@ export class Registry {
|
|||
if (!key || value == null) {
|
||||
return
|
||||
}
|
||||
this.collection.set(key, value)
|
||||
this.collection[key] = value
|
||||
}
|
||||
|
||||
get (name) {
|
||||
if (name) {
|
||||
return this.collection.get(name)
|
||||
return this.collection[name]
|
||||
}
|
||||
|
||||
throw new Error(`${name} not found`)
|
||||
throw new Error(`${name} cant blank`)
|
||||
}
|
||||
|
||||
getCollection () {
|
||||
|
|
|
@ -123,7 +123,7 @@ export class Executor {
|
|||
}
|
||||
|
||||
deployTrace.set({ value: { status: 'success', remark: '执行成功' } })
|
||||
trace.set({ type: 'result', value: { status: 'success', remark: '部署成功' } })
|
||||
trace.set({ type: 'result', value: { status: 'success', remark: '执行成功' } })
|
||||
} catch (e) {
|
||||
deployTrace.set({ value: { status: 'error', remark: '执行失败:' + e.message } })
|
||||
trace.set({ type: 'result', value: { status: 'error', remark: deployName + '执行失败:' + e.message } })
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</a-form-item>
|
||||
|
||||
<a-form-item v-for="(item,key) in currentPlugin.input" v-bind="item.component || {}" :key="key" :label="item.label" :name="key">
|
||||
<component-render v-model:value="currentTask[key]" v-bind="item.component || {}"></component-render>
|
||||
<component-render v-model:value="currentTask.props[key]" v-bind="item.component || {}"></component-render>
|
||||
<template #extra v-if="item.desc" >
|
||||
{{item.desc}}
|
||||
</template>
|
||||
|
@ -101,7 +101,7 @@ function useTaskForm (context) {
|
|||
}]
|
||||
})
|
||||
const taskAdd = (deploy) => {
|
||||
const task = { taskName: '新任务', type: undefined, _isAdd: true }
|
||||
const task = { taskName: '新任务', type: undefined, _isAdd: true, props: {} }
|
||||
currentDeploy.value = deploy
|
||||
currentDeploy.value.tasks.push(task)
|
||||
currentTask.value = deploy.tasks[deploy.tasks.length - 1]
|
||||
|
|
|
@ -226,6 +226,9 @@ function useExports (options) {
|
|||
return {
|
||||
async exportsToZip () {
|
||||
await exportsApi.exportsToZip(options)
|
||||
},
|
||||
async exportsToJson () {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue