提交 368c2cb2 作者: test

fix: 修复样式错误

上级 7e9f67bf
...@@ -91,21 +91,23 @@ ...@@ -91,21 +91,23 @@
<view v-if="data.title" class="title">{{ data.title }}</view> <view v-if="data.title" class="title">{{ data.title }}</view>
<!-- JSON --> <!-- JSON -->
<template v-if="isArray(data.option.items?.[0])"> <view class="option">
<view v-for="(item, index) in data.option.items" :key="index" class="item-wrap"> <template v-if="isArray(data.option.items?.[0])">
<view v-for="(subItem, subIndex) in item" :key="subIndex" class="items"> <view v-for="(item, index) in data.option.items" :key="index" class="item-wrap">
<ReuseTemplate :item="subItem" /> <view v-for="(subItem, subIndex) in item" :key="subIndex" class="items">
<ReuseTemplate :item="subItem" />
</view>
</view> </view>
</view> </template>
</template>
<template v-else> <template v-else>
<view class="item-wrap"> <view class="item-wrap">
<view v-for="(item, index) in data.option.items" :key="index" class="items"> <view v-for="(item, index) in data.option.items" :key="index" class="items">
<ReuseTemplate :item="item" /> <ReuseTemplate :item="item" />
</view>
</view> </view>
</view> </template>
</template> </view>
<!-- 复用渲染组件 --> <!-- 复用渲染组件 -->
<DefineTemplate v-slot="{ item, sub }"> <DefineTemplate v-slot="{ item, sub }">
......
// 页面通用配置信息或一些抽象方法 // 页面通用配置信息或一些抽象方法
// 单色块图例配置 // 单色块图例配置
// export const defaultLegendConfig = {
// expand: true,
// title: '单位: mm',
// option: {
// blockStyle: {
// border: '1px solid #ccc',
// },
// items: [
// {
// color: '#FFFFFF',
// label: '0-0.1',
// },
// {
// color: '#A3F48A',
// label: '0.1-9.0',
// },
// {
// color: '#35AB02',
// label: '10-24.9',
// },
// {
// color: '#61B9F9',
// label: '25-49.9',
// },
// {
// color: '#0403FF',
// label: '50-99.9',
// },
// {
// color: '#FA02FA',
// label: '100-249.9',
// },
// {
// color: '#810042',
// label: '>=250',
// },
// ],
// },
// }
// 多色块图例配置
export const defaultLegendConfig = { export const defaultLegendConfig = {
expand: true, expand: true,
title: '单位: mm', title: '单位: mm',
...@@ -50,70 +9,111 @@ export const defaultLegendConfig = { ...@@ -50,70 +9,111 @@ export const defaultLegendConfig = {
border: '1px solid #ccc', border: '1px solid #ccc',
}, },
items: [ items: [
[ {
{ color: '#FFFFFF',
color: '#FFFFFF', label: '0-0.1',
label: '0-0.1', },
}, {
{ color: '#A3F48A',
color: '#A3F48A', label: '0.1-9.0',
label: '0.1-9.0', },
}, {
{ color: '#35AB02',
color: '#35AB02', label: '10-24.9',
label: '10-24.9', },
}, {
{ color: '#61B9F9',
color: '#61B9F9', label: '25-49.9',
label: '25-49.9', },
}, {
{ color: '#0403FF',
color: '#0403FF', label: '50-99.9',
label: '50-99.9', },
}, {
{ color: '#FA02FA',
color: '#FA02FA', label: '100-249.9',
label: '100-249.9', },
}, {
{ color: '#810042',
color: '#810042', label: '>=250',
label: '>=250', },
},
],
[
{
color: '#FFFFFF',
label: '0-0.1',
},
{
color: '#A3F48A',
label: '0.1-9.0',
},
{
color: '#35AB02',
label: '10-24.9',
},
{
color: '#61B9F9',
label: '25-49.9',
},
{
color: '#0403FF',
label: '50-99.9',
},
{
color: '#FA02FA',
label: '100-249.9',
},
{
color: '#810042',
label: '>=250',
},
],
], ],
}, },
} }
// 多色块图例配置
// export const defaultLegendConfig = {
// expand: true,
// title: '单位: mm',
// option: {
// blockStyle: {
// border: '1px solid #ccc',
// },
// items: [
// [
// {
// color: '#FFFFFF',
// label: '0-0.1',
// },
// {
// color: '#A3F48A',
// label: '0.1-9.0',
// },
// {
// color: '#35AB02',
// label: '10-24.9',
// },
// {
// color: '#61B9F9',
// label: '25-49.9',
// },
// {
// color: '#0403FF',
// label: '50-99.9',
// },
// {
// color: '#FA02FA',
// label: '100-249.9',
// },
// {
// color: '#810042',
// label: '>=250',
// },
// ],
// [
// {
// color: '#FFFFFF',
// label: '0-0.1',
// },
// {
// color: '#A3F48A',
// label: '0.1-9.0',
// },
// {
// color: '#35AB02',
// label: '10-24.9',
// },
// {
// color: '#61B9F9',
// label: '25-49.9',
// },
// {
// color: '#0403FF',
// label: '50-99.9',
// },
// {
// color: '#FA02FA',
// label: '100-249.9',
// },
// {
// color: '#810042',
// label: '>=250',
// },
// ],
// ],
// },
// }
// 单边图标图例 // 单边图标图例
// export const defaultLegendConfig = { // export const defaultLegendConfig = {
// expand: true, // expand: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论