<template> <view class="content"> </view> </template> <script> export default { data() { return { } }, onLoad(){//代替 vue 里面的 created }, onReady() {//代替 vue 里面的 mounted }, methods: { } } </script> <style lang="scss" scoped> .content{padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;} </style>