perf: 优化一些小细节

pull/101/head
xiaojunnuo 2024-07-15 02:05:26 +08:00
parent 2fd14430a2
commit b1688525db
11 changed files with 63 additions and 18 deletions

View File

@ -17,7 +17,7 @@
"prepublishOnly1": "npm run check && npm run before-build && lerna run build ",
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",
"deploy1": "node --experimental-json-modules deploy.js ",
"check": "node --experimental-json-modules publish-check.js"
"check": "node --experimental-json-modules publish-check.js",
"init": "lerna run build"
},
"license": "AGPL-3.0",

View File

@ -48,20 +48,40 @@ h1, h2, h3, h4, h5, h6 {
vertical-align: 0 !important;
}
.flex-o{
display: flex !important;
align-items: center;
}
.flex{
display: flex;
align-items: center;
}
.flex-1{
flex: 1;
}
.ml-5{
margin-left:5px;
}
.ml-20{
margin-left:20px;
}
.ml-15{
margin-left:15px;
}
.mr-5{
margin-right: 5px;
}
.mr-20{
margin-right: 20px;
}
.mr-15{
margin-right: 15px;
}
.mt-10{
margin-top:10px;
}
@ -78,3 +98,13 @@ h1, h2, h3, h4, h5, h6 {
.p-10{
padding:10px;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.w-100{
width: 100%;
}

View File

@ -64,9 +64,12 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}
},
rowHandle: {
width: "180px"
width: "130px"
},
table: {
scroll: {
x: 800
},
rowSelection: {
type: "radio",
selectedRowKeys: selectedRowKey,
@ -100,6 +103,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
type: ["text"],
form: {
rules: [{ required: true, message: "请填写名称" }]
},
column: {
width: 200
}
},
...commonColumnsDefine

View File

@ -7,7 +7,7 @@
<span v-else class="mlr-5 gray">请选择</span>
<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">
<a-modal v-model:open="chooseForm.show" title="选择授权提供者" width="900px" @ok="chooseForm.ok">
<div style="height: 400px; position: relative">
<cert-access-modal v-model="selectedId" :type="type"></cert-access-modal>
</div>

View File

@ -45,6 +45,9 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any) {
search: {
show: false
},
column: {
width: 120
},
form: {
component: {
disabled: false

View File

@ -136,6 +136,7 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp
const files = await api.GetFiles(row.id);
Modal.success({
title: "文件下载",
okText: "↑↑↑ 点击链接下载",
content: () => {
const children = [];
for (const file of files) {

View File

@ -65,7 +65,7 @@
vModel: 'value',
options: [
{ value: 0, label: '正常运行(证书申请任务请选择它)' },
{ value: 1, label: '成功后跳过(其他任务请选择它)' }
{ value: 1, label: '成功后跳过(非证书任务请选择它)' }
]
},
helper: '该任务运行成功一次之后下次运行是否跳过,保持默认即可',

View File

@ -82,8 +82,10 @@
</div>
<div class="task">
<a-button shape="round" @click="taskEdit(stage, index, task, taskIndex)">
{{ task.title }}
<span class="flex-o w-100">
<span class="ellipsis flex-1" :class="{ 'mr-15': editMode }">{{ task.title }}</span>
<pi-status-show :status="task.status?.result"></pi-status-show>
</span>
</a-button>
<fs-icon v-if="editMode" class="copy" title="复制" icon="ion:copy-outline" @click="taskCopy(stage, index, task)"></fs-icon>
</div>

View File

@ -1,4 +1,5 @@
{
"compileOnSave": false,
"compilerOptions": {
// `this` `
"noImplicitAny": true,
@ -44,6 +45,7 @@
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
"node_modules",
"vite.config.ts"
]
}

View File

@ -1,11 +1,4 @@
import {
AbstractTaskPlugin,
IAccessService,
ILogger,
IsTaskPlugin,
RunStrategy,
TaskInput,
} from '@certd/pipeline';
import { AbstractTaskPlugin, IAccessService, ILogger, IsTaskPlugin, RunStrategy, TaskInput } from '@certd/pipeline';
import { CertInfo, CertReader } from '@certd/plugin-cert';
@IsTaskPlugin({
@ -69,7 +62,7 @@ export class DemoTestPlugin extends AbstractTaskPlugin {
helper: 'demoAccess授权',
component: {
name: 'pi-access-selector',
type: 'plugins',
type: 'demo', //固定授权类型
},
rules: [{ required: true, message: '此项必填' }],
})

View File

@ -7,9 +7,17 @@
# 设置环境变量
npm config set node_sqlite3_binary_host_mirror "https://registry.npmmirror.com/-/binary/sqlite3"
# 克隆代码
git clone https://github.com/certd/certd
#进入项目目录
cd certd
# 安装依赖
pnpm install
# 初始化构建
lerna run build
```
启动 server: