mirror of https://github.com/certd/certd
chore: 优化
parent
0f5b9564c6
commit
11d1f6e141
|
@ -40,5 +40,8 @@ export default {
|
|||
return str.length > length ? str.slice(0, length) + "..." : str;
|
||||
}
|
||||
return "";
|
||||
},
|
||||
transformLink(desc: string = "") {
|
||||
return desc.replace(/\[(.*)\]\((.*)\)/g, '<a href="$2" target="_blank">$1</a>');
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,6 +3,7 @@ import { computed, provide, ref, toRef } from "vue";
|
|||
import { useReference } from "/@/use/use-refrence";
|
||||
import { forEach, get, merge, set } from "lodash-es";
|
||||
import SecretPlainGetter from "/@/views/certd/access/access-selector/access/secret-plain-getter.vue";
|
||||
import { utils } from "/@/utils";
|
||||
|
||||
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
||||
provide("accessApi", api);
|
||||
|
@ -117,13 +118,15 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
|||
buildDefineFields(define, form, mode);
|
||||
}
|
||||
},
|
||||
helper: computed(() => {
|
||||
const define = currentDefine.value;
|
||||
if (define == null) {
|
||||
return "";
|
||||
helper: {
|
||||
render: () => {
|
||||
const define = currentDefine.value;
|
||||
if (define == null) {
|
||||
return "";
|
||||
}
|
||||
return <div innerHTML={utils.transformLink(define.desc)}></div>;
|
||||
}
|
||||
return define.desc;
|
||||
})
|
||||
}
|
||||
},
|
||||
addForm: {
|
||||
value: typeRef
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<vip-button v-if="item.needPlus" mode="icon" />
|
||||
</template>
|
||||
<template #description>
|
||||
<span :title="item.desc">{{ item.desc }}</span>
|
||||
<span :title="item.desc" v-html="transformDesc(item.desc)"></span>
|
||||
</template>
|
||||
</a-card-meta>
|
||||
</a-card>
|
||||
|
@ -66,7 +66,11 @@
|
|||
<pi-container v-else class="pi-step-form">
|
||||
<template #header>
|
||||
<div class="mb-10">
|
||||
<a-alert type="info" :message="currentPlugin.title" :description="currentPlugin.desc"> </a-alert>
|
||||
<a-alert type="info" :message="currentPlugin.title">
|
||||
<template #description>
|
||||
<div v-html="transformDesc(currentPlugin.desc)"></div>
|
||||
</template>
|
||||
</a-alert>
|
||||
</div>
|
||||
</template>
|
||||
<div class="w-100 h-100">
|
||||
|
@ -114,6 +118,7 @@ import { useReference } from "/@/use/use-refrence";
|
|||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import * as pluginApi from "../../../api.plugin";
|
||||
import { mitter } from "/@/utils/util.mitt";
|
||||
import { utils } from "/@/utils";
|
||||
export default {
|
||||
name: "PiStepForm",
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
|
@ -126,6 +131,10 @@ export default {
|
|||
},
|
||||
emits: ["update"],
|
||||
setup(props: any, context: any) {
|
||||
function transformDesc(desc: string = "") {
|
||||
return utils.transformLink(desc);
|
||||
}
|
||||
|
||||
/**
|
||||
* step drawer
|
||||
* @returns
|
||||
|
@ -395,7 +404,8 @@ export default {
|
|||
...useStepForm(),
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 16 },
|
||||
runStrategyProps
|
||||
runStrategyProps,
|
||||
transformDesc
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue