'admin-21.03.01:新增过滤筛选、echarts树形关系图'

This commit is contained in:
lyt-Top 2021-03-01 22:52:25 +08:00
parent 6e9ec5bb27
commit 8019fafa5c
7 changed files with 1028 additions and 63 deletions

View File

@ -348,11 +348,11 @@ export const dynamicRoutes = [
}
},
{
path: '/fun/graph',
name: 'relationGraph',
component: () => import('/@/views/fun/graph/index.vue'),
path: '/fun/echartsTree',
name: 'echartsTree',
component: () => import('/@/views/fun/tree/index.vue'),
meta: {
title: 'graph 关系图谱',
title: 'echartsTree 树图',
isLink: '',
isHide: false,
isKeepAlive: true,
@ -367,7 +367,7 @@ export const dynamicRoutes = [
{
path: '/pages',
name: 'pagesIndex',
component: () => import('/@/views/pages/index.vue'),
component: () => import('/@/views/layout/routerView/parent.vue'),
meta: {
title: '页面',
isLink: '',
@ -377,7 +377,24 @@ export const dynamicRoutes = [
isIframe: false,
auth: ['admin', 'test'],
icon: 'iconfont icon-fuzhiyemian'
}
},
children: [
{
path: '/pages/filtering',
name: 'filtering',
component: () => import('/@/views/pages/filtering/index.vue'),
meta: {
title: '过滤筛选组件',
isLink: '',
isHide: false,
isKeepAlive: true,
isAffix: false,
isIframe: false,
auth: ['admin', 'test'],
icon: 'el-icon-sell'
}
},
]
},
{
path: '/chart',

View File

@ -1,36 +0,0 @@
<template>
<div :style="{height: `calc(100vh - ${initTagViewHeight}`}">
<div class="layout-view-bg-white">
</div>
</div>
</template>
<script lang="ts">
import { toRefs, reactive, computed, onMounted } from "vue";
import { useStore } from "/@/store/index.ts";
export default {
name: "Graph",
setup() {
const store = useStore();
const state = reactive({
tagViewHeight: "",
});
//
const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig;
if (isTagsview) return `114px`;
else return `80px`;
});
//
const initGraph = () => {};
//
onMounted(() => {
initGraph();
});
return {
initTagViewHeight,
...toRefs(state),
};
},
};
</script>

View File

@ -0,0 +1,85 @@
<template>
<div :style="{height: `calc(100vh - ${initTagViewHeight}`}">
<div class="layout-view-bg-white">
<div id="echartsTree" style="height:100%;"></div>
</div>
</div>
</template>
<script lang="ts">
import { toRefs, reactive, computed, onMounted } from "vue";
import * as echarts from "echarts";
import { useStore } from "/@/store/index.ts";
import { echartsTreeList } from "./mock.ts";
export default {
name: "echartsTree",
setup() {
const store = useStore();
const state = reactive({
tagViewHeight: "",
echartsTreeList,
});
//
const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig;
if (isTagsview) return `114px`;
else return `80px`;
});
//
const initEchartsTree = () => {
const myChart = echarts.init(document.getElementById("echartsTree"));
state.echartsTreeList.children.forEach((datum, index) => {
index % 2 === 0 && (datum.collapsed = true);
});
const option = {
tooltip: {
trigger: "item",
triggerOn: "mousemove",
},
series: [
{
type: "tree",
data: [state.echartsTreeList],
top: "1%",
left: "7%",
bottom: "1%",
right: "20%",
symbolSize: 7,
label: {
position: "left",
verticalAlign: "middle",
align: "right",
fontSize: 9,
},
leaves: {
label: {
position: "right",
verticalAlign: "middle",
align: "left",
},
},
emphasis: {
focus: "descendant",
},
expandAndCollapse: true,
animationDuration: 550,
animationDurationUpdate: 750,
},
],
};
myChart.setOption(option);
window.addEventListener("resize", () => {
myChart.resize();
});
};
//
onMounted(() => {
initEchartsTree();
});
return {
initTagViewHeight,
...toRefs(state),
};
},
};
</script>

381
src/views/fun/tree/mock.ts Normal file
View File

