mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
chore: 更多翻译
This commit is contained in:
@@ -5,8 +5,10 @@ import { useModal } from "/@/use/use-modal";
|
||||
import createCrudOptionsPipeline from "../crud";
|
||||
import * as pipelineApi from "../api";
|
||||
import { useTemplate } from "/@/views/certd/pipeline/template/use";
|
||||
import { useI18n } from "/@/locales";
|
||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const api = templateApi;
|
||||
const { t } = useI18n();
|
||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||
return await api.GetList(query);
|
||||
};
|
||||
@@ -65,7 +67,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
show: true,
|
||||
buttons: {
|
||||
add: {
|
||||
text: "创建模版",
|
||||
text: t("certd.template.createTemplate"),
|
||||
type: "primary",
|
||||
show: true,
|
||||
},
|
||||
@@ -119,13 +121,13 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
title: {
|
||||
title: "模版名称",
|
||||
title: t("certd.template.templateName"),
|
||||
type: "text",
|
||||
search: {
|
||||
show: true,
|
||||
},
|
||||
form: {
|
||||
rules: [{ required: true, message: "请输入模版名称" }],
|
||||
rules: [{ required: true, message: t("certd.template.enterTemplateName") }],
|
||||
},
|
||||
column: {
|
||||
width: 400,
|
||||
@@ -141,7 +143,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
pipelineId: {
|
||||
title: "流水线ID",
|
||||
title: t("certd.template.pipeline"),
|
||||
type: "table-select",
|
||||
search: { show: true },
|
||||
dict: dict({
|
||||
@@ -160,7 +162,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
form: {
|
||||
show: true,
|
||||
helper: "复制该流水线配置作为模版来源",
|
||||
helper: t("certd.template.copyPipelineConfig"),
|
||||
component: {
|
||||
valuesFormat: {
|
||||
labelFormatter: (item: any) => {
|
||||
@@ -191,7 +193,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
useCreate: {
|
||||
title: "使用此模版",
|
||||
title: t("certd.template.useTemplate"),
|
||||
form: { show: false },
|
||||
column: {
|
||||
conditionalRender: false,
|
||||
@@ -208,14 +210,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
return (
|
||||
<a class={"flex items-center"} onClick={create}>
|
||||
<fs-icon icon={"ion:duplicate-outline"}></fs-icon>
|
||||
<span class={"ml-5"}>创建单个流水线</span>
|
||||
<span class={"ml-5"}>{t("certd.template.singleCreate")}</span>
|
||||
</a>
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
useImport: {
|
||||
title: "使用此模版",
|
||||
title: t("certd.template.useTemplate"),
|
||||
form: { show: false },
|
||||
column: {
|
||||
conditionalRender: false,
|
||||
@@ -224,7 +226,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
return (
|
||||
<router-link class={"flex items-center"} to={{ path: "/certd/pipeline/template/import", query: { templateId: row.id } }}>
|
||||
<fs-icon icon={"ion:duplicate"}></fs-icon>
|
||||
<span class={"ml-5"}>批量创建流水线</span>
|
||||
<span class={"ml-5"}>{t("certd.template.batchCreate")}</span>
|
||||
</router-link>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<fs-page>
|
||||
<template #header>
|
||||
<div class="title flex items-center">
|
||||
流水线模版
|
||||
{{ t("certd.template.title") }}
|
||||
<span class="ml-10 sub flex items-center">
|
||||
<span>可根据模版批量创建流水线 </span>
|
||||
<span>{{ t("certd.template.intro") }} </span>
|
||||
<vip-button class="ml-10" mode="button" />
|
||||
</span>
|
||||
</div>
|
||||
@@ -17,12 +17,12 @@
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
|
||||
import { useI18n } from "vue-i18n";
|
||||
defineOptions({
|
||||
name: "PipelineTemplate",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
|
||||
const { t } = useI18n();
|
||||
// 页面打开后获取列表数据
|
||||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
|
||||
@@ -217,7 +217,6 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "../../../style/theme/index.less";
|
||||
|
||||
.login-page.main {
|
||||
//margin: 20px !important;
|
||||
@@ -229,7 +228,6 @@ export default defineComponent({
|
||||
//}
|
||||
|
||||
.login-title {
|
||||
color: @primary-color;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin: 20px;
|
||||
@@ -274,7 +272,6 @@ export default defineComponent({
|
||||
transition: color 0.3s;
|
||||
|
||||
&:hover {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,6 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "../../../style/theme/index.less";
|
||||
.user-layout-register {
|
||||
label {
|
||||
font-size: 14px;
|
||||
@@ -294,7 +293,6 @@ export default defineComponent({
|
||||
transition: color 0.3s;
|
||||
|
||||
&:hover {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user