提交
This commit is contained in:
1 parent
c55269de86
commit
ee73f69759
64 files changed
+8023
-8085
No files matched your search
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="view-hero-main">
|
||||
<h2>{{ title }}</h2>
|
||||
<p v-if="meta" class="view-hero-meta">{{ meta }}</p>
|
||||
<p v-if="heroMeta" class="view-hero-meta">{{ heroMeta }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -112,6 +112,10 @@
|
||||
title: string
|
||||
icon?: Component
|
||||
meta?: string
|
||||
/** 顶部副标题展示的业务编码(渲染为「{codeLabel}:{code}」) */
|
||||
code?: string
|
||||
/** 与 code 搭配的标签文案,默认「编码」 */
|
||||
codeLabel?: string
|
||||
sections: ViewSection[]
|
||||
/** 弹窗宽度,默认 720px */
|
||||
width?: string
|
||||
@@ -149,6 +153,13 @@
|
||||
const iconComponent = computed(() =>
|
||||
isIconComponent(props.icon) ? props.icon : Document
|
||||
)
|
||||
|
||||
const heroMeta = computed(() => {
|
||||
if (props.meta) return props.meta
|
||||
const code = props.code
|
||||
if (code == null || code === '') return ''
|
||||
return `${props.codeLabel ?? '编码'}:${code}`
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in new issue
Block a user