mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
commit
dbffde90c5
@ -20,7 +20,7 @@ Segmented Controls. This component is available since `antd@4.20.0`.
|
|||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore -->
|
||||||
<code src="./demo/basic.tsx">Basic</code>
|
<code src="./demo/basic.tsx">Basic</code>
|
||||||
<code src="./demo/block.tsx">Block Segmented</code>
|
<code src="./demo/block.tsx">Block Segmented</code>
|
||||||
<code src="./demo/disabled.tsx">Basic</code>
|
<code src="./demo/disabled.tsx">Disabled</code>
|
||||||
<code src="./demo/controlled.tsx">Controlled mode</code>
|
<code src="./demo/controlled.tsx">Controlled mode</code>
|
||||||
<code src="./demo/custom.tsx">Custom Render</code>
|
<code src="./demo/custom.tsx">Custom Render</code>
|
||||||
<code src="./demo/dynamic.tsx">Dynamic</code>
|
<code src="./demo/dynamic.tsx">Dynamic</code>
|
||||||
|
@ -58,9 +58,8 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
// Multiple is little different that horizontal is follow the vertical
|
// Multiple is little different that horizontal is follow the vertical
|
||||||
padding: `${unit(token.calc(selectItemDist).sub(FIXED_ITEM_MARGIN).equal())} ${unit(
|
paddingInline: token.calc(FIXED_ITEM_MARGIN).mul(2).equal(),
|
||||||
token.calc(FIXED_ITEM_MARGIN).mul(2).equal(),
|
paddingBlock: token.calc(selectItemDist).sub(FIXED_ITEM_MARGIN).equal(),
|
||||||
)}`,
|
|
||||||
borderRadius: token.borderRadius,
|
borderRadius: token.borderRadius,
|
||||||
|
|
||||||
[`${componentCls}-show-search&`]: {
|
[`${componentCls}-show-search&`]: {
|
||||||
|
@ -1,74 +1,79 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta charset="UTF-8" />
|
||||||
<title>Ant Design Visual Diff Report</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link href="https://unpkg.com/antd@latest/dist/reset.css" rel="stylesheet" />
|
<title>Ant Design Visual Diff Report</title>
|
||||||
<style>
|
<link href="https://unpkg.com/antd@latest/dist/reset.css" rel="stylesheet" />
|
||||||
body {
|
<style>
|
||||||
padding-top: 16px;
|
body {
|
||||||
padding-bottom: 16px;
|
padding-top: 16px;
|
||||||
}
|
padding-bottom: 16px;
|
||||||
/* Table Styles */
|
}
|
||||||
|
|
||||||
|
/* Table Styles */
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
padding: 8px;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:nth-child(even) {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hover Effect */
|
||||||
|
tr:hover {
|
||||||
|
background-color: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive Table */
|
||||||
|
@media screen and (max-width: 600px) and (min-width: 1px) {
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
border: 0;
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
padding: 8px;
|
display: block;
|
||||||
text-align: left;
|
padding: 6px;
|
||||||
border-bottom: 1px solid #ddd;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f2f2f2;
|
text-align: left;
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr:nth-child(even) {
|
tr:nth-child(even) {
|
||||||
background-color: #f9f9f9;
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:nth-child(odd) {
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hover Effect */
|
|
||||||
tr:hover {
|
tr:hover {
|
||||||
background-color: #e5e5e5;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
/* Responsive Table */
|
<body>
|
||||||
@media screen and (max-width: 600px) and (min-width: 1px) {
|
{{reportContent}}
|
||||||
table {
|
</body>
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
th,
|
</html>
|
||||||
td {
|
|
||||||
display: block;
|
|
||||||
padding: 6px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
text-align: left;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr:nth-child(even) {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr:nth-child(odd) {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr:hover {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
{{reportContent}}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user