(#36) Optimization popup layer modular.
This commit is contained in:
@@ -17,7 +17,7 @@ import { TestLayerA } from "./TestLayerA";
|
||||
const userCard = manager.addModule(UserCard, "userCard");
|
||||
|
||||
//#region test layer
|
||||
// popupLayer.hideOtherWhenShow = false;
|
||||
popupLayer.initLayers(["layerA", "layerB"]);
|
||||
const testLayerA = manager.addModule(TestLayerA, "testLayerA");
|
||||
userCard.on("clickChangeTheme", () => {
|
||||
popupLayer.emit("show", "layerA");
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<!-- 层遮蔽层 -->
|
||||
<view class="occlude {{ mask$occlude$isShow ? 'show-fade' : 'hide-fade' }} {{ mask$occlude$isDisplay ? 'block' : 'none' }}" bindtap="mask$clickMask"></view>
|
||||
<view class="{{ mask$occlude$className }}" bindtap="mask$clickMask"></view>
|
||||
|
||||
<!-- 蒙版 -->
|
||||
<view class="mask {{ mask$mask$isShow ? 'show-fade' : 'hide-fade' }} {{ mask$mask$isDisplay ? 'block' : 'none' }}" bindtap="mask$clickMask"></view>
|
||||
<view class="{{ mask$mask$className }}" bindtap="mask$clickMask"></view>
|
||||
|
||||
<!-- 层A -->
|
||||
<view class="layer {{ mask$layerA$isShow ? 'show-scale' : 'hide-scale' }} {{ mask$layerA$isDisplay ? 'block' : 'none' }}" bindtap="mask$clickMask">
|
||||
<view class="{{ mask$layerA$className }}" bindtap="mask$clickMask">
|
||||
<view class="card" style="height: 300px; line-height: 300px; text-align:center" catchtap="testLayerA$click">layerA(点击显示layerB)</view>
|
||||
</view>
|
||||
|
||||
<!-- 层B -->
|
||||
<view class="layer {{ mask$layerB$isShow ? 'show-scale' : 'hide-scale' }} {{ mask$layerB$isDisplay ? 'block' : 'none' }}" bindtap="mask$clickMask">
|
||||
<view class="{{ mask$layerB$className }}" bindtap="mask$clickMask">
|
||||
<view class="card" style="height: 200px; line-height: 200px; text-align:center" catchtap>layerB</view>
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user