Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
c04868b7
Commit
c04868b7
authored
Apr 21, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板相关&&op
parent
a2c243e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
50 deletions
+50
-50
opration.vue
components/page/opration.vue
+48
-49
temp.vue
pages/aps/aps/temp.vue
+2
-1
No files found.
components/page/opration.vue
View file @
c04868b7
<
template
>
<Tooltip
trigger=
"hover"
v-if=
"title"
:content=
"title"
placement=
"top-end"
>
<a
class=
"op"
:class=
"css"
@
click=
"handler"
>
<slot>
<Tooltip
trigger=
"hover"
v-if=
"title"
:content=
"title"
placement=
"top-end"
>
<a
class=
"op"
:class=
"css"
@
click=
"handler"
>
<slot>
<Icon
v-if=
"type=='icon'"
:type=
"icon"
/>
<span
v-else=
"type=='text'"
v-text=
"text"
></span>
<span
v-else=
"type=='text'"
v-text=
"text"
></span>
</slot>
</a>
</Tooltip>
<a
class=
"op"
v-else
:class=
"css"
@
click=
"handler"
>
<slot>
<a
class=
"op"
v-else
:class=
"css"
@
click=
"handler"
>
<slot>
<Icon
v-if=
"type=='icon'"
:type=
"icon"
/>
<span
v-else=
"type=='text'"
v-text=
"text"
></span>
<span
v-else=
"type=='text'"
v-text=
"text"
></span>
</slot>
</a>
</
template
>
<
script
>
export
default
{
name
:
'op'
,
name
:
"op"
,
props
:
{
icon
:{
type
:
String
icon
:
{
type
:
String
},
oprate
:
{
type
:
String
},
type
:
{
type
:
String
,
default
:
"text"
type
:
String
,
default
:
"text"
},
title
:{
type
:
String
title
:
{
type
:
String
},
msg
:{
type
:
String
,
default
:
"确认要删除吗?"
msg
:
{
type
:
String
,
default
:
"确认要删除吗?"
}
},
data
(){
data
()
{
return
{
text
:
""
,
css
:
"detail"
}
text
:
""
,
css
:
"detail"
}
;
},
created
(){
var
oprates
=
{
detail
:
"查看"
,
edit
:
"编辑"
,
add
:
"添加"
,
delete
:
"删除"
created
()
{
var
oprates
=
{
detail
:
"查看"
,
edit
:
"编辑"
,
add
:
"添加"
,
delete
:
"删除"
};
if
(
oprates
[
this
.
oprate
]){
this
.
text
=
oprates
[
this
.
oprate
]
this
.
css
=
this
.
oprate
;
}
else
if
(
this
.
oprate
)
{
this
.
css
=
this
.
oprate
;
}
else
if
(
this
.
type
==
'icon'
)
{
this
.
css
=
'icon'
if
(
oprates
[
this
.
oprate
])
{
this
.
text
=
oprates
[
this
.
oprate
];
this
.
css
=
this
.
oprate
;
}
else
if
(
this
.
oprate
)
{
this
.
css
=
this
.
oprate
;
}
else
if
(
this
.
type
==
"icon"
)
{
this
.
css
=
"icon"
;
}
},
methods
:{
handler
(){
if
(
this
.
oprate
==
"delete"
)
{
methods
:
{
handler
()
{
if
(
this
.
oprate
==
"delete"
)
{
this
.
$Modal
.
confirm
({
title
:
'确认'
,
content
:
'<p>'
+
this
.
msg
+
'</p>'
,
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
)
}
});
}
else
{
this
.
$emit
(
"click"
,
event
)
title
:
"确认"
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
);
}
});
}
else
{
this
.
$emit
(
"click"
,
event
);
}
}
}
}
}
;
</
script
>
<
style
lang=
"less"
>
a.op{
a.op
{
display: inline;
margin: 0 3px;
}
</
style
>
\ No newline at end of file
pages/aps/aps/temp.vue
View file @
c04868b7
...
...
@@ -116,7 +116,8 @@ export default {
this
.
$emit
(
"on-close"
);
},
addData
(
obj
)
{
this
.
data
.
splice
(
0
,
0
,
obj
);
//this.data.splice(0, 0,obj);
this
.
data
.
push
(
obj
)
},
cancel
()
{
this
.
add
=
null
;
...
...
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