12345678910111213141516171819202122232425 |
- const getHeight = require("../../utils/getRheRemainingHeight");
- Component({
- properties: {
- show: Boolean,
- handle: Function, //按钮回调函数
- },
- lifetimes: {
- ready() {
- getHeight.getHeight('.head', this).then(res => this.setData({
- listHeight: res - 180
- }));
- }
- },
- methods: {
- onClick(e) {
- const {
- name
- } = e.target.dataset;
- if (name) this.triggerEvent("handle", name)
- },
- onClose(){
- this.triggerEvent("handle", "close")
- }
- }
- })
|