chore: code format

This commit is contained in:
xiaojunnuo
2025-06-29 14:09:09 +08:00
parent 04422a4637
commit 4fcfd089d8
644 changed files with 10845 additions and 13184 deletions
@@ -13,7 +13,7 @@ export default {
methods: {
toHome() {
this.$router.push({ path: "/" });
}
}
},
},
};
</script>
@@ -13,7 +13,7 @@ export default {
methods: {
toHome() {
this.$router.push({ path: "/" });
}
}
},
},
};
</script>
@@ -23,17 +23,17 @@ const props = withDefaults(
{
data: () => {
return [];
}
},
}
);
const dates = computed(() => {
return props.data.map((item) => {
return props.data.map(item => {
return item.name;
});
});
const counts = computed(() => {
return props.data.map((item) => {
return props.data.map(item => {
return item.value;
});
});
@@ -43,15 +43,15 @@ const option = ref({
show: props.data.length === 0, // 没数据才显示
extStyle: {
color: "grey",
fontSize: 20
fontSize: 20,
},
text: "暂无数据",
left: "center",
top: "center"
top: "center",
},
tooltip: {
trigger: "item"
trigger: "item",
},
// tooltip: {
// trigger: "axis",
@@ -70,19 +70,19 @@ const option = ref({
left: "20px",
right: "20px",
bottom: "10px",
containLabel: true
containLabel: true,
},
xAxis: [
{
type: "category",
boundaryGap: false,
data: dates
}
data: dates,
},
],
yAxis: [
{
type: "value"
}
type: "value",
},
],
series: [
{
@@ -91,16 +91,16 @@ const option = ref({
stack: "Total",
label: {
show: true,
position: "top"
position: "top",
},
smooth: true,
areaStyle: {},
emphasis: {
focus: "series"
focus: "series",
},
data: counts
}
]
data: counts,
},
],
});
</script>
@@ -22,19 +22,19 @@ const props = defineProps<{
const option = ref({
color: ["#91cc75", "#73c0de", "#ee6666", "#fac858", "#5470c6", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc", "#5470c6"],
tooltip: {
trigger: "item"
trigger: "item",
},
legend: {
orient: "vertical",
bottom: "5%",
left: "left"
left: "left",
},
grid: {
top: "20px",
left: "20px",
right: "20px",
bottom: "10px",
containLabel: true
containLabel: true,
},
series: [
{
@@ -46,25 +46,25 @@ const option = ref({
itemStyle: {
borderRadius: 0,
borderColor: "#fff",
borderWidth: 1
borderWidth: 1,
},
label: {
show: false,
position: "center"
position: "center",
},
emphasis: {
label: {
show: false,
fontSize: 18,
fontWeight: "bold"
}
fontWeight: "bold",
},
},
labelLine: {
show: false
show: false,
},
data: props.data
}
]
data: props.data,
},
],
});
</script>
@@ -11,14 +11,12 @@
<div class="text">
<div class="left">
<div>
<span>{{ t('certd.dashboard.greeting', { name: userInfo.nickName || userInfo.username, site: siteInfo.title }) }}</span>
<span>{{ t("certd.dashboard.greeting", { name: userInfo.nickName || userInfo.username, site: siteInfo.title }) }}</span>
</div>
<div class="flex-o flex-wrap profile-badges">
<a-tooltip :title="deltaTimeTip">
<a-badge :dot="deltaTimeWarning">
<a-tag :color="deltaTimeWarning ? 'red' : 'green'" class="flex-inline pointer">
<fs-icon icon="ion:time-outline"></fs-icon> {{ now }}
</a-tag>
<a-tag :color="deltaTimeWarning ? 'red' : 'green'" class="flex-inline pointer"> <fs-icon icon="ion:time-outline"></fs-icon> {{ now }} </a-tag>
</a-badge>
</a-tooltip>
@@ -50,7 +48,7 @@
<tutorial-button class="flex-center mt-2">
<a-tooltip :title="t('certd.dashboard.tutorialTooltip')">
<a-tag color="blue" class="flex-center">
{{ t('certd.dashboard.tutorialText') }}
{{ t("certd.dashboard.tutorialText") }}
<fs-icon class="font-size-16 ml-5" icon="mingcute:question-line"></fs-icon>
</a-tag>
</a-tooltip>
@@ -61,10 +59,9 @@
<div v-if="!settingStore.isComm" class="warning">
<a-alert type="warning" show-icon>
<template #message>
{{ t('certd.dashboard.alertMessage') }}
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a>
<a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a>
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t('certd.dashboard.helpDoc') }}</a>
{{ t("certd.dashboard.alertMessage") }}
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a> <a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a>
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t("certd.dashboard.helpDoc") }}</a>
</template>
</a-alert>
</div>
@@ -75,14 +72,12 @@
<statistic-card :title="t('certd.dashboard.pipelineCount')" :count="count.pipelineCount">
<template v-if="count.pipelineCount === 0" #default>
<div class="flex-center flex-1 flex-col">
<div style="font-size: 18px; font-weight: 700">{{ t('certd.dashboard.noPipeline') }}</div>
<fs-button type="primary" class="mt-10" icon="ion:add-circle-outline" @click="goPipeline">{{ t('certd.dashboard.createNow') }}</fs-button>
<div style="font-size: 18px; font-weight: 700">{{ t("certd.dashboard.noPipeline") }}</div>
<fs-button type="primary" class="mt-10" icon="ion:add-circle-outline" @click="goPipeline">{{ t("certd.dashboard.createNow") }}</fs-button>
</div>
</template>
<template #footer>
<router-link to="/certd/pipeline" class="flex">
<fs-icon icon="ion:settings-outline" class="mr-5 fs-16" /> {{ t('certd.dashboard.managePipeline') }}
</router-link>
<router-link to="/certd/pipeline" class="flex"> <fs-icon icon="ion:settings-outline" class="mr-5 fs-16" /> {{ t("certd.dashboard.managePipeline") }} </router-link>
</template>
</statistic-card>
</a-col>
@@ -107,7 +102,7 @@
<div v-if="pluginGroups" class="plugin-list">
<a-card>
<template #title>
{{ t('certd.dashboard.supportedTasks') }}
{{ t("certd.dashboard.supportedTasks") }}
<a-tag color="green">{{ pluginGroups.groups.all.plugins.length }}</a-tag>
</template>
<a-row :gutter="10">
@@ -136,7 +131,6 @@
</div>
</template>
<script lang="ts" setup>
import { FsIcon } from "@fast-crud/fast-crud";
import SimpleSteps from "/@/components/tutorial/simple-steps.vue";
@@ -36,9 +36,7 @@
</span>
<span>(<expires-time-text :value="item.expiresTime" />)</span>
</a-tag>
<div v-if="detail.suites?.length === 0" class="flex-o ml-5">
暂无套餐 <a-button class="ml-5" type="primary" size="small" @click="goBuy">去购买</a-button>
</div>
<div v-if="detail.suites?.length === 0" class="flex-o ml-5">暂无套餐 <a-button class="ml-5" type="primary" size="small" @click="goBuy">去购买</a-button></div>
</div>
</a-popover>
</div>
@@ -54,7 +52,7 @@ import { FsIcon } from "@fast-crud/fast-crud";
import { useRouter } from "vue-router";
defineOptions({
name: "SuiteCard"
name: "SuiteCard",
});
const detail = ref<SuiteDetail>({});
@@ -68,7 +66,7 @@ loadSuiteDetail();
const router = useRouter();
function goBuy() {
router.push({
path: "/certd/suite/buy"
path: "/certd/suite/buy",
});
}
</script>
@@ -2,10 +2,7 @@
<fs-page class="home—index bg-neutral-100 dark:bg-black">
<!-- <page-content />-->
<dashboard-user />
<change-password-button
ref="changePasswordButtonRef"
:show-button="false"
></change-password-button>
<change-password-button ref="changePasswordButtonRef" :show-button="false"></change-password-button>
</fs-page>
</template>
@@ -1,16 +1,6 @@
<template>
<div class="main">
<a-form
ref="formRef"
class="user-layout-register"
name="custom-validation"
:model="formState"
:rules="rules"
v-bind="layout"
:label-col="{ span: 6 }"
@finish="handleFinish"
@finish-failed="handleFinishFailed"
>
<a-form ref="formRef" class="user-layout-register" name="custom-validation" :model="formState" :rules="rules" v-bind="layout" :label-col="{ span: 6 }" @finish="handleFinish" @finish-failed="handleFinishFailed">
<a-tabs v-model:active-key="registerType">
<a-tab-pane key="username" tab="用户名注册" :disabled="!settingsStore.sysPublic.usernameRegisterEnabled">
<template v-if="registerType === 'username'">
@@ -104,7 +94,7 @@ export default defineComponent({
if (!settingsStore.sysPublic.usernameRegisterEnabled) {
registerType.value = "";
notification.error({
message: "没有启用任何一种注册方式"
message: "没有启用任何一种注册方式",
});
}
}
@@ -117,7 +107,7 @@ export default defineComponent({
username: "",
password: "",
confirmPassword: "",
randomStr: ""
randomStr: "",
});
const rules = {
@@ -125,32 +115,32 @@ export default defineComponent({
{
required: true,
trigger: "change",
message: "请输入用户名"
}
message: "请输入用户名",
},
],
email: [
{
required: true,
trigger: "change",
message: "请输入邮箱"
message: "请输入邮箱",
},
{
type: "email",
message: "请输入正确的邮箱"
}
message: "请输入正确的邮箱",
},
],
password: [
{
required: true,
trigger: "change",
message: "请输入密码"
}
message: "请输入密码",
},
],
confirmPassword: [
{
required: true,
trigger: "change",
message: "请确认密码"
message: "请确认密码",
},
{
validator: async (rule: any, value: any) => {
@@ -158,41 +148,41 @@ export default defineComponent({
throw new Error("两次输入密码不一致");
}
return true;
}
}
},
},
],
imgCode: [
{
required: true,
message: "请输入图片验证码"
message: "请输入图片验证码",
},
{
min: 4,
max: 4,
message: "请输入4位图片验证码"
}
message: "请输入4位图片验证码",
},
],
smsCode: [
{
required: true,
message: "请输入短信验证码"
}
message: "请输入短信验证码",
},
],
validateCode: [
{
required: true,
message: "请输入邮件验证码"
}
]
message: "请输入邮件验证码",
},
],
};
const layout = {
labelCol: {
span: 0
span: 0,
},
wrapperCol: {
span: 24
}
span: 24,
},
};
const handleFinish = async (values: any) => {
@@ -204,7 +194,7 @@ export default defineComponent({
imgCode: formState.imgCode,
randomStr: formState.randomStr,
email: formState.email,
validateCode: formState.validateCode
validateCode: formState.validateCode,
}) as any
);
};
@@ -235,9 +225,9 @@ export default defineComponent({
handleFinish,
resetForm,
registerType,
settingsStore
settingsStore,
};
}
},
});
</script>