Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
web-monitor
Project
Project
Details
Activity
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
Administrator
web-monitor
Commits
8572cbe7
Commit
8572cbe7
authored
Mar 04, 2022
by
neogcg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3/4
parent
c645b2bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
42 deletions
+41
-42
index.vue
src/components/Del/index.vue
+41
-42
No files found.
src/components/Del/index.vue
View file @
8572cbe7
<
template
>
<el-button
:type=
"multipleSelection.data.length ? 'primary' : 'info'"
:disabled=
"!multipleSelection.data.length"
@
click=
"del()"
>
删 除
</el-button>
<el-button
:type=
"multipleSelection.data.length ? 'primary' : 'info'"
:disabled=
"!multipleSelection.data.length"
@
click=
"del()"
>
删 除
</el-button
>
</
template
>
<
script
>
import
{
mapGetters
,
mapActions
}
from
'vuex'
;
import
{
warningAlert
}
from
"../../utils/alert"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
warningAlert
}
from
"../../utils/alert"
;
export
default
{
props
:
{
props
:
{
multipleSelection2
:
{
type
:
Array
,
default
:
()
=>
{}
}
default
:
()
=>
{},
},
},
components
:
{},
data
()
{
return
{
multipleSelection
:
formInit
(),
};
},
components
:
{},
data
()
{
return
{
multipleSelection
:
formInit
(),
};
},
watch
:
{
multipleSelection2
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newV
)
{
this
.
multipleSelection
=
!!
newV
this
.
multipleSelection
=
formInit
(
this
.
multipleSelection2
)
this
.
multipleSelection
=
!!
newV
;
this
.
multipleSelection
=
formInit
(
this
.
multipleSelection2
);
},
},
},
computed
:
{
...
mapGetters
({}),
},
methods
:
{
...
mapActions
({}),
del
(){
this
.
$confirm
(
'继续操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$emit
(
"del"
)
}).
catch
(()
=>
{
warningAlert
(
"取消删除"
)
computed
:
{
...
mapGetters
({}),
},
methods
:
{
...
mapActions
({}),
del
()
{
this
.
$confirm
(
"继续操作将永久删除, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
$emit
(
"del"
);
})
.
catch
(()
=>
{
warningAlert
(
"取消删除"
);
});
},
},
mounted
()
{},
},
},
mounted
()
{},
};
function
formInit
(
data
=
[])
{
return
{
data
}
data
,
};
}
</
script
>
<
style
scoped
>
...
...
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