Skip to content

Commit dbb2fcc

Browse files
committed
fixed error
1 parent 642690b commit dbb2fcc

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/views/Home.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
<script>
8080
// @ is an alias to /src
81-
import util from '../../util/date'
81+
import util from "../../util/date";
8282
8383
export default {
8484
name: "home",
@@ -95,9 +95,11 @@ export default {
9595
this.getData();
9696
},
9797
methods: {
98-
formatCreateTime: function (row) {
99-
return (!row.bCreateTime || row.bCreateTime == '') ? '' : util.formatDate.format(new Date(row.bCreateTime), 'yyyy-MM-dd');
100-
},
98+
formatCreateTime: function(row) {
99+
return !row.bCreateTime || row.bCreateTime == ""
100+
? ""
101+
: util.formatDate.format(new Date(row.bCreateTime), "yyyy-MM-dd");
102+
},
101103
getData() {
102104
var that = this;
103105
var urlPage = that.$route.query.page;
@@ -113,7 +115,7 @@ export default {
113115
}
114116
},
115117
watch: {
116-
$route(to, from) {
118+
$route(to) {
117119
this.list = [];
118120
this.isShow = true;
119121
this.page = to.query.page;
@@ -124,7 +126,7 @@ export default {
124126
</script>
125127

126128
<style>
127-
article.newhome{
128-
width: 1200px;
129-
}
129+
article.newhome {
130+
width: 1200px;
131+
}
130132
</style>

src/views/Home2.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default {
109109
}
110110
},
111111
watch: {
112-
$route(to, from) {
112+
$route(to) {
113113
this.list = [];
114114
this.isShow = true;
115115
this.page = to.query.page;
@@ -120,7 +120,7 @@ export default {
120120
</script>
121121

122122
<style>
123-
article.newhome{
124-
width: 1200px;
125-
}
123+
article.newhome {
124+
width: 1200px;
125+
}
126126
</style>

0 commit comments

Comments
 (0)