Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
162202e1
Commit
162202e1
authored
Aug 31, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/test_localstorage' into 'master'
fix: 重写clear测试 See merge request
!155
parents
bd8d9661
8e29bb0f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
package.json
package.json
+0
-1
index.html
public/index.html
+13
-0
main.js
src/main.js
+2
-2
user.js
src/store/modules/user.js
+1
-1
No files found.
package.json
View file @
162202e1
...
...
@@ -23,7 +23,6 @@
"
raven-js
"
:
"
^3.27.2
"
,
"
sa-sdk-javascript
"
:
"
^1.15.16
"
,
"
vant
"
:
"
^2.10.2
"
,
"
vconsole
"
:
"
^3.3.4
"
,
"
vue
"
:
"
2.6.11
"
,
"
vue-pdf
"
:
"
^4.1.0
"
,
"
vue-router
"
:
"
^3.2.0
"
,
...
...
public/index.html
View file @
162202e1
...
...
@@ -29,6 +29,19 @@
})();
// ! 上线需要删掉
var
baseUrl
=
""
;
</script>
<script>
var
orignalremoveItem
=
localStorage
.
clear
;
localStorage
.
clear
=
function
(
key
,
newValue
){
var
removeItemEvent
=
new
Event
(
"
removeItemEvent
"
);
removeItemEvent
.
key
=
key
;
removeItemEvent
.
newValue
=
newValue
;
window
.
dispatchEvent
(
removeItemEvent
);
orignalremoveItem
.
apply
(
this
,
arguments
);
};
window
.
addEventListener
(
"
removeItemEvent
"
,
function
(
e
)
{
console
.
log
(
"
localStorage.clear() 执行清楚方法;
"
)
});
</script>
<style>
#app
.mainload
{
...
...
src/main.js
View file @
162202e1
...
...
@@ -5,7 +5,7 @@ import router from "./router";
import
store
from
"
./store
"
;
import
"
./style/index.less
"
;
import
"
amfe-flexible
"
;
import
vConsole
from
"
vconsole
"
;
//
import vConsole from "vconsole";
import
sa
from
"
sa-sdk-javascript
"
;
import
"
@/assets/icons/index
"
;
import
"
@/service/cherry-ui
"
;
...
...
@@ -60,5 +60,5 @@ window.addEventListener(
// if (process.env.NODE_ENV !== "development") {
// ! 上线后务必取掉
new
vConsole
();
//
new vConsole();
// }
src/store/modules/user.js
View file @
162202e1
...
...
@@ -74,7 +74,7 @@ export default {
[
"
6.1
"
,
"
6.2
"
,
"
6.3
"
].
includes
(
policy
.
policyState
)
)
.
map
(
policy
=>
({
...
policy
,
...
find
(
goodsList
,
{
id
:
policy
.
productNo
})
}))
.
sort
((
a
,
b
)
=>
a
.
termType
>
b
.
termType
);
.
sort
((
a
,
b
)
=>
a
.
termType
.
localeCompare
(
b
.
termType
)
);
return
policyListFilted
?.[
0
]
||
goodsList
[
0
];
})
...
...
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