@ -0,0 +1,381 @@
// 模拟数据
export const echartsTreeList = {
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{ "name": "AgglomerativeCluster", "value": 3938 },
{ "name": "CommunityStructure", "value": 3812 },
{ "name": "HierarchicalCluster", "value": 6714 },
{ "name": "MergeEdge", "value": 743 }
]
},
{
"name": "graph",
"children": [
{ "name": "BetweennessCentrality", "value": 3534 },
{ "name": "LinkDistance", "value": 5731 },
{ "name": "MaxFlowMinCut", "value": 7840 },
{ "name": "ShortestPaths", "value": 5914 },
{ "name": "SpanningTree", "value": 3416 }
]
},
{
"name": "optimization",
"children": [
{ "name": "AspectRatioBanker", "value": 7074 }
]
}
]
},
{
"name": "animate",
"children": [
{ "name": "Easing", "value": 17010 },
{ "name": "FunctionSequence", "value": 5842 },
{
"name": "interpolate",
"children": [
{ "name": "ArrayInterpolator", "value": 1983 },
{ "name": "ColorInterpolator", "value": 2047 },
{ "name": "DateInterpolator", "value": 1375 },
{ "name": "Interpolator", "value": 8746 },
{ "name": "MatrixInterpolator", "value": 2202 },
{ "name": "NumberInterpolator", "value": 1382 },
{ "name": "ObjectInterpolator", "value": 1629 },
{ "name": "PointInterpolator", "value": 1675 },
{ "name": "RectangleInterpolator", "value": 2042 }
]
},
{ "name": "ISchedulable", "value": 1041 },
{ "name": "Parallel", "value": 5176 },
{ "name": "Pause", "value": 449 },
{ "name": "Scheduler", "value": 5593 },
{ "name": "Sequence", "value": 5534 },
{ "name": "Transition", "value": 9201 },
{ "name": "Transitioner", "value": 19975 },
{ "name": "TransitionEvent", "value": 1116 },
{ "name": "Tween", "value": 6006 }
]
},
{
"name": "data",
"children": [
{
"name": "converters",
"children": [
{ "name": "Converters", "value": 721 },
{ "name": "DelimitedTextConverter", "value": 4294 },
{ "name": "GraphMLConverter", "value": 9800 },
{ "name": "IDataConverter", "value": 1314 },
{ "name": "JSONConverter", "value": 2220 }
]
},
{ "name": "DataField", "value": 1759 },
{ "name": "DataSchema", "value": 2165 },
{ "name": "DataSet", "value": 586 },
{ "name": "DataSource", "value": 3331 },
{ "name": "DataTable", "value": 772 },
{ "name": "DataUtil", "value": 3322 }
]
},
{
"name": "display",
"children": [
{ "name": "DirtySprite", "value": 8833 },
{ "name": "LineSprite", "value": 1732 },
{ "name": "RectSprite", "value": 3623 },
{ "name": "TextSprite", "value": 10066 }
]
},
{
"name": "flex",
"children": [
{ "name": "FlareVis", "value": 4116 }
]
},
{
"name": "physics",
"children": [
{ "name": "DragForce", "value": 1082 },
{ "name": "GravityForce", "value": 1336 },
{ "name": "IForce", "value": 319 },
{ "name": "NBodyForce", "value": 10498 },
{ "name": "Particle", "value": 2822 },
{ "name": "Simulation", "value": 9983 },
{ "name": "Spring", "value": 2213 },
{ "name": "SpringForce", "value": 1681 }
]
},
{
"name": "query",
"children": [
{ "name": "AggregateExpression", "value": 1616 },
{ "name": "And", "value": 1027 },
{ "name": "Arithmetic", "value": 3891 },
{ "name": "Average", "value": 891 },
{ "name": "BinaryExpression", "value": 2893 },
{ "name": "Comparison", "value": 5103 },
{ "name": "CompositeExpression", "value": 3677 },
{ "name": "Count", "value": 781 },
{ "name": "DateUtil", "value": 4141 },
{ "name": "Distinct", "value": 933 },
{ "name": "Expression", "value": 5130 },
{ "name": "ExpressionIterator", "value": 3617 },
{ "name": "Fn", "value": 3240 },
{ "name": "If", "value": 2732 },
{ "name": "IsA", "value": 2039 },
{ "name": "Literal", "value": 1214 },
{ "name": "Match", "value": 3748 },
{ "name": "Maximum", "value": 843 },
{
"name": "methods",
"children": [
{ "name": "add", "value": 593 },
{ "name": "and", "value": 330 },
{ "name": "average", "value": 287 },
{ "name": "count", "value": 277 },
{ "name": "distinct", "value": 292 },
{ "name": "div", "value": 595 },
{ "name": "eq", "value": 594 },
{ "name": "fn", "value": 460 },
{ "name": "gt", "value": 603 },
{ "name": "gte", "value": 625 },
{ "name": "iff", "value": 748 },
{ "name": "isa", "value": 461 },
{ "name": "lt", "value": 597 },
{ "name": "lte", "value": 619 },
{ "name": "max", "value": 283 },
{ "name": "min", "value": 283 },
{ "name": "mod", "value": 591 },
{ "name": "mul", "value": 603 },
{ "name": "neq", "value": 599 },
{ "name": "not", "value": 386 },
{ "name": "or", "value": 323 },
{ "name": "orderby", "value": 307 },
{ "name": "range", "value": 772 },
{ "name": "select", "value": 296 },
{ "name": "stddev", "value": 363 },
{ "name": "sub", "value": 600 },
{ "name": "sum", "value": 280 },
{ "name": "update", "value": 307 },
{ "name": "variance", "value": 335 },
{ "name": "where", "value": 299 },
{ "name": "xor", "value": 354 },
{ "name": "-", "value": 264 }
]
},
{ "name": "Minimum", "value": 843 },
{ "name": "Not", "value": 1554 },
{ "name": "Or", "value": 970 },
{ "name": "Query", "value": 13896 },
{ "name": "Range", "value": 1594 },
{ "name": "StringUtil", "value": 4130 },
{ "name": "Sum", "value": 791 },
{ "name": "Variable", "value": 1124 },
{ "name": "Variance", "value": 1876 },
{ "name": "Xor", "value": 1101 }
]
},
{
"name": "scale",
"children": [
{ "name": "IScaleMap", "value": 2105 },
{ "name": "LinearScale", "value": 1316 },
{ "name": "LogScale", "value": 3151 },
{ "name": "OrdinalScale", "value": 3770 },
{ "name": "QuantileScale", "value": 2435 },
{ "name": "QuantitativeScale", "value": 4839 },
{ "name": "RootScale", "value": 1756 },
{ "name": "Scale", "value": 4268 },
{ "name": "ScaleType", "value": 1821 },
{ "name": "TimeScale", "value": 5833 }
]
},
{
"name": "util",
"children": [
{ "name": "Arrays", "value": 8258 },
{ "name": "Colors", "value": 10001 },
{ "name": "Dates", "value": 8217 },
{ "name": "Displays", "value": 12555 },
{ "name": "Filter", "value": 2324 },
{ "name": "Geometry", "value": 10993 },
{
"name": "heap",
"children": [
{ "name": "FibonacciHeap", "value": 9354 },
{ "name": "HeapNode", "value": 1233 }
]
},
{ "name": "IEvaluable", "value": 335 },
{ "name": "IPredicate", "value": 383 },
{ "name": "IValueProxy", "value": 874 },
{
"name": "math",
"children": [
{ "name": "DenseMatrix", "value": 3165 },
{ "name": "IMatrix", "value": 2815 },
{ "name": "SparseMatrix", "value": 3366 }
]
},
{ "name": "Maths", "value": 17705 },
{ "name": "Orientation", "value": 1486 },
{
"name": "palette",
"children": [
{ "name": "ColorPalette", "value": 6367 },
{ "name": "Palette", "value": 1229 },
{ "name": "ShapePalette", "value": 2059 },
{ "name": "SizePalette", "value": 2291 }
]
},
{ "name": "Property", "value": 5559 },
{ "name": "Shapes", "value": 19118 },
{ "name": "Sort", "value": 6887 },
{ "name": "Stats", "value": 6557 },
{ "name": "Strings", "value": 22026 }
]
},
{
"name": "vis",
"children": [
{
"name": "axis",
"children": [
{ "name": "Axes", "value": 1302 },
{ "name": "Axis", "value": 24593 },
{ "name": "AxisGridLine", "value": 652 },
{ "name": "AxisLabel", "value": 636 },
{ "name": "CartesianAxes", "value": 6703 }
]
},
{
"name": "controls",
"children": [
{ "name": "AnchorControl", "value": 2138 },
{ "name": "ClickControl", "value": 3824 },
{ "name": "Control", "value": 1353 },
{ "name": "ControlList", "value": 4665 },
{ "name": "DragControl", "value": 2649 },
{ "name": "ExpandControl", "value": 2832 },
{ "name": "HoverControl", "value": 4896 },
{ "name": "IControl", "value": 763 },
{ "name": "PanZoomControl", "value": 5222 },
{ "name": "SelectionControl", "value": 7862 },
{ "name": "TooltipControl", "value": 8435 }
]
},
{
"name": "data",
"children": [
{ "name": "Data", "value": 20544 },
{ "name": "DataList", "value": 19788 },
{ "name": "DataSprite", "value": 10349 },
{ "name": "EdgeSprite", "value": 3301 },
{ "name": "NodeSprite", "value": 19382 },
{
"name": "render",
"children": [
{ "name": "ArrowType", "value": 698 },
{ "name": "EdgeRenderer", "value": 5569 },
{ "name": "IRenderer", "value": 353 },
{ "name": "ShapeRenderer", "value": 2247 }
]
},
{ "name": "ScaleBinding", "value": 11275 },
{ "name": "Tree", "value": 7147 },
{ "name": "TreeBuilder", "value": 9930 }
]
},
{
"name": "events",
"children": [
{ "name": "DataEvent", "value": 2313 },
{ "name": "SelectionEvent", "value": 1880 },
{ "name": "TooltipEvent", "value": 1701 },
{ "name": "VisualizationEvent", "value": 1117 }
]
},
{
"name": "legend",
"children": [
{ "name": "Legend", "value": 20859 },
{ "name": "LegendItem", "value": 4614 },
{ "name": "LegendRange", "value": 10530 }
]
},
{
"name": "operator",
"children": [
{
"name": "distortion",
"children": [
{ "name": "BifocalDistortion", "value": 4461 },
{ "name": "Distortion", "value": 6314 },
{ "name": "FisheyeDistortion", "value": 3444 }
]
},
{
"name": "encoder",
"children": [
{ "name": "ColorEncoder", "value": 3179 },
{ "name": "Encoder", "value": 4060 },
{ "name": "PropertyEncoder", "value": 4138 },
{ "name": "ShapeEncoder", "value": 1690 },
{ "name": "SizeEncoder", "value": 1830 }
]
},
{
"name": "filter",
"children": [
{ "name": "FisheyeTreeFilter", "value": 5219 },
{ "name": "GraphDistanceFilter", "value": 3165 },
{ "name": "VisibilityFilter", "value": 3509 }
]
},
{ "name": "IOperator", "value": 1286 },
{
"name": "label",
"children": [
{ "name": "Labeler", "value": 9956 },
{ "name": "RadialLabeler", "value": 3899 },
{ "name": "StackedAreaLabeler", "value": 3202 }
]
},
{
"name": "layout",
"children": [
{ "name": "AxisLayout", "value": 6725 },
{ "name": "BundledEdgeRouter", "value": 3727 },
{ "name": "CircleLayout", "value": 9317 },
{ "name": "CirclePackingLayout", "value": 12003 },
{ "name": "DendrogramLayout", "value": 4853 },
{ "name": "ForceDirectedLayout", "value": 8411 },
{ "name": "IcicleTreeLayout", "value": 4864 },
{ "name": "IndentedTreeLayout", "value": 3174 },
{ "name": "Layout", "value": 7881 },
{ "name": "NodeLinkTreeLayout", "value": 12870 },
{ "name": "PieLayout", "value": 2728 },
{ "name": "RadialTreeLayout", "value": 12348 },
{ "name": "RandomLayout", "value": 870 },
{ "name": "StackedAreaLayout", "value": 9121 },
{ "name": "TreeMapLayout", "value": 9191 }
]
},
{ "name": "Operator", "value": 2490 },
{ "name": "OperatorList", "value": 5248 },
{ "name": "OperatorSequence", "value": 4190 },
{ "name": "OperatorSwitch", "value": 2581 },
{ "name": "SortOperator", "value": 2023 }
]
},
{ "name": "Visualization", "value": 16540 }
]
}
]
}

