12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- import _ from 'lodash-es';
- import { Config } from './types';
- export const ModuleSizeMap = {
- 'width:450px;height:280px;': '标准尺寸(450*280)',
- 'width:450px;height:570px;': '纵向拉伸(450*570)',
- 'width:450px;height:860px;': '纵向填充(450*860)',
- 'width:1000px;height:280px;': '横向拉伸(1000*280)',
- 'width:1920px;height:280px;': '横向填充(1920*280)',
- };
- /** 默认的模块宽高选项 */
- export const ModuleSizeOptions = _.map(ModuleSizeMap, (v, k) => ({
- value: k,
- label: v,
- }));
- /** 默认的模块版本选项,即外边框样式 */
- export const ModuleVersionOptions = _.map(['原版', '新版', '保德'], (k) => ({
- value: k,
- label: k,
- }));
- export const ModulePositionMap = {
- 'display:none;': '不展示',
- 'top:60px;left:0;': '左上',
- 'top:350px;left:0;': '左中',
- 'top:640px;left:0;': '左下',
- 'top:60px;right:0;': '右上',
- 'top:350px;right:0;': '右中',
- 'top:640px;right:0;': '右下',
- 'top:640px;left:460px;': '中下',
- };
- /** 默认的模块定位选项 */
- export const ModulePositionOptions = _.map(ModulePositionMap, (v, k) => ({
- value: k,
- label: v,
- }));
- /** 默认的模块预设选项,每个预设对应着一种写好的配置 */
- export const ModulePresetOptions = _.map(
- [
- // '告示版(1*1)',
- // '折线图(1*1)',
- // '面积图(1*1)',
- // '饼状图(1*1)',
- // '柱状图(2*1)',
- // '画廊(1*1)',
- // '列表(1*1)',
- // '表格(1*1)',
- '爆炸三角形(1*1)',
- ],
- (k) => ({
- value: k,
- label: k,
- })
- );
- /** 默认的模块预设表 */
- export const ModulePresetMap: Record<
- string,
- {
- moduleData: Config['moduleData'];
- showStyle: Partial<Config['showStyle']>;
- }
- > = {
- '爆炸三角形(1*1)': {
- moduleData: {
- header: {
- show: false,
- showSelector: true,
- showSlot: false,
- selector: {
- value: '${strinstallpos}',
- },
- slot: {
- value: '${strinstallpos}',
- },
- },
- background: {
- show: false,
- type: 'video',
- link: '',
- },
- layout: ['blast_delta'],
- board: [],
- gallery: [],
- list: [],
- table: [],
- chart: [],
- complex_list: [],
- preset: [{}],
- },
- showStyle: { size: 'width:450px;height:280px;' },
- },
- };
|