UNPKG
vue-with-keep-alive
Version:
latest (2.4.0)
3.4.0
3.3.2
3.3.0
3.2.9
3.2.3
3.1.4
3.1.3
3.1.2
3.1.1
3.1.0
3.0.0
2.4.0
2.3.2
2.3.0
2.2.9
2.2.3
2.1.1
2.1.0
2.0.0
0.1.1
0.1.0
with keep-alive component
github.com/ByePastHub/vue-with-keep-alive
ByePastHub/vue-with-keep-alive
vue-with-keep-alive
/
src
/
keepRouter.js
11 lines
(8 loc)
•
227 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{
KEEP_COMPONENT_DESTROY
}
from
'./constants'
;
function
destroy
(
value
) {
const
destroyEvent =
new
CustomEvent
(
KEEP_COMPONENT_DESTROY
, {
detail
: value });
window
.
dispatchEvent
(destroyEvent); }
export
{ destroy };