refactor: 删除不必要的模板代码
This commit is contained in:
44
src/app.wpy
44
src/app.wpy
@@ -1,26 +1,26 @@
|
||||
<script>
|
||||
import wepy from 'wepy'
|
||||
import 'wepy-async-function'
|
||||
import wepy from 'wepy'
|
||||
import 'wepy-async-function'
|
||||
|
||||
export default class extends wepy.app {
|
||||
config = {
|
||||
pages: [
|
||||
'pages/index'
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
export default class extends wepy.app {
|
||||
config = {
|
||||
pages: [
|
||||
'pages/index'
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
}
|
||||
}
|
||||
|
||||
constructor () {
|
||||
super()
|
||||
this.use('requestfix')
|
||||
}
|
||||
|
||||
onLaunch() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
constructor () {
|
||||
super()
|
||||
this.use('requestfix')
|
||||
}
|
||||
|
||||
onLaunch() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import wepy from 'wepy'
|
||||
|
||||
export default class testMixin extends wepy.mixin {
|
||||
data = {
|
||||
mixin: 'This is mixin data.'
|
||||
}
|
||||
methods = {
|
||||
tap () {
|
||||
this.mixin = 'mixin data was changed'
|
||||
console.log('mixin method tap')
|
||||
}
|
||||
}
|
||||
|
||||
onShow() {
|
||||
console.log('mixin onShow')
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
console.log('mixin onLoad')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user