<script>import wepy from 'wepy';import Counter from '../components/counter';export default class Page extends wepy.page {customData = {} //自定义数据customFunction () {} //自定义方法onLoad () {} //在page和component共用的生命周期函数onShow () {} //只在page中存在的生命周期函数config = {}; //页面配置对象,对应于原生的page.json文件components = {counter1: Counter}; //声明页面所引入的组件列表data = {}; //存放用于页面模板绑定的渲染数据mixins = []; //声明页面所引用的Mixin实例computed = {}; //声明计算属性methods = {}; //声明页面wxml中标签的事件处理函数,自定义方法另行声明events = {}; //声明组件之间的事件处理函数}</script><template lang="wxml"><counter1></counter1></template><style lang="less"></style>
1200字范文,内容丰富有趣,写作的好帮手!