32 lines
497 B
TypeScript
32 lines
497 B
TypeScript
// pages/components/popup-plugin/index.ts
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
visible: null,
|
|
placement: null,
|
|
title: null,
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
onVisibleChange(e: any) {
|
|
console.log(e.detail.visible);
|
|
this.setData({
|
|
open: e.detail.visible,
|
|
});
|
|
if (!e.detail.visible) {
|
|
this.triggerEvent("close");
|
|
}
|
|
},
|
|
},
|
|
});
|