Skip to content

Commit 9586246

Browse files
author
shiliangl
committed
测试+1
1 parent 423d038 commit 9586246

File tree

3 files changed

+65
-6
lines changed

3 files changed

+65
-6
lines changed

config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
},
1616

1717
// Various Dev Server settings
18-
host: '192.168.1.103', // can be overwritten by process.env.HOST
18+
host: '0.0.0.0', // can be overwritten by process.env.HOST
1919
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
2020
autoOpenBrowser: true,
2121
errorOverlay: true,

src/App.vue

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,73 @@
11
<template>
22
<div id="app">
3-
<transition>
4-
<router-view/>
5-
</transition>
3+
<transition>
4+
<router-view/>
5+
</transition>
66
</div>
77
</template>
88

99
<script>
1010
export default {
11-
name: 'app'
11+
name: 'app',
12+
data () {
13+
return {
14+
message: 1
15+
}
16+
},
17+
beforeCreate: function () {
18+
console.group('beforeCreate 创建前状态===============》')
19+
console.log('%c%s', 'color:red', 'el : ' + this.$el) // undefined
20+
console.log('%c%s', 'color:red', 'data : ' + this.$data) // undefined
21+
console.log('%c%s', 'color:red', 'message: ' + this.message)
22+
},
23+
created: function () {
24+
console.group('created 创建完毕状态===============》')
25+
console.log('%c%s', 'color:red', 'el : ' + this.$el) // undefined
26+
console.log('%c%s', 'color:red', 'data : ' + this.$data) // 已被初始化
27+
console.log('%c%s', 'color:red', 'message: ' + this.message) // 已被初始化
28+
},
29+
beforeMount: function () {
30+
console.group('beforeMount 挂载前状态===============》')
31+
console.log('%c%s', 'color:red', 'el : ' + this.$el) // 已被初始化
32+
console.log(this.$el)
33+
console.log('%c%s', 'color:red', 'data : ' + this.$data) // 已被初始化
34+
console.log('%c%s', 'color:red', 'message: ' + this.message) // 已被初始化
35+
},
36+
mounted: function () {
37+
console.group('mounted 挂载结束状态===============》')
38+
console.log('%c%s', 'color:red', 'el : ' + this.$el) // 已被初始化
39+
console.log(this.$el)
40+
console.log('%c%s', 'color:red', 'data : ' + this.$data) // 已被初始化
41+
console.log('%c%s', 'color:red', 'message: ' + this.message) // 已被初始化
42+
},
43+
beforeUpdate: function () {
44+
console.group('beforeUpdate 更新前状态===============》')
45+
console.log('%c%s', 'color:red', 'el : ' + this.$el)
46+
console.log(this.$el)
47+
console.log('%c%s', 'color:red', 'data : ' + this.$data)
48+
console.log('%c%s', 'color:red', 'message: ' + this.message)
49+
},
50+
updated: function () {
51+
console.group('updated 更新完成状态===============》')
52+
console.log('%c%s', 'color:red', 'el : ' + this.$el)
53+
console.log(this.$el)
54+
console.log('%c%s', 'color:red', 'data : ' + this.$data)
55+
console.log('%c%s', 'color:red', 'message: ' + this.message)
56+
},
57+
beforeDestroy: function () {
58+
console.group('beforeDestroy 销毁前状态===============》')
59+
console.log('%c%s', 'color:red', 'el : ' + this.$el)
60+
console.log(this.$el)
61+
console.log('%c%s', 'color:red', 'data : ' + this.$data)
62+
console.log('%c%s', 'color:red', 'message: ' + this.message)
63+
},
64+
destroyed: function () {
65+
console.group('destroyed 销毁完成状态===============》')
66+
console.log('%c%s', 'color:red', 'el : ' + this.$el)
67+
console.log(this.$el)
68+
console.log('%c%s', 'color:red', 'data : ' + this.$data)
69+
console.log('%c%s', 'color:red', 'message: ' + this.message)
70+
}
1271
}
1372
</script>
1473

src/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const constantRouters = [
6060
]
6161

6262
export default new Router({
63-
// mode: 'history', // require service support
63+
mode: 'history', // require service support
6464
scrollBehavior: () => ({
6565
y: 0
6666
}),

0 commit comments

Comments
 (0)