123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- const title = '高德地图'
- // 右侧配置项
- const setting = [
- {
- label: '语言类型',
- // 设置组件类型, select / input / colorPicker
- type: 'select',
- // 字段
- field: 'customize_lang',
- optionField: 'customize.lang', // 对应options中的字段
- // 是否多选
- multiple: false,
- options: [
- {
- label: '中文简称',
- value: 'zh_cn'
- },
- {
- label: '英文',
- value: 'en'
- },
- {
- label: '中英文对照',
- value: 'zh_en'
- }
- ],
- // 绑定的值
- value: 'zh_cn',
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: 'Key',
- // 设置组件类型, select / input / colorPicker
- type: 'input',
- // 字段
- field: 'customize_mapKey',
- // 高德地图的key
- optionField: 'customize.mapKey', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: '1b0a1423b70bbcbc20c9c87327e5e94e',
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '主题',
- // 设置组件类型, select / input / colorPicker
- type: 'select',
- // 字段
- field: 'customize_mapStyle',
- optionField: 'customize.mapStyle', // 对应options中的字段
- options: [
- {
- label: '标准',
- value: 'normal'
- },
- {
- label: '幻影黑',
- value: 'dark'
- },
- {
- label: '月光银',
- value: 'light'
- },
- {
- label: '远山黛',
- value: 'whitesmoke'
- },
- {
- label: '草色青',
- value: 'fresh'
- },
- {
- label: '雅士灰',
- value: 'grey'
- },
- {
- label: '涂鸦',
- value: 'graffiti'
- },
- {
- label: '马卡龙',
- value: 'macaron'
- },
- {
- label: '靛青蓝',
- value: 'blue'
- },
- {
- label: '极夜黑',
- value: 'darkblue'
- },
- {
- label: '酱籽',
- value: 'wine'
- }
- ],
- // 是否多选
- multiple: false,
- // 绑定的值
- value: 'normal',
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '内容',
- // 设置组件类型, select / input / colorPicker
- type: 'select',
- // 字段
- field: 'customize_features',
- optionField: 'customize.features', // 对应options中的字段
- options: [
- {
- label: '区域面',
- value: 'bg'
- },
- {
- label: '道路',
- value: 'road'
- },
- {
- label: '建筑物',
- value: 'building'
- },
- {
- label: '标注',
- value: 'point'
- }
- ],
- // 是否多选
- multiple: true,
- // 绑定的值
- value: ['bg', 'road', 'building', 'point'],
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '经度',
- // 设置组件类型, select / input / colorPicker
- type: 'inputNumber',
- min: 0,
- // 字段
- field: 'customize_lng',
- optionField: 'customize.lng', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: 117.13872961838531,
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '维度',
- // 设置组件类型, select / input / colorPicker
- type: 'inputNumber',
- // 范围
- min: 0,
- // 字段
- field: 'customize_lat',
- optionField: 'customize.lat', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: 31.826653302438004,
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '缩放',
- // 设置组件类型, select / input / colorPicker
- type: 'inputNumber',
- // 范围
- min: 3,
- max: 18,
- // 字段
- field: 'customize_zoom',
- optionField: 'customize.zoom', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: 16,
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '模式',
- // 设置组件类型, select / input / colorPicker
- type: 'select',
- options: [
- {
- label: '2D',
- value: '2D'
- },
- {
- label: '3D',
- value: '3D'
- }
- ],
- // 字段
- field: 'customize_viewMode',
- optionField: 'customize.viewMode', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: '2D',
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '标记内容',
- // 设置组件类型, select / input / colorPicker
- type: 'input',
- // 字段
- field: 'customize_markerSpan',
- optionField: 'customize.markerSpan', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: '科大国创软件股份有限公司',
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '标记点经度',
- // 设置组件类型, select / input / colorPicker
- type: 'inputNumber',
- min: 0,
- // 字段
- field: 'customize_markerLng',
- optionField: 'customize.markerLng', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: 117.13872961838531,
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- },
- {
- label: '标记点维度',
- // 设置组件类型, select / input / colorPicker
- type: 'inputNumber',
- // 字段
- field: 'customize_markerLat',
- optionField: 'customize.markerLat', // 对应options中的字段
- // 是否多选
- multiple: false,
- // 绑定的值
- value: 31.826653302438004,
- // tab页。 data: 数据, custom: 自定义
- tabName: 'custom'
- }
- ]
- // 模拟数据
- const option = {
- // 自定义组件其他属性
- customize: {
- lang: 'zh_cn',
- mapKey: '1b0a1423b70bbcbc20c9c87327e5e94e',
- mapStyle: 'normal',
- features: ['bg', 'road', 'building', 'point'],
- lng: 117.13872961838531,
- lat: 31.826653302438004,
- zoom: 17,
- markerSpan: '科大国创软件股份有限公司',
- markerLng: 117.13872961838531,
- markerLat: 31.826653302438004
- }
- }
- export default {
- title,
- setting,
- option: {
- ...option,
- displayOption: {
- dataAllocation: {
- enable: false
- }
- }
- }
- }
|