#36 Add basic popups
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user