View File

@ -0,0 +1,320 @@
<template>
<div class="filtering">
<el-card shadow="hover" class="filtering-list br-top-no" v-loading="tableData.loading" element-loading-text="加载中..."
element-loading-background="rgba(255, 255, 255, 0.1)" :class="{'min-h-360': tableData.data.length <= 0}">
<div v-for="(val,key) in filtering" :key="key" :ref="el => { if (el) dlRefs[key] = el }"
class="filtering-list-flex">
<div class="filtering-list-title">{{val.title}}</div>
<div class="filtering-list-item" :style="{'height': val.isMore ? 'auto' : '50px' }">
<span class="span" :class="v.active ? 'dd-active' : ''" v-for="(v,k) in val.children" :key="k"
@click="onSelItem(val,v)">{{v.label}}</span>
<div class="dd-more" v-if="val.isShowMore" @click="val.isMore = !val.isMore">
<span>{{val.isMore ? '收起' : '展开'}}</span>
<i :class="val.isMore ? 'el-icon-arrow-down' : 'el-icon-arrow-right'"></i>
</div>
</div>
</div>
<div class="flex-warp mt15 mb15" v-if="tableData.data.length > 0">
<el-row :gutter="15">
<el-col :sm="6" class="mb15" v-for="(v,k) in tableData.data" :key="k" @click="onTableItemClick(v)">
<div class="flex-warp-item">
<div class="flex-warp-item-box">
<div class="item-img">
<img :src="v.img" />
</div>
<div class="item-txt">
<div class="item-txt-title">{{v.title}}</div>
<div class="item-txt-other">
<div style="width: 100%;">
<div class="item-txt-msg mb10">
<span>评价 {{v.evaluate}}</span>
<span class="ml10">收藏 {{v.collection}}</span>
</div>
<div class="item-txt-msg item-txt-price">
<span class="font-price">
<span></span>
<span class="font">{{v.price}}</span>
</span>
<span>月销{{v.monSales}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<div v-else class="filtering-no-data">
<div class="no-data-box">
<i class="el-icon-search"></i>
<div class="no-txt">暂无数据</div>
</div>
</div>
<template v-if="tableData.data.length > 0">
<el-pagination style="text-align: right;" background @size-change="onHandleSizeChange"
@current-change="onHandleCurrentChange" :page-sizes="[10, 20, 30]" :current-page="tableData.param.pageNum"
:page-size="tableData.param.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total">
</el-pagination>
</template>
</el-card>
</div>
</template>
<script lang="ts">
import { ref, toRefs, reactive, onMounted, nextTick } from "vue";
import { filtering, filterList } from "./mock.ts";
export default {
name: "filtering",
setup() {
const dlRefs = ref([]);
const state = reactive({
filtering,
tableData: {
data: filterList,
total: 99,
loading: false,
param: {
pageNum: 1,
pageSize: 10,
},
},
});
//
onMounted(() => {
initBtnToggle();
window.onresize = () => {
initBtnToggle();
};
});
// ``
const initBtnToggle = () => {
nextTick(() => {
const els = dlRefs.value;
els.map((v, k) => {
v.scrollHeight < v.lastChild.scrollHeight
? (state.filtering[k].isShowMore = true)
: (state.filtering[k].isShowMore = false);
});
});
};
//
const onSelItem = (val, v) => {
val.children.map((v) => (v.active = false));
v.active = true;
let arr = [];
state.filtering.map((item) => {
item.children.map((chil) => {
if (chil.active) {
arr.push({
...item,
children: [{ ...chil }],
});
}
});
});
state.tableData.loading = true;
setTimeout(() => {
state.tableData.loading = false;
}, 500);
};
//
const onTableItemClick = (v) => {};
//
const onHandleSizeChange = (val) => {
state.tableData.param.pageSize = val;
};
//
const onHandleCurrentChange = (val) => {
state.tableData.param.pageNum = val;
};
return {
dlRefs,
onSelItem,
onTableItemClick,
onHandleSizeChange,
onHandleCurrentChange,
...toRefs(state),
};
},
};
</script>
<style scoped lang="scss">
.filtering {
.filtering-list {
overflow: hidden;
border-bottom: none !important;
.filtering-list-flex {
&:last-of-type {
.filtering-list-item {
border-bottom: none !important;
}
}
.filtering-list-title {
float: left;
width: 64px;
font-weight: 700;
position: relative;
color: #909399;
margin: 15px 0;
&:after {
content: "";
position: absolute;
border: 1px solid #909399;
border-width: 0 1px 1px 0;
width: 4px;
height: 4px;
transform: rotate(-45deg) translateY(-50%);
right: 10px;
top: 50%;
}
}
.filtering-list-item {
border-bottom: 1px dotted #e0e0e0;
margin-left: 64px;
overflow: hidden;
position: relative;
.span {
color: #8d8d91;
font-size: 14px;
float: left;
padding: 0 15px;
margin: 15px 0;
&:hover {
color: var(--color-primary);
cursor: pointer;
}
}
.dd-active {
color: var(--color-primary);
}
.dd-more {
font-size: 12px;
position: absolute;
right: 0;
top: 16px;
color: #a5a5a5;
&:hover {
cursor: pointer;
color: #8d8d91;
}
}
}
}
}
.br-top-no {
border-top: none;
.flex-warp {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
margin: 0 -5px;
.flex-warp-item {
padding: 5px;
width: 100%;
height: 360px;
.flex-warp-item-box {
border: 1px solid #ebeef5;
width: 100%;
height: 100%;
border-radius: 2px;
display: flex;
flex-direction: column;
transition: all 0.3s ease;
&:hover {
cursor: pointer;
border: 1px solid var(--color-primary);
transition: all 0.3s ease;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.03);
.item-txt-title {
color: var(--color-primary) !important;
transition: all 0.3s ease;
}
.item-img {
img {
transition: all 0.3s ease;
transform: translateZ(0) scale(1.05);
}
}
}
.item-img {
width: 100%;
height: 215px;
overflow: hidden;
img {
transition: all 0.3s ease;
width: 100%;
height: 100%;
}
}
.item-txt {
flex: 1;
padding: 15px;
display: flex;
flex-direction: column;
overflow: hidden;
.item-txt-title {
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
display: -webkit-box;
color: #666666;
transition: all 0.3s ease;
&:hover {
color: var(--color-primary);
text-decoration: underline;
transition: all 0.3s ease;
}
}
.item-txt-other {
flex: 1;
align-items: flex-end;
display: flex;
.item-txt-msg {
font-size: 12px;
color: #8d8d91;
}
.item-txt-price {
display: flex;
justify-content: space-between;
align-items: center;
.font-price {
color: #ff5000;
.font {
font-size: 22px;
}
}
}
}
}
}
}
}
::v-deep(.el-card__body) {
height: 100%;
.filtering-no-data {
display: flex;
height: 100%;
.no-data-box {
color: #cccccc;
margin: auto;
i {
font-size: 70px;
}
.no-txt {
font-size: 14px;
text-align: center;
margin-top: 15px;
}
}
}
}
}
.min-h-360 {
height: 360px;
}
}
</style>

