mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-05 19:41:43 +08:00
remove card
This commit is contained in:
parent
2ae5c2a6e0
commit
a73b7a1a70
@ -130,12 +130,6 @@ const data = [
|
||||
component: '@/views/vab/tree/index',
|
||||
meta: { title: '树', permissions: ['admin'] },
|
||||
},
|
||||
{
|
||||
path: 'card',
|
||||
name: 'Card',
|
||||
component: '@/views/vab/card/index',
|
||||
meta: { title: '卡片', permissions: ['admin'] },
|
||||
},
|
||||
{
|
||||
path: 'verify',
|
||||
name: 'Verify',
|
||||
|
@ -161,12 +161,6 @@ export const asyncRoutes = [
|
||||
component: () => import('@/views/vab/tree/index'),
|
||||
meta: { title: '树', permissions: ['admin'] },
|
||||
},
|
||||
{
|
||||
path: 'card',
|
||||
name: 'Card',
|
||||
component: () => import('@/views/vab/card/index'),
|
||||
meta: { title: '卡片', permissions: ['admin'] },
|
||||
},
|
||||
{
|
||||
path: 'verify',
|
||||
name: 'Verify',
|
||||
|
@ -1,99 +0,0 @@
|
||||
<template>
|
||||
<div class="card-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:xs="24"
|
||||
:sm="8"
|
||||
:md="8"
|
||||
:lg="8"
|
||||
:xl="4"
|
||||
>
|
||||
<el-card shadow="hover">
|
||||
<div slot="header">
|
||||
<span>{{ item.title }}</span>
|
||||
</div>
|
||||
<div style="width: 100%; height: 200px">
|
||||
<vab-image
|
||||
:big-src="item.img"
|
||||
:percent="item.percent"
|
||||
:small-src="item.smallImg"
|
||||
@clickBig="bigClick(item)"
|
||||
@clickSmall="smallClick(item)"
|
||||
></vab-image>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page="pageNo"
|
||||
:layout="layout"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList } from '@/api/table'
|
||||
import VabImage from '@/components/VabImage'
|
||||
|
||||
export default {
|
||||
name: 'Card',
|
||||
components: {
|
||||
VabImage,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: true,
|
||||
currentDate: new Date(),
|
||||
list: null,
|
||||
listLoading: true,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
total: 0,
|
||||
background: true,
|
||||
height: 0,
|
||||
elementLoadingText: '正在加载...',
|
||||
dialogFormVisible: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.height = this.$baseTableHeight(1)
|
||||
},
|
||||
methods: {
|
||||
bigClick(val) {
|
||||
this.$baseAlert('点击了大图')
|
||||
},
|
||||
smallClick(val) {
|
||||
this.$baseAlert('点击了小图')
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageNo = val
|
||||
this.fetchData()
|
||||
},
|
||||
async fetchData() {
|
||||
this.listLoading = true
|
||||
const { data, totalCount } = await getList({
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
})
|
||||
this.list = data
|
||||
this.total = totalCount
|
||||
setTimeout(() => {
|
||||
this.listLoading = false
|
||||
}, 300)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user