perf: 增加警告,修复一些样式错乱问题

pull/78/head
xiaojunnuo 2024-06-19 00:20:35 +08:00
parent 7e483e6091
commit fd54c2ffac
5 changed files with 37 additions and 32 deletions

View File

@ -65,7 +65,6 @@ function install(app: App, options: any = {}) {
view: { type: "link", text: null, icon: "ion:eye-outline" }, view: { type: "link", text: null, icon: "ion:eye-outline" },
copy: { show: true, type: "link", text: null, icon: "ion:copy-outline" }, copy: { show: true, type: "link", text: null, icon: "ion:copy-outline" },
edit: { type: "link", text: null, icon: "ion:create-outline" }, edit: { type: "link", text: null, icon: "ion:create-outline" },
copy: {show:true,type: "link", text: null, icon: "ion:copy-outline"},
remove: { type: "link", style: { color: "red" }, text: null, icon: "ion:trash-outline" } remove: { type: "link", style: { color: "red" }, text: null, icon: "ion:trash-outline" }
}, },
dropdown: { dropdown: {
@ -126,16 +125,17 @@ function install(app: App, options: any = {}) {
} }
}, },
columns: { columns: {
createdAt: { // createdAt: {
title: "创建时间", // title: "创建时间",
type: "datetime", // type: "datetime",
form: { // form: {
show: false // show: false
}, // },
column: { // column: {
order: 1000 // show: false,
} // order: 1000
} // }
// }
} }
}; };

View File

@ -65,7 +65,9 @@ h1, h2, h3, h4, h5, h6 {
.mt-10{ .mt-10{
margin-top:10px; margin-top:10px;
} }
.mb-10{
margin-bottom: 10px;
}
.m-10{ .m-10{
margin:10px; margin:10px;
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<a-drawer v-model:open="stepDrawerVisible" placement="right" :closable="true" width="600px" @after-open-change="stepDrawerOnAfterVisibleChange"> <a-drawer v-model:open="stepDrawerVisible" placement="right" :closable="true" width="600px" @after-open-change="stepDrawerOnAfterVisibleChange">
<template #title> <template #title>
编辑任务 编辑步骤
<a-button v-if="editMode" @click="stepDelete()"> <a-button v-if="editMode" @click="stepDelete()">
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
</a-button> </a-button>

View File

@ -71,11 +71,11 @@ import _ from "lodash-es";
import { nanoid } from "nanoid"; import { nanoid } from "nanoid";
import PiStepForm from "../step-form/index.vue"; import PiStepForm from "../step-form/index.vue";
import { message, Modal } from "ant-design-vue"; import { message, Modal } from "ant-design-vue";
import {CopyOutlined} from "@ant-design/icons-vue"; import { CopyOutlined } from "@ant-design/icons-vue";
export default { export default {
name: "PiTaskForm", name: "PiTaskForm",
components: {CopyOutlined, PiStepForm }, components: { CopyOutlined, PiStepForm },
props: { props: {
editMode: { editMode: {
type: Boolean, type: Boolean,
@ -88,7 +88,7 @@ export default {
const stepFormRef: Ref<any> = ref(null); const stepFormRef: Ref<any> = ref(null);
const currentStepIndex = ref(0); const currentStepIndex = ref(0);
provide("currentStepIndex", currentStepIndex); provide("currentStepIndex", currentStepIndex);
const stepAdd = (task: any,stepDef:any) => { const stepAdd = (task: any, stepDef: any) => {
currentStepIndex.value = task.steps.length; currentStepIndex.value = task.steps.length;
stepFormRef.value.stepAdd((type: any, value: any) => { stepFormRef.value.stepAdd((type: any, value: any) => {
if (type === "save") { if (type === "save") {
@ -97,14 +97,14 @@ export default {
task.title = value.title; task.title = value.title;
} }
} }
},stepDef); }, stepDef);
}; };
const stepCopy = (task: any, step: any, stepIndex: any) => { const stepCopy = (task: any, step: any, stepIndex: any) => {
step = _.cloneDeep(step) step = _.cloneDeep(step);
step.id = nanoid() step.id = nanoid();
step.title = step.title +"_copy" step.title = step.title + "_copy";
stepAdd(task,step) stepAdd(task, step);
}; };
const stepEdit = (task: any, step: any, stepIndex: any) => { const stepEdit = (task: any, step: any, stepIndex: any) => {
currentStepIndex.value = stepIndex; currentStepIndex.value = stepIndex;
@ -135,7 +135,7 @@ export default {
}); });
}; };
return { stepAdd, stepEdit,stepCopy, stepDelete, stepFormRef }; return { stepAdd, stepEdit, stepCopy, stepDelete, stepFormRef };
} }
/** /**
@ -177,10 +177,10 @@ export default {
taskDrawerShow(); taskDrawerShow();
}; };
const taskAdd = (emit: any,taskMerge:any) => { const taskAdd = (emit: any, taskMerge: any) => {
mode.value = "add"; mode.value = "add";
const blankTask = { id: nanoid(), title: "新任务", steps: [], status: null } const blankTask = { id: nanoid(), title: "新任务", steps: [], status: null };
const task: any = _.merge(blankTask,taskMerge) ; const task: any = _.merge(blankTask, taskMerge);
taskOpen(task, emit); taskOpen(task, emit);
}; };
@ -234,7 +234,7 @@ export default {
taskSave, taskSave,
taskDelete, taskDelete,
rules, rules,
blankFn, blankFn
}; };
} }
return { return {
@ -252,5 +252,8 @@ export default {
.steps { .steps {
margin: 0 50px 0 50px; margin: 0 50px 0 50px;
} }
.ant-list .ant-list-item .ant-list-item-meta .ant-list-item-meta-title {
margin: 0;
}
} }
</style> </style>

View File

@ -4,16 +4,16 @@
<div class="title-line">Certd v{{ version }}</div> <div class="title-line">Certd v{{ version }}</div>
</div> </div>
<p class="d2-page-cover__sub-title">让你的证书永不过期</p> <p class="d2-page-cover__sub-title">让你的证书永不过期</p>
<div class="warnning">
<a-alert description="证书和授权信息为敏感信息不要使用来历不明的在线CertD服务请务必私有化部署使用认准官方版本发布渠道【github、gitee】" type="warning" show-icon />
</div>
<div class="content"> <div class="content">
<img src="/images/preview.png" class="preview_img" /> <img src="/images/preview.png" class="preview_img" />
</div> </div>
<div class="footer_box"> <div class="footer_box">
<div class="left"></div> <div>如果觉得好用请不要吝啬你的star哟</div>
<div class="right"> <a href="https://gitee.com/certd/certd" target="_blank"><img src="https://gitee.com/certd/certd/badge/star.svg?theme=dark" alt="star" /></a>
<div>如果觉得好用请不要吝啬你的star哟</div> <a href="https://github.com/certd/certd" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/certd/certd?logo=github" /></a>
<a href="https://gitee.com/certd/certd" target="_blank"><img src="https://gitee.com/certd/certd/badge/star.svg?theme=dark" alt="star" /></a>
<a href="https://github.com/certd/certd" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/certd/certd?logo=github" /></a>
</div>
</div> </div>
</div> </div>
</template> </template>