-
No.{{ item.ranking }}
+
{{ indexPrefix }}{{ item.ranking }}
-
+
{{ status.mergedConfig.valueFormatter ? status.mergedConfig.valueFormatter(item) : item.value }}
{{ unit }}
-
-
+
+
+ {{ status.mergedConfig.valueFormatter ? status.mergedConfig.valueFormatter(item) : item.value }}
+ {{ unit }}
+
@@ -28,7 +32,9 @@ const props = defineProps({
},
});
const { w, h } = toRefs(props.chartConfig.attr);
-const { rowNum, unit, color, textColor, borderColor, indexFontSize, leftFontSize, rightFontSize } = toRefs(props.chartConfig.option);
+const { type, rowNum, unit, height, color, textColor, borderColor, borderRadius, indexPrefix, indexFontSize, leftFontSize, rightFontSize } = toRefs(
+ props.chartConfig.option
+);
const status = reactive({
mergedConfig: props.chartConfig.option,
@@ -91,7 +97,7 @@ const calcHeights = (onresize = false) => {
const animation = async (start = false) => {
let { avgHeight, animationIndex, mergedConfig, rowsData, updater } = status;
- const { waitTime, carousel, rowNum } = mergedConfig;
+ const { isAnimation, waitTime, carousel, rowNum } = mergedConfig;
const rowLength = rowsData.length;
if (rowNum >= rowLength) return;
if (start) {
@@ -104,6 +110,7 @@ const animation = async (start = false) => {
status.rows = rows.slice(0, rowNum + 1);
status.heights = new Array(rowLength).fill(avgHeight);
await new Promise((resolve) => setTimeout(resolve, 300));
+ if (!isAnimation) return;
if (updater !== status.updater) return;
status.heights.splice(0, animationNum, ...new Array(animationNum).fill(0));
animationIndex += animationNum;
@@ -177,7 +184,7 @@ onUnmounted(() => {
diff --git a/src/router/modules/demo.js b/src/router/modules/demo.js
index dfc0f8b..f146968 100644
--- a/src/router/modules/demo.js
+++ b/src/router/modules/demo.js
@@ -1,14 +1,31 @@
+import Layout from '@/layouts/index.vue';
+
export default [
{
- path: '/scrollBoard',
- name: 'scrollBoard',
- component: () => import('@/views/demo/scrollBoard.vue'),
- meta: { title: '轮播列表', icon: 'document' },
- },
- {
- path: '/rank',
- name: 'rank',
- component: () => import('@/views/demo/rank.vue'),
- meta: { title: '滚动排名列表', icon: 'document' },
+ path: '/demo',
+ name: 'layout',
+ component: Layout,
+ redirect: '/demo/scrollBoard',
+ meta: { title: '案例', icon: 'document' },
+ children: [
+ {
+ path: '/demo/scrollBoard',
+ name: 'scrollBoard',
+ component: () => import('@/views/demo/scrollBoard.vue'),
+ meta: { title: '轮播列表', icon: 'document' },
+ },
+ {
+ path: '/demo/rank',
+ name: 'rank',
+ component: () => import('@/views/demo/rank.vue'),
+ meta: { title: '滚动排名列表', icon: 'document' },
+ },
+ {
+ path: '/demo/test',
+ component: () => import('@/views/land/index.vue'),
+ name: 'demo-land',
+ meta: { title: '土地资源', icon: 'document' },
+ },
+ ],
},
];
diff --git a/src/views/demo/rank.vue b/src/views/demo/rank.vue
index 919d943..3093a15 100644
--- a/src/views/demo/rank.vue
+++ b/src/views/demo/rank.vue
@@ -25,18 +25,22 @@ const options = ref({
{ name: '新乡', value: 3832 },
{ name: '大同', value: 1811 },
],
+ type: 'column',
// 表行数
rowNum: 5,
+ isAnimation: true,
// 轮播时间
waitTime: 2,
// 数值单位
unit: '',
+ height: 16,
// 自动排序
sort: true,
color: '#1370fb',
textColor: '#CDD2F8FF',
borderColor: '#1370fb80',
carousel: 'single',
+ indexPrefix: 'TOP',
//序号字体大小
indexFontSize: 12,
//左侧数据字体大小
diff --git a/src/views/land/components/distributionCharts.vue b/src/views/land/components/distributionCharts.vue
index 501725c..280eb76 100644
--- a/src/views/land/components/distributionCharts.vue
+++ b/src/views/land/components/distributionCharts.vue
@@ -1,77 +1,114 @@
-
-
-
+
-
diff --git a/src/views/land/components/landCirculation.vue b/src/views/land/components/landCirculation.vue
index fda8e7c..687d111 100644
--- a/src/views/land/components/landCirculation.vue
+++ b/src/views/land/components/landCirculation.vue
@@ -1,113 +1,88 @@
-
-
-
-
-
-
-
-
- {{ item[b] }}
-
-
-
-
-
-
+
+
-
-
diff --git a/src/views/land/components/landPatrol.vue b/src/views/land/components/landPatrol.vue
index d7682f5..f68255c 100644
--- a/src/views/land/components/landPatrol.vue
+++ b/src/views/land/components/landPatrol.vue
@@ -1,121 +1,79 @@
-
-
-
-
-
-
-
-
-
- {{ item[b] }}
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-