当前位置:网站首页>Custom vertical table
Custom vertical table
2022-06-25 13:16:00 【liminla!】
design sketch :

Code :
<template>
<div class="mesTable">
<div class="table">
<div
class="tr"
v-for="(item, index) in tableData"
:key="index"
:class="[item.line ? 'one' : 'two']"
>
<div class="th" :class="{ nodata: !item.value }">
<span>{
{
item.title }}</span>
</div>
<div class="td" :class="{ nodata: !item.value }">
<img
v-if="item.isIcon && item.value != '--'"
width="52"
:src="item.value"
/>
<a
v-else-if="item.isUrl && item.value != '--'"
:href="item.value"
target="_blank"
>{
{
item.value }}</a
>
<p v-else>{
{
item.value }}</p>
</div>
</div>
<Loading v-if="isLoading"></Loading>
</div>
</div>
</template>
<script>
export default {
props: {
tableData: {
type: Array,
default: () => [
{
title: "",
value: "",
line: "",
isUrl: false,
isIcon: false,
},
],
},
},
data() {
return {
isLoading: false,
};
},
watch: {
tableData: {
handler(val) {
if (val.length) {
this.isLoading = false;
} else {
this.isLoading = true;
}
},
deep: true,
},
},
mounted() {
},
methods: {
},
};
</script>
<style lang="less" scoped>
.mesTable {
background: #fff;
.table {
border: 1px solid #dee9ff;
display: flex;
flex-wrap: wrap;
font-size: 14px;
font-family: MicrosoftYaHeiUI;
.tr {
display: flex;
// flex-wrap: wrap;
align-items: center;
font-size: 14px;
line-height: 20px;
background: rgba(84, 174, 255, 0.1);
&.one {
width: 100%;
}
&.two {
width: 50%;
}
&:not(:last-child) {
border-bottom: 1px solid #dee9ff;
}
.one {
width: 100%;
display: flex;
align-items: center;
}
.two {
width: 50%;
display: flex;
align-items: center;
}
.th {
width: 210px;
color: #677380;
display: flex;
align-items: center;
padding: 12px 0 12px 20px;
height: 100%;
word-break: break-all;
&:not(:last-child) {
border-right: 1px solid #dee9ff;
}
}
.nodata {
height: 48px;
}
.td {
display: flex;
align-items: center;
height: 100%;
background: #fff;
padding: 12px 20px 12px 20px;
flex: 1;
color: #333333;
word-break: break-all;
a {
color: #1492ff;
}
&:not(:last-child) {
border-right: 1px solid #dee9ff;
}
}
}
}
}
</style>
边栏推荐
猜你喜欢

Using CMD (command prompt) to install MySQL & configure the environment
![[AI helps scientific research] fool drawing of loss curve](/img/38/5cb2a3d33a609dab3874215d5f7b5b.png)
[AI helps scientific research] fool drawing of loss curve

J2EE从入门到入土01.MySQL安装

药物设计新福音:腾讯联合中科大、浙大开发自适应图学习方法,预测分子相互作用及分子性质

20220620 interview reply

@Scheduled implementation of scheduled tasks (concurrent execution of multiple scheduled tasks)
![[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1](/img/36/167397ce61240036c865dd99463f1b.jpg)
[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1

An article clearly explains MySQL's clustering / Federation / coverage index, back to table, and index push down

一篇文章讲清楚MySQL的聚簇/联合/覆盖索引、回表、索引下推

515. Find Largest Value in Each Tree Row
随机推荐
KDD 2022 | GraphMAE:自监督掩码图自编码器
一篇文章讲清楚MySQL的聚簇/联合/覆盖索引、回表、索引下推
[flask tutorial] flask development foundation and introduction
Serevlt初识
torch. Tensor splicing and list (tensors)
Maui's learning path (II) -- setting
剑指 Offer 第 1 天栈与队列(简单)
MySQL writes user-defined functions and stored procedure syntax (a detailed case is attached, and the problem has been solved: errors are reported when running user-defined functions, and errors are r
中国虚拟人哪家强?沙利文、IDC:小冰百度商汤位列第一梯队
Spoken English - weak reading
几分钟上线一个网站 真是神器
Oracle backup or restore database (expdp, impdp)
二叉树之_哈夫曼树_哈弗曼编码
C# 切换中英文输入法
Jenkins pipeline uses
Stockage des données en mémoire
字符串各操作函数与内存函数详解
Native JS --- infinite scrolling
字节跳动Dev Better技术沙龙来啦!参与活动赢好礼,限时免费报名中!
数据在内存中的存储相关内容