#36 Add basic popups

This commit is contained in:
yzy
2022-01-20 12:49:02 +08:00
parent cf4dd727c5
commit cd8ca7dcc4
7 changed files with 68 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
@import "../../app.scss";
view.popups {
position: fixed;
width: 75%;
height: 75%;
margin:auto;
left:0;
right:0;
top:0;
bottom:0;
background-color: $theme-color-light-layout;
border-radius: 15px;
z-index: 2;
}
+36
View File
@@ -0,0 +1,36 @@
import { Modular, Manager } from "../../core/Module";
class Popups<M extends Manager> extends Modular<M> {
public data? = {
/**
* 弹出层是否显示
*/
isShow: false
};
private disappearTimer?: number;
/**
* 显示弹出层
*/
public showPopups() {
this.setData({ isShow: true });
}
/**
* 隐藏弹出层
*/
public hidePopups() {
this.setData({ isShow: false });
}
public override onLoad() {
// Do something
}
}
export { Popups };
export default Popups;