Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b674603f
authored
2020-11-16 17:46:35 +0800
by
weimo934
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
merge(plzl):关闭重置数据
1 parent
950a2ebc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
1 deletions
src/components/emailInput/emailInput.vue
src/components/plsh/plSh.vue
src/components/emailInput/emailInput.vue
0 → 100644
View file @
b674603
<
template
>
<div
class=
"main"
>
<div
class=
'input'
contenteditable
placeholder=
'请输入文字'
>
<div
@
mouseover=
"mouseover($event)"
@
mouseleave=
"mouseLeave($event)"
v-for=
"(item,index) in datas"
:key=
"index"
style=
"float: left;"
class=
"item"
>
{{
item
}}
;
<div
style=
"float: right;display: none"
@
click=
"itemClick(index)"
>
X
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"emailInput"
,
data
()
{
return
{
datas
:
[
'111'
,
'222'
,
'333'
,
'444'
,
'555'
,
'666'
,
'777'
,
'888'
,
'999'
],
}
},
props
:
{},
methods
:
{
mouseover
(
e
)
{
// e.target 是你当前点击的元素
// 是你绑定事件的元素
let
dom
=
e
.
currentTarget
.
firstElementChild
dom
.
style
=
"float: right;display: block"
;
// 获得点击元素的前一个元素
/* e.currentTarget.previousElementSibling.innerHTML
// 获得点击元素的第一个子元素
e.currentTarget.firstElementChild
// 获得点击元素的下一个元素
e.currentTarget.nextElementSibling
// 获得点击元素中id为string的元素
e.currentTarget.getElementById("string")
// 获得点击元素的string属性
e.currentTarget.getAttributeNode('string')
//获得点击元素的父级元素
e.currentTarget.parentElement
// 获得点击元素的前一个元素的第一个子元素的HTML值
e.currentTarget.previousElementSibling.firstElementChild.innerHTML*/
},
mouseLeave
(
e
)
{
let
dom
=
e
.
currentTarget
.
firstElementChild
dom
.
style
=
"float: right;display: none"
},
itemClick
(
index
){
this
.
datas
.
splice
(
index
,
1
)
}
},
computed
:
{
text
:
function
()
{
let
text
=
""
;
for
(
let
item
of
this
.
datas
)
{
text
+=
item
+
";"
;
}
return
text
;
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.main
{
.input
{
width
:
auto
;
height
:
24px
;
line-height
:
24px
;
font-size
:
14px
;
padding
:
5px
8px
;
border
:
1px
solid
#ddd
;
}
.input
:empty::before
{
content
:
attr
(
placeholder
);
}
.item
{
cursor
:
pointer
;
}
.item
:hover
{
border
:
1px
solid
#BBF
;
}
}
</
style
>
src/components/plsh/plSh.vue
View file @
b674603
...
...
@@ -44,7 +44,7 @@
</el-select>
</td>
<td>
<input
type=
"text"
class=
"inputtitle"
v-model=
"plshData.fg
h
B"
/>
<input
type=
"text"
class=
"inputtitle"
v-model=
"plshData.fg
f
B"
/>
</td>
<td>
...
...
Please
register
or
sign in
to post a comment