Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cy-admin-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
webpack
cy-admin-ui
Commits
f7c2406d
Commit
f7c2406d
authored
Feb 11, 2022
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改demo组件
parent
6d2ee4be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
main.vue
packages/other/demo-block/src/main.vue
+16
-6
No files found.
packages/other/demo-block/src/main.vue
View file @
f7c2406d
...
...
@@ -3,15 +3,21 @@
<h2
v-if=
"$slots.title"
>
<slot
name=
"title"
/>
</h2>
<
p
v-if=
"$slots.
descript"
>
<
div
v-if=
"$slots.descript"
class=
"
descript"
>
<slot
name=
"descript"
/>
</
p
>
</
div
>
<div
class=
"demo-content"
>
<slot
/>
<div
v-if=
"showCode"
:class=
"[hoverControl ? 'hover' : '',]"
class=
"footer"
@
mouseenter=
"hoverControl = true"
@
mouseleave=
"hoverControl = false"
@
click=
"showCode = !showCode"
>
<i
:class=
"footerIcon"
/>
<transition
name=
"fade"
>
<span
v-if=
"hover"
><span
class=
"label"
>
{{
footerLabel
}}
</span></span>
</transition>
</div>
<div
v-if=
"showCode"
class=
"demo-code"
>
<slot
name=
"code"
class=
"code"
/>
</div>
<div>
<div
v-if=
"$slots.code"
>
<div
:class=
"[hoverControl ? 'hover' : '',]"
class=
"footer"
@
mouseenter=
"hoverControl = true"
@
mouseleave=
"hoverControl = false"
@
click=
"showCode = !showCode"
>
<i
:class=
"footerIcon"
/>
<transition
name=
"fade"
>
...
...
@@ -48,17 +54,21 @@ export default {
<
style
lang=
"scss"
scoped
>
.demo-block
{
overflow
:
auto
;
margin-bottom
:
20px
;
::v-deep
.el-card__body
{
padding
:
0
;
}
&
.hover
{
.demo-content
{
box-shadow
:
0
0
8px
0
rgb
(
232
237
250
/
60%
)
,
0
2px
4px
0
rgb
(
232
237
250
/
50%
);
}
box-shadow
:
0
0
8px
0
rgb
(
232
237
250
/
60%
)
,
0
2px
4px
0
rgb
(
232
237
250
/
50%
);
.footer
{
transform
:
translateX
(
-30px
);
}
}
.descript
{
white-space
:
pre-wrap
;
margin
:
10px
0
;
}
.demo-code
{
background
:
#ebebeb
;
padding
:
10px
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment