当前位置:网站首页>Tableau auto - fabriqué
Tableau auto - fabriqué
2022-06-10 21:29:00 【Zang Xiaochuan】
Tableau des effets
JS
import {
useState, } from 'react';
import styles from './style.less'
const data = [
{
name: 'Hulele', key: 1, age: 19, value: 'Vos efforts sont ridicules', operating: 'Ha ha ha ha ha' },
{
name: 'Seigneur!', key: 2, age: 129, value: 'Hé! Hé!', operating: 'Ha ha ha ha ha' },
{
name: 'Guo Shuai.', key: 3, age: 9, value: 'Gros ventre', operating: 'Ha ha ha ha ha' },
{
name: 'Guan Yu', key: 4, age: 31, value: 'Mon deuxième frère est le meilleur au monde', operating: 'Ha ha ha ha ha' },
{
name: 'Chen xiaohao', key: 5, age: 22, value: 'Les meilleurs', operating: 'Ha ha ha ha ha' }
]
const index = () =>
{
const [active, setActive] = useState(null)
const handleMouse = (flag) =>
{
return () =>
{
console.log(flag);
setActive(flag)
}
}
return (
<div className={
styles.wrapper}>
<div className={
styles.spin_nested_loading}>
<div className={
styles.container}>
<div id='cyclicScroll' className={
`${
styles.table}`} >
<div className={
styles.table_container}>
<div className={
styles.table_content}>
<table style={
{
tableLayout: 'auto' }}>
<colgroup></colgroup>
<thead className={
styles.table_thead}>
<tr>
<th className={
styles.table_cell}>Nom</th>
<th className={
styles.table_cell}>Âge</th>
<th className={
styles.table_cell}>Adresse</th>
<th className={
styles.table_cell}>Détails</th>
<th className={
styles.table_cell}>Fonctionnement</th>
</tr>
</thead>
<tbody className={
styles.table_tbody}>
{
data.map((data, index) => (
<tr key={
index} onMouseEnter={
handleMouse(data.key)}
onMouseLeave={
handleMouse(false)} className={
`${
styles.tbody_row} ${
styles.tbody_rowLevel_0}`}>
<td className={
`${
styles.table_cell} ${
data.key === active && styles.tbody_rowHover}`}><a>{
data.name}</a></td>
<td className={
`${
styles.table_cell} ${
data.key === active && styles.tbody_rowHover}`}>{
data.age}</td>
<td className={
`${
styles.table_cell} ${
data.key === active && styles.tbody_rowHover}`}>{
data.value}</td>
<td className={
`${
styles.table_cell} ${
data.key === active && styles.tbody_rowHover}`}>
<span className={
`${
styles.tag} ${
styles.tag_green}`} >Nice</span><span className={
`${
styles.tag} ${
styles.tag_volcano}`} >Nice</span>
</td>
<td className={
`${
styles.table_cell} ${
data.key === active && styles.tbody_rowHover}`}>
<div style={
{
gap: '16px' }} className={
`${
styles.space} ${
styles.horizontal} ${
styles.center}`} >
<div className={
styles.item}>
<a >Voir</a>
</div>
<div className={
styles.item}>
<a >Supprimer</a>
</div>
</div>
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
);
};
export default index
CSS
.wrapper {
clear: both;
max-width: 100%;
&::after {
display: table;
clear: both;
content: '';
}
&::before {
display: table;
content: '';
}
.spin_nested_loading {
position: relative;
}
:focus-visible {
outline: -webkit-focus-ring-color auto 1px;
}
}
.container {
position: relative;
transition: opacity 0.3s;
.table {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: 'tnum', "tnum";
position: relative;
font-size: 14px;
background: #fff;
border-radius: 2px;
table {
width: 100%;
text-align: left;
border-radius: 2px 2px 0 0;
border-collapse: separate;
border-spacing: 0;
.table_thead tr th, .table_tbody tr td {
position: relative;
padding: 16px 16px;
overflow-wrap: break-word;
}
.table_thead {
tr:first-child th:first-child {
border-top-left-radius: 2px;
}
tr:last-child th:last-child {
border-top-right-radius: 2px;
}
}
tr th {
position: relative;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
text-align: left;
background: #fafafa;
border-bottom: 1px solid #f0f0f0;
transition: background 0.3s ease;
// Sélectionnez tout et drainez le dernier &:not(:last-child)::before {
position: absolute;
top: 50%;
right: 0;
width: 1px;
height: 1.6em;
background-color: rgba(0, 0, 0, 0.06);
transform: translateY(-50%);
transition: background-color 0.3s;
content: '';
}
}
.table_tbody {
tr td {
border-bottom: 1px solid #f0f0f0;
transition: background .3s;
.tag {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: 'tnum', "tnum";
display: inline-block;
height: auto;
margin-right: 8px;
padding: 0 7px;
font-size: 12px;
line-height: 20px;
white-space: nowrap;
background: #fafafa;
border: 1px solid #d9d9d9;
border-radius: 2px;
opacity: 1;
transition: all 0.3s;
}
.tag_green {
color: #389e0d;
background: #f6ffed;
border-color: #b7eb8f;
}
.tag_volcano {
color: #d4380d;
background: #fff2e8;
border-color: #ffbb96;
}
.space {
display: inline-flex;
}
.center {
align-items: center;
}
}
.tbody_rowHover {
background: #fafafa;
}
}
}
}
&::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
display: none \9;
width: 100%;
height: 100%;
background: #fff;
opacity: 0;
transition: all 0.3s;
content: '321';
pointer-events: none;
}
.table_container {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
&::after, &::before {
position: absolute;
top: 0;
bottom: 0;
z-index: 1;
width: 30px;
transition: box-shadow 0.3s;
content: '';
pointer-events: none;
}
}
}
边栏推荐
- shell实现ssh登录并执行命令
- 01js basic null and undefined difference type conversion = = code block logical operator
- 蛮力法/任务分配
- Will your company choose to develop data center?
- 旋转菜单3.0
- [generation confrontation network learning part I] classic Gan and its existing problems and related improvements
- Brute force method /k integers out of 1~n integers
- Leetcode advanced path - Search insertion location
- [Warning] TIMESTAMP with implicit DEFAULT value is deprecated
- Cas de test app
猜你喜欢

Magic tower game implementation source code and level generation
![[Warning] TIMESTAMP with implicit DEFAULT value is deprecated](/img/e8/53c18a7944d160238f2f1c0f8f04b1.jpg)
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated

Asynchronous, thread pool (completablefuture)

^29 event cycle model

72. editing distance ●●

Attack and defense drill | network security "whistleblower": security monitoring

synergy: server refused client with our name

分布式服务理论基础

初中毕业生,选择中职学校也可以升入高等学府

Error code 1129, state HY000, host 'xxx' is blocked because of many connection errors
随机推荐
自制Table表格
编程式导航路由跳转到当前路由(参数不变), 多次执行会抛出NavigationDuplicated的警告错误?
[computer use] how to set software startup without auto startup
Niuke.com: numbers that appear more than half of the times in the array
Attack and defense drill | network security "whistleblower": security monitoring
The programmed navigation route jumps to the current route (the parameters remain unchanged), and the navigationduplicated warning error will be thrown if it is executed multiple times?
Brute force method /k integers out of 1~n integers
H265 Nalu类型判断及 sps 数据解析
Calculus review 1
Software definition boundary (SDP)
旋转菜单3.0
LeetCode 进阶之路 - 字符串中的第一个唯一字符
Whether there is a simple path from brute force method /u to V
CET-6 - Business English - the last recitation before the test
Unity analyzes the rendering of built-in terrain and does some interesting things
LeetCode:497. Random points in non overlapping rectangles -- medium
从h264实时流中提取Nalu单元数据
Uncover secrets: how can wechat red envelopes in the Spring Festival Gala resist 10billion requests?
Monitoring is easy to create a "quasi ecological" pattern and empower Xinchuang to "replace"
72. editing distance ●●