Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 476aa068
authored
Sep 25, 2024
by
Netfan
Committed by
GitHub
Sep 25, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: stripe table style for element plus, fixed: #4501 (#4503)
1 parent
bb6057ca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
0 deletions
apps/web-ele/src/views/demos/element/index.vue
internal/tailwind-config/src/index.ts
packages/@core/base/design/src/design-tokens/dark/index.css
packages/@core/base/design/src/design-tokens/default/index.css
packages/effects/hooks/src/use-design-tokens.ts
apps/web-ele/src/views/demos/element/index.vue
View file @
476aa06
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
ElMessage
,
ElMessage
,
ElNotification
,
ElNotification
,
ElSpace
,
ElSpace
,
ElTable
,
}
from
'element-plus'
;
}
from
'element-plus'
;
type
NotificationType
=
'error'
|
'info'
|
'success'
|
'warning'
;
type
NotificationType
=
'error'
|
'info'
|
'success'
|
'warning'
;
...
@@ -38,6 +39,14 @@ function notify(type: NotificationType) {
...
@@ -38,6 +39,14 @@ function notify(type: NotificationType) {
type
,
type
,
});
});
}
}
const
tableData
=
[
{
prop1
:
'1'
,
prop2
:
'A'
},
{
prop1
:
'2'
,
prop2
:
'B'
},
{
prop1
:
'3'
,
prop2
:
'C'
},
{
prop1
:
'4'
,
prop2
:
'D'
},
{
prop1
:
'5'
,
prop2
:
'E'
},
{
prop1
:
'6'
,
prop2
:
'F'
},
];
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -74,5 +83,11 @@ function notify(type: NotificationType) {
...
@@ -74,5 +83,11 @@ function notify(type: NotificationType) {
<ElButton
type=
"success"
@
click=
"notify('success')"
>
成功
</ElButton>
<ElButton
type=
"success"
@
click=
"notify('success')"
>
成功
</ElButton>
</ElSpace>
</ElSpace>
</ElCard>
</ElCard>
<ElCard
class=
"mb-5"
>
<ElTable
:data=
"tableData"
stripe
>
<ElTable
.
TableColumn
label=
"测试列1"
prop=
"prop1"
/>
<ElTable
.
TableColumn
label=
"测试列2"
prop=
"prop2"
/>
</ElTable>
</ElCard>
</Page>
</Page>
</template>
</template>
internal/tailwind-config/src/index.ts
View file @
476aa06
...
@@ -29,6 +29,7 @@ const shadcnUiColors = {
...
@@ -29,6 +29,7 @@ const shadcnUiColors = {
DEFAULT
:
'hsl(var(--accent))'
,
DEFAULT
:
'hsl(var(--accent))'
,
foreground
:
'hsl(var(--accent-foreground))'
,
foreground
:
'hsl(var(--accent-foreground))'
,
hover
:
'hsl(var(--accent-hover))'
,
hover
:
'hsl(var(--accent-hover))'
,
lighter
:
'has(val(--accent-lighter))'
,
},
},
background
:
{
background
:
{
deep
:
'hsl(var(--background-deep))'
,
deep
:
'hsl(var(--background-deep))'
,
...
...
packages/@core/base/design/src/design-tokens/dark/index.css
View file @
476aa06
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
/* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
/* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
--accent
:
216
5%
19%
;
--accent
:
216
5%
19%
;
--accent-lighter
:
216
5%
11%
;
--accent-hover
:
216
5%
24%
;
--accent-hover
:
216
5%
24%
;
--accent-foreground
:
0
0%
98%
;
--accent-foreground
:
0
0%
98%
;
...
...
packages/@core/base/design/src/design-tokens/default/index.css
View file @
476aa06
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
/* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
/* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
--accent
:
240
5%
96%
;
--accent
:
240
5%
96%
;
--accent-lighter
:
240
0%
98%
;
--accent-hover
:
200deg
10%
90%
;
--accent-hover
:
200deg
10%
90%
;
--accent-foreground
:
240
6%
10%
;
--accent-foreground
:
240
6%
10%
;
...
...
packages/effects/hooks/src/use-design-tokens.ts
View file @
476aa06
...
@@ -257,6 +257,7 @@ export function useElementPlusDesignTokens() {
...
@@ -257,6 +257,7 @@ export function useElementPlusDesignTokens() {
'--el-fill-color'
:
getCssVariableValue
(
'--accent'
),
'--el-fill-color'
:
getCssVariableValue
(
'--accent'
),
'--el-fill-color-blank'
:
background
,
'--el-fill-color-blank'
:
background
,
'--el-fill-color-light'
:
getCssVariableValue
(
'--accent'
),
'--el-fill-color-light'
:
getCssVariableValue
(
'--accent'
),
'--el-fill-color-lighter'
:
getCssVariableValue
(
'--accent-lighter'
),
'--el-text-color-primary'
:
getCssVariableValue
(
'--foreground'
),
'--el-text-color-primary'
:
getCssVariableValue
(
'--foreground'
),
'--el-text-color-regular'
:
getCssVariableValue
(
'--foreground'
),
'--el-text-color-regular'
:
getCssVariableValue
(
'--foreground'
),
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment