1234567891011121314151617181920212223242526272829303132333435363738 |
- // commpents/mobile-frame/index.js
- const app = getApp()
- Component({
- /**
- * 组件的属性列表
- */
- options: { multipleSlots: true },
- properties: {
- frameStyle: { type: Object }
- },
- /**
- * 组件的初始数据
- */
- data: {},
- // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
- attached: function () { }, // 此处attached的声明会被lifetimes字段中的声明覆盖
- ready: function () { },
- pageLifetimes: {
- // 组件所在页面的生命周期函数
- show: function () { },
- hide: function () { },
- resize: function () { },
- },
- /**
- * 组件的方法列表
- */
- methods: {
- // 返回上一级
- back() {
- this.triggerEvent('back', '1')
- },
- tabPath(e) {
- this.triggerEvent('tabPath', e)
- },
- }
- })
|