Merge remote-tracking branch 'origin/v2' into v2

# Conflicts:
#	package.json
#	packages/core/pipeline/package.json
#	packages/libs/k8s/package.json
#	packages/plugins/plugin-cert/package.json
#	packages/ui/certd-server/package.json
#	packages/ui/certd-server/src/plugins/plugin-host/lib/ssh.ts
#	packages/ui/certd-server/src/plugins/plugin-host/plugin/upload-to-host/index.ts
This commit is contained in:
xiaojunnuo
2024-07-15 01:33:04 +08:00
28 changed files with 313 additions and 86 deletions
@@ -222,6 +222,10 @@ export default {
);
}
}
//设置初始值
if (input.default != null && currentStep.value.input[key] == null) {
currentStep.value.input[key] = input.default ?? input.value;
}
}
}
@@ -1,7 +1,7 @@
import * as api from "./api";
import { utils, dict, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, UserPageQuery, UserPageRes, EditReq, DelReq, AddReq, ScopeContext } from "@fast-crud/fast-crud";
import { FsUploaderFormOptions } from "@fast-crud/fast-extends";
import "./editor.css";
export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
return await api.GetList(query);
@@ -79,6 +79,11 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
show: false
},
type: "editor-wang5", // 富文本图片上传依赖file-uploader,请先配置好file-uploader
viewForm: {
render({ value }) {
return <div class={"editor-content-view"} v-html={value}></div>;
}
},
form: {
helper: "示例已升级到wangEditor5版本,原来的editor-wang目前仍然可以使用,后续fs升级可能会将其删除,请尽快升级到editor-wang5版本",
col: { span: 24 },
@@ -0,0 +1,52 @@
.editor-content-view {
/*border: 1px solid #ccc;*/
/*border-radius: 5px;*/
padding: 0 10px;
margin-top: 20px;
overflow-x: auto;
}
.editor-content-view p,
.editor-content-view li {
white-space: pre-wrap; /* 保留空格 */
}
.editor-content-view blockquote {
border-left: 8px solid #d0e5f2;
padding: 10px 10px;
margin: 10px 0;
background-color: #f1f1f1;
}
.editor-content-view code {
font-family: monospace;
background-color: #eee;
padding: 3px;
border-radius: 3px;
}
.editor-content-view pre>code {
display: block;
padding: 10px;
}
.editor-content-view table {
border-collapse: collapse;
}
.editor-content-view td,
.editor-content-view th {
border: 1px solid #ccc;
min-width: 50px;
height: 20px;
}
.editor-content-view th {
background-color: #f1f1f1;
}
.editor-content-view ul,
.editor-content-view ol {
padding-left: 20px;
}
.editor-content-view input[type="checkbox"] {
margin-right: 5px;
}
@@ -57,7 +57,17 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
multiple: true, //可选择多个
uploader: {
type: "form",
keepName: true
keepName: true,
successHandle(res: any) {
//这里我的后台返回res是一个key 字符串
//此方法需要返回的数据结构为 {key:"string",url:"string"...}
// 如果 有返回url,那么buildUrl将不会被执行
return { key: res };
}
},
valueType: "key",
async buildUrl(value: string) {
return "http://www.docmirror.cn:7070/api/upload/form/download?key=" + value;
}
},
helper: "可以同时选择多个文件"