Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
殷东起
VueJS
提交
eeb4dbd5
V
VueJS
项目概览
殷东起
/
VueJS
与 Fork 源项目一致
Fork自
inscode / VueJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VueJS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
eeb4dbd5
编写于
5月 24, 2023
作者:
6
62651a3279fbdd78c800902f
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Wed May 24 12:23:00 UTC 2023 inscode
上级
1be48a91
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
76 addition
and
1 deletion
+76
-1
package.json
package.json
+1
-0
src/App.vue
src/App.vue
+3
-1
src/page/test1/elementplusxx.vue
src/page/test1/elementplusxx.vue
+72
-0
未找到文件。
package.json
浏览文件 @
eeb4dbd5
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
"preview"
:
"vite preview --port 4173"
"preview"
:
"vite preview --port 4173"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
element-plus
"
:
"
^2.3.5
"
,
"
guess
"
:
"
^1.0.2
"
,
"
guess
"
:
"
^1.0.2
"
,
"
vue
"
:
"
^3.2.37
"
"
vue
"
:
"
^3.2.37
"
},
},
...
...
src/App.vue
浏览文件 @
eeb4dbd5
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
parent
from
'
./page/ziChuanFuVal/parent.vue
'
;
import
parent
from
'
./page/ziChuanFuVal/parent.vue
'
;
import
watchEffect
from
'
./page/watchEffect/watchEffect.vue
'
;
import
watchEffect
from
'
./page/watchEffect/watchEffect.vue
'
;
import
erzi
from
'
./page/fuChuanZiVal/erzi.vue
'
;
import
erzi
from
'
./page/fuChuanZiVal/erzi.vue
'
;
import
elementplusxx
from
'
./page/test1/elementplusxx.vue
'
;
let
name
=
'
小明
'
let
name
=
'
小明
'
</
script
>
</
script
>
...
@@ -9,7 +10,8 @@ let name = '小明'
...
@@ -9,7 +10,8 @@ let name = '小明'
<
template
>
<
template
>
<!--
<parent></parent>
-->
<!--
<parent></parent>
-->
<!--
<watchEffect></watchEffect>
-->
<!--
<watchEffect></watchEffect>
-->
<erzi
:title=
"name"
></erzi>
<!--
<erzi
:title=
"name"
></erzi>
-->
<elementplusxx></elementplusxx>
</
template
>
</
template
>
<
style
scoped
>
<
style
scoped
>
...
...
src/page/test1/elementplusxx.vue
0 → 100644
浏览文件 @
eeb4dbd5
<
template
>
<div
class=
"container"
>
<div
v-for=
"(item, index) in items"
:key=
"index"
class=
"item"
@
mouseover=
"showCloseIcon(index)"
@
mouseleave=
"hideCloseIcon(index)"
>
<span>
{{
item
}}
</span>
<el-button
v-if=
"showClose === index"
class=
"close-icon"
type=
"text"
icon=
"el-icon-close"
@
click=
"deleteItem(index)"
>
x
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
ref
}
from
'
vue
'
// import 'element-plus/lib/theme-chalk/index.css'
import
{
ElButton
}
from
'
element-plus
'
export
default
{
components
:
{
ElButton
},
setup
()
{
const
items
=
ref
([
'
item 1
'
,
'
item 2
'
,
'
item 3
'
])
const
showClose
=
ref
(
-
1
)
const
showCloseIcon
=
(
index
)
=>
{
showClose
.
value
=
index
}
const
hideCloseIcon
=
(
index
)
=>
{
showClose
.
value
=
-
1
}
const
deleteItem
=
(
index
)
=>
{
items
.
value
.
splice
(
index
,
1
)
}
return
{
items
,
showClose
,
showCloseIcon
,
hideCloseIcon
,
deleteItem
}
}
}
</
script
>
<
style
>
.container
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.item
{
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin
:
10px
;
padding
:
10px
;
background-color
:
#f0f0f0
;
}
.close-icon
{
position
:
absolute
;
top
:
5px
;
right
:
5px
;
visibility
:
hidden
;
}
.item
:hover
.close-icon
{
visibility
:
visible
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录