// component/slideIn.js import { animation } from "../animation-beh.js" Component({ behaviors: [animation], options: { multipleSlots: true // 在组件定义时的选项中启用多slot支持 }, /** * 组件的属性列表 */ properties: { layerHeight:{ type: Number||String, value: 700 } }, /** * 组件的初始数据 */ data: { }, lifetimes: { attached() { // 在组件实例进入页面节点树时执行 }, detached() { // 在组件实例被从页面节点树移除时执行 }, ready() { this.showLayer(this, "translateY", 0, -350); }, }, /** * 组件的方法列表 */ methods: { maskTap(event) { console.log(event) this.setData({ isShow: event.detail.isShow }) this.hideLayer(this, "translateY", 300); }, } })