Compare commits

..

No commits in common. "04b8bf365fd8e99d92affda9a3b2ce883b4d91a6" and "82e1c0941e0511393cac556a0f6262c3e5b9c5c0" have entirely different histories.

7 changed files with 7 additions and 86 deletions

View File

@ -1,8 +0,0 @@
view.mask {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: .2);
z-index: 1;
}

View File

@ -1,45 +0,0 @@
import { Modular, Manager } from "../../core/Module";
class Mask<M extends Manager> extends Modular<M> {
public data? = {
/**
*
*/
zIndex: 1,
/**
*
*/
isShow: false
};
private disappearTimer?: number;
/**
*
*/
public showMask() {
this.setData({ isShow: true });
}
/**
*
*/
public hideMask() {
this.setData({ isShow: false });
}
public override onLoad() {
this.setFunc(this.handleClickMask, "handleClickMask");
// Do something
}
private handleClickMask() {
this.hideMask();
}
}
export { Mask };
export default Mask;

View File

@ -1,7 +1,7 @@
@import "./UserCard.scss";
@import "./MainFunction.scss";
@import "./FunctionList.scss";
@import "../../modular/Mask/Mask.scss";
view.container{
padding-top: 50rpx;

View File

@ -2,11 +2,9 @@ import { Manager } from "../../core/Module";
import { UserCard } from "./UserCard";
import { MainFunction } from "./MainFunction";
import { FunctionList } from "./FunctionList";
import { Mask } from "../../modular/Mask/Mask";
Manager.Page((manager) => {
const mask = manager.addModule(Mask, "mask");
manager.addModule(UserCard, "userCard", { mask });
manager.addModule(UserCard, "userCard");
manager.addModule(MainFunction, "mainFunction");
manager.addModule(FunctionList, "functionList");
});

View File

@ -1,5 +1,3 @@
<!-- 蒙版 -->
<view class="mask" bindtap="mask$handleClickMask" style="display:{{mask$isShow ? 'block' : 'none'}}"></view>
<!-- 顶部的阴影 -->
<view class="top-shadow"></view>
@ -16,9 +14,7 @@
<!-- 主题变换按钮 -->
<view class="theme">
<view bindtap="userCard$changeTheme">
<image class="icon-sub" src="../../image/account/Account_Theme.svg" />
</view>
<image class="icon-sub" src="../../image/account/Account_Theme.svg" />
</view>
<!-- 用户昵称 -->

View File

@ -27,17 +27,9 @@ view.user-card {
display: flex;
justify-content: flex-end;
view {
image {
width: 23px;
height: 23px;
padding: 20px;
margin: -20px;
border-radius: 20px;
image {
width: 100%;
height: 100%;
}
}
}

View File

@ -1,21 +1,9 @@
import { Modular, Manager } from "../../core/Module";
import { Mask } from "../../modular/Mask/Mask";
type IUserCardDependent<M extends Manager> = {
mask: Mask<M>
}
class UserCard<M extends Manager> extends Modular<M, IUserCardDependent<M>> {
public override onLoad() {
this.setFunc(this.handleChangeTheme, "changeTheme")
}
class UserCard<M extends Manager> extends Modular<M> {
/**
*
*/
private handleChangeTheme() {
this.depends?.mask.showMask();
public override onLoad() {
// Do something
}
}