新增标题副标题显示
parent
f73a0f50ff
commit
5db603fb6b
|
|
@ -69,11 +69,15 @@ const title_style = computed(() => {
|
|||
const subtitle_style = computed(() => {
|
||||
let common_styles = '';
|
||||
if (new_style.value.subtitle_weight == 'italic') {
|
||||
common_styles += `font-style: italic`;
|
||||
common_styles += `font-style: italic;`;
|
||||
} else if (['bold', '500'].includes(new_style.value.subtitle_weight)) {
|
||||
common_styles += `font-weight: bold;`;
|
||||
}
|
||||
return `color:${new_style.value.subtitle_color}; font-size: ${new_style.value.subtitle_size}px; ${common_styles}`;
|
||||
let flex = '';
|
||||
if (form.value.is_subtitle_center == '1') {
|
||||
flex = 'display: flex; justify-content: center;';
|
||||
}
|
||||
return `color:${new_style.value.subtitle_color}; font-size: ${new_style.value.subtitle_size}px; ${common_styles} ${ flex }`;
|
||||
});
|
||||
// 标题是否居中
|
||||
const title_center = computed(() => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="w h">
|
||||
<el-form :model="form" label-width="70">
|
||||
<el-form :model="form" label-width="80">
|
||||
<common-content-top :value="form.content_top"></common-content-top>
|
||||
<div class="divider-line"></div>
|
||||
<card-container>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<el-form-item label="标题链接">
|
||||
<url-value v-model="form.title_link"></url-value>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否居中">
|
||||
<el-form-item label="标题居中">
|
||||
<el-switch v-model="form.is_title_center" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片/图标">
|
||||
|
|
@ -20,6 +20,9 @@
|
|||
<el-form-item label="副标题">
|
||||
<el-input v-model="form.subtitle" placeholder="请输入副标题" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="副标题居中">
|
||||
<el-switch v-model="form.is_subtitle_center" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
</card-container>
|
||||
<div class="bg-f5 divider-line" />
|
||||
<card-container>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ interface defaultSearch {
|
|||
icon_class: string;
|
||||
subtitle: string;
|
||||
is_title_center: string;
|
||||
is_subtitle_center: string;
|
||||
keyword_show: string;
|
||||
keyword_list: carousel_list[];
|
||||
right_show: string;
|
||||
|
|
@ -57,6 +58,7 @@ const defaultSearch: defaultSearch = {
|
|||
subtitle: '',
|
||||
// 内容居中
|
||||
is_title_center: '0',
|
||||
is_subtitle_center: '0',
|
||||
// 右侧内容设置
|
||||
right_show: '1',
|
||||
right_title: '更多',
|
||||
|
|
|
|||
Loading…
Reference in New Issue