282 lines
7.7 KiB
Vue
282 lines
7.7 KiB
Vue
<template>
|
|
<CollapseItem name="内容设置" :expanded="true">
|
|
<SettingItemBox name="时间线设置">
|
|
<SettingItem name="背景颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.background"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="边界颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.bordercolor"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="时间线大小">
|
|
<n-select
|
|
v-model:value="optionData.dataStyle.size"
|
|
size="small"
|
|
:options="[
|
|
{ label: '中', value: 'medium' },
|
|
{ label: '大', value: 'large' },
|
|
]"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="图标大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.iconsize"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="上方边距">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.margintop"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="左侧边距">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.marginleft"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
</SettingItemBox>
|
|
<SettingItemBox name="最新内容设置">
|
|
<SettingItem name="标题字体颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.titleColorFirst"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="标题字体大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.titleFontSizeFirst"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="时间字体颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.timeColorFirst"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="时间字体大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.timeFontSizeFirst"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="文本字体颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.contentColorFirst"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="文本字体大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.contentFontSizeFirst"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
</SettingItemBox>
|
|
<SettingItemBox name="文本内容设置">
|
|
<SettingItem name="标题字体颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.titleColor"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="标题字体大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.titleFontSize"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="时间字体颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.timeColor"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="时间字体大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.timeFontSize"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="文本字体颜色">
|
|
<n-color-picker
|
|
size="small"
|
|
:modes="['hex']"
|
|
v-model:value="optionData.dataStyle.contentColor"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="文本字体大小">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.contentFontSize"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
</SettingItemBox>
|
|
<SettingItemBox name="图片设置">
|
|
<SettingItem name="图片类型">
|
|
<n-select v-model:value="optionData.dataStyle.imagefit" size="small" :options="fitList" />
|
|
</SettingItem>
|
|
<SettingItem name="图片圆角">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.imageborderRadius"
|
|
size="small"
|
|
:min="0"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="图片宽度">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.imagewidth"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="图片高度">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.imageheight"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="上边距离">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.imageMarginTop"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="水平对齐">
|
|
<n-select
|
|
v-model:value="optionData.dataStyle.imagealign"
|
|
size="small"
|
|
:options="textAlignOptions"
|
|
/>
|
|
</SettingItem>
|
|
</SettingItemBox>
|
|
<SettingItemBox name="视频设置">
|
|
<SettingItem>
|
|
<n-checkbox v-model:checked="optionData.dataStyle.videoloop" size="small">
|
|
循环播放
|
|
</n-checkbox>
|
|
</SettingItem>
|
|
<SettingItem>
|
|
<n-checkbox v-model:checked="optionData.dataStyle.videomuted" size="small">
|
|
静音
|
|
</n-checkbox>
|
|
</SettingItem>
|
|
<SettingItem name="视频类型">
|
|
<n-select v-model:value="optionData.dataStyle.videofit" size="small" :options="fitList" />
|
|
</SettingItem>
|
|
<SettingItem name="视频宽度">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.videowidth"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="视频高度">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.videoheight"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="上边距离">
|
|
<n-input-number
|
|
v-model:value="optionData.dataStyle.videoMarginTop"
|
|
min="0"
|
|
type="text"
|
|
size="small"
|
|
/>
|
|
</SettingItem>
|
|
<SettingItem name="水平对齐">
|
|
<n-select
|
|
v-model:value="optionData.dataStyle.videoalign"
|
|
size="small"
|
|
:options="textAlignOptions"
|
|
/>
|
|
</SettingItem>
|
|
</SettingItemBox>
|
|
</CollapseItem>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { PropType, watch, ref } from 'vue';
|
|
import { option } from './config';
|
|
import { cloneDeep } from 'lodash-es';
|
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting';
|
|
|
|
const props = defineProps({
|
|
optionData: {
|
|
type: Object as PropType<typeof option>,
|
|
required: true,
|
|
},
|
|
});
|
|
|
|
// 适应类型
|
|
const fitList = [
|
|
{
|
|
value: 'fill',
|
|
label: 'fill',
|
|
},
|
|
{
|
|
value: 'contain',
|
|
label: 'contain',
|
|
},
|
|
{
|
|
value: 'cover',
|
|
label: 'cover',
|
|
},
|
|
{
|
|
value: 'scale-down',
|
|
label: 'scale-down',
|
|
},
|
|
{
|
|
value: 'none',
|
|
label: 'none',
|
|
},
|
|
];
|
|
|
|
const textAlignOptions = [
|
|
{ label: '左对齐', value: 'left' },
|
|
{ label: '居中', value: 'center' },
|
|
{ label: '右对齐', value: 'right' },
|
|
];
|
|
</script>
|