mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
perf: 说明优化,默认值优化
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<fs-icon class="cd-icon-button" icon="ion:close-circle-outline" @click="clear"></fs-icon>
|
||||
</span>
|
||||
<span v-else class="mlr-5 gray">请选择</span>
|
||||
<a-button @click="chooseForm.open">选择</a-button>
|
||||
<a-button class="ml-5" @click="chooseForm.open">选择</a-button>
|
||||
<a-form-item-rest v-if="chooseForm.show">
|
||||
<a-modal v-model:open="chooseForm.show" title="选择授权提供者" width="700px" @ok="chooseForm.ok">
|
||||
<div style="height: 400px; position: relative">
|
||||
@@ -46,9 +46,9 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function clear(){
|
||||
function clear() {
|
||||
selectedId.value = "";
|
||||
target.value = null
|
||||
target.value = null;
|
||||
ctx.emit("update:modelValue", selectedId.value);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return {
|
||||
clear,
|
||||
target,
|
||||
|
||||
+27
-3
@@ -1,7 +1,7 @@
|
||||
import { compute } from "@fast-crud/fast-crud";
|
||||
import { compute, CreateCrudOptionsProps, CreateCrudOptionsRet } from "@fast-crud/fast-crud";
|
||||
import { Dicts } from "./dicts";
|
||||
|
||||
export default function () {
|
||||
export default function (): CreateCrudOptionsRet {
|
||||
return {
|
||||
crudOptions: {
|
||||
form: {
|
||||
@@ -12,7 +12,7 @@ export default function () {
|
||||
columns: {
|
||||
domains: {
|
||||
title: "域名",
|
||||
type: ["dict-select"],
|
||||
type: "dict-select",
|
||||
search: {
|
||||
show: true,
|
||||
component: {
|
||||
@@ -58,6 +58,30 @@ export default function () {
|
||||
rules: [{ required: true, type: "email", message: "请填写邮箱" }]
|
||||
}
|
||||
},
|
||||
blank: {
|
||||
title: "占位",
|
||||
type: "text",
|
||||
form: {
|
||||
blank: true
|
||||
}
|
||||
},
|
||||
sslProvider: {
|
||||
title: "证书提供商",
|
||||
type: "dict-select",
|
||||
dict: Dicts.sslProviderDict
|
||||
},
|
||||
eabAccess: {
|
||||
title: "EAB授权",
|
||||
type: "dict-select",
|
||||
form: {
|
||||
component: {
|
||||
name: "PiAccessSelector",
|
||||
type: "eab",
|
||||
vModel: "modelValue"
|
||||
},
|
||||
helper: "如果是ZeroSSL,需要配置EAB授权,https://app.zerossl.com/developer 生成 'EAB' "
|
||||
}
|
||||
},
|
||||
dnsProviderType: {
|
||||
title: "DNS提供商",
|
||||
type: "dict-select",
|
||||
@@ -1,7 +1,12 @@
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
|
||||
export const Dicts = {
|
||||
certIssuerDict: dict({ data: [{ value: "letencrypt", label: "LetEncrypt" }] }),
|
||||
sslProviderDict: dict({
|
||||
data: [
|
||||
{ value: "letsencrypt", label: "Let‘s Encrypt" },
|
||||
{ value: "zerossl", label: "ZeroSSL" }
|
||||
]
|
||||
}),
|
||||
challengeTypeDict: dict({ data: [{ value: "dns", label: "DNS校验" }] }),
|
||||
dnsProviderTypeDict: dict({
|
||||
url: "pi/dnsProvider/dnsProviderTypeDict"
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ref } from "vue";
|
||||
import _ from "lodash-es";
|
||||
export default {
|
||||
name: "PiCertdForm",
|
||||
setup(props:any, ctx:any) {
|
||||
setup(props: any, ctx: any) {
|
||||
// 自定义表单配置
|
||||
const { buildFormOptions } = useColumns();
|
||||
//使用crudOptions结构来构建自定义表单配置
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
const formOptions = buildFormOptions(
|
||||
_.merge(crudOptions, {
|
||||
form: {
|
||||
doSubmit({ form }:any) {
|
||||
doSubmit({ form }: any) {
|
||||
// 创建certd 的pipeline
|
||||
doSubmitRef.value({ form });
|
||||
}
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
const formWrapperRef = ref();
|
||||
const formWrapperOptions = ref();
|
||||
formWrapperOptions.value = formOptions;
|
||||
function open(doSubmit:any) {
|
||||
function open(doSubmit: any) {
|
||||
doSubmitRef.value = doSubmit;
|
||||
formWrapperRef.value.open(formWrapperOptions.value);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
<template #actionbar-right>
|
||||
<!-- <span style="margin-left: 10px">出现<a-tag>Promise rejected attempt #18,retrying in 10000ms:No TXT recordsfound for name</a-tag>属于正常现象,多重试几次</span>-->
|
||||
</template>
|
||||
<template #form-bottom>
|
||||
<div>
|
||||
申请证书
|
||||
</div>
|
||||
</template>
|
||||
<pi-certd-form ref="certdFormRef"></pi-certd-form>
|
||||
</fs-crud>
|
||||
</fs-page>
|
||||
|
||||
+7
-7
@@ -64,11 +64,11 @@
|
||||
name: 'a-select',
|
||||
vModel: 'value',
|
||||
options: [
|
||||
{ value: 0, label: '正常运行' },
|
||||
{ value: 1, label: '成功后跳过' }
|
||||
{ value: 0, label: '正常运行(证书申请任务请选择它)' },
|
||||
{ value: 1, label: '成功后跳过(其他任务请选择它)' }
|
||||
]
|
||||
},
|
||||
helper:'该任务运行成功一次之后下次运行是否跳过,证书申请任务务必选择正常运行',
|
||||
helper: '该任务运行成功一次之后下次运行是否跳过,保持默认即可',
|
||||
rules: [{ required: true, message: '此项必填' }]
|
||||
}"
|
||||
:get-context-fn="blankFn"
|
||||
@@ -90,10 +90,10 @@ import { message, Modal } from "ant-design-vue";
|
||||
import { computed, inject, Ref, ref } from "vue";
|
||||
import _ from "lodash-es";
|
||||
import { nanoid } from "nanoid";
|
||||
import {CopyOutlined} from "@ant-design/icons-vue";
|
||||
import { CopyOutlined } from "@ant-design/icons-vue";
|
||||
export default {
|
||||
name: "PiStepForm",
|
||||
components:{CopyOutlined},
|
||||
components: { CopyOutlined },
|
||||
props: {
|
||||
editMode: {
|
||||
type: Boolean,
|
||||
@@ -173,7 +173,7 @@ export default {
|
||||
stepDrawerShow();
|
||||
};
|
||||
|
||||
const stepAdd = (emit: any,stepDef:any) => {
|
||||
const stepAdd = (emit: any, stepDef: any) => {
|
||||
mode.value = "add";
|
||||
const step: any = {
|
||||
id: nanoid(),
|
||||
@@ -183,7 +183,7 @@ export default {
|
||||
input: {},
|
||||
status: null
|
||||
};
|
||||
_.merge(step,stepDef)
|
||||
_.merge(step, stepDef);
|
||||
stepOpen(step, emit);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user