View File

@ -0,0 +1,219 @@
// 导航数据
export const filtering = [
{
title: "权限",
isMore: false,
id: 0,
children: [
{
id: "01",
label: "全部",
active: true,
},
{
id: "02",
label: "普通用户",
active: false,
},
{
id: "03",
label: "管理员",
active: false,
},
],
},
{
title: "布局",
isMore: false,
id: 1,
children: [
{
id: 11,
label: "全部",
active: true,
},
{
id: 12,
label: "默认",
active: false,
},
{
id: 13,
label: "经典",
active: false,
},
{
id: 14,
label: "横向",
active: false,
},
{
id: 15,
label: "分栏",
active: false,
},
],
},
{
title: "配置",
isMore: false,
id: 2,
children: [
{
id: 21,
label: "全部",
active: true,
},
{
id: 22,
label: "开启 Breadcrumb",
active: false,
},
{
id: 23,
label: "开启 Tags-View",
active: false,
},
{
id: 24,
label: "固定 Header",
active: false,
},
{
id: 25,
label: "侧边栏 Logo",
active: false,
},
{
id: 26,
label: "开启折叠 NavMenu",
active: false,
},
{
id: 27,
label: "开启一个 NavMenu 展开",
active: false,
},
{
id: 28,
label: "登录用户头像",
active: false,
},
],
},
];
// 列表数据
export const filterList = [
{
img:
"http://news.sznews.com/pic/2020-08/14/9d9c9a60-f0af-41aa-b617-683b07c87642.jpg",
title: "嘉陵江2020年第1号洪水”在嘉陵江支流涪江形成",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 1,
isShowMore: false
},
{
img:
"http://www.sznews.com/news/pic/2020-08/13/0ea47d3c-feb9-4bd7-8597-a8a373aa6340c6ec12c7-3b33-4528-91a6-85ec8ca1df67_watermark.png",
title: "让《民法典》走近群众 盐田街道开展人民调解宣传活动",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 2,
isShowMore: false
},
{
img:
"http://www.sznews.com/photo/pic/2020-08/12/a08d6eb0-1d53-4f76-a313-ad3e5d701f98.jpg",
title:
"记者手记可可西里“挪”向“藏羚羊大产房”的14个半小时 记者手记可可西里“挪”向“藏羚羊大产房”的14个半小时",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 3,
isShowMore: false
},
{
img:
"http://www.sznews.com/photo/pic/2020-08/11/43cc0e14-9bca-45b9-9a8b-342e09d6a4c7.jpg",
title: "以优异成绩庆祝深圳经济特区建立40周年",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 4,
isShowMore: false
},
{
img:
"http://www.sznews.com/photo/pic/2020-08/11/a4dc322b-68ec-40e6-8906-3124142c3e49.jpg",
title: "草原上的“太阳姑娘”",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 5,
isShowMore: false
},
{
img:
"http://www.sznews.com/zhuanti/pic/2020-08/07/57f087b4-4812-46cc-adb9-ead73621284e.png",
title: "奇观天下|带你走进非洲野生动物观光第一目的地",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 6,
isShowMore: false
},
{
img:
"http://news.sznews.com/pic/2020-09/02/t2_(101X54X600X335)7cd39301-d9cf-45f1-91c3-9575b1e5ce0e.jpg.2",
title: "五角大楼发布“中国军力报告” 华春莹: 罔顾事实,充满偏见",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 7,
isShowMore: false
},
{
img:
"http://news.sznews.com/pic/2020-09/02/b8b41d9c-0508-4498-8d37-6e597493769f.jpg",
title: "最新地铁消息汇总4号线北延、2号线三期、8号线一期等今年通车",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 8,
isShowMore: false
},
{
img:
"http://www.sznews.com/photo/pic/2020-08/10/1635374c-f4d6-475c-ac47-1334176f365d.png",
title: "9月1日深圳新增5例无症状感染者钟南山这段话冲上热搜",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 9,
isShowMore: false
},
{
img:
"http://www.sznews.com/news/pic/2020-08/13/646e5458-92b7-4636-9940-9b0799babfe1.png",
title: "全能“小福宝” 为文明社区建设添砖加瓦",
evaluate: (Math.random() * 10).toFixed(2),
collection: (Math.random() * 100).toFixed(2),
price: (Math.random() * 10).toFixed(2),
monSales: (Math.random() * 20).toFixed(2),
id: 10,
isShowMore: false
},
];

View File

@ -1,21 +0,0 @@
<template>
<div>
pagesIndex
<el-input v-model="val"></el-input>
</div>
</template>
<script lang="ts">
import { toRefs, reactive } from "vue";
export default {
name: "pagesIndex",
setup() {
const state = reactive({
val: "",
});
return {
...toRefs(state),
};
},
};
</script>