first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/component/popup/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/popup/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
ad4676e5-cb8d-402a-ab3d-f2369f5cc401
|
||||
36
衣莎项目/源码/YiShaXiYi/component/popup/popup.js
Normal file
36
衣莎项目/源码/YiShaXiYi/component/popup/popup.js
Normal file
@@ -0,0 +1,36 @@
|
||||
// component/popup/popup.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
options:{
|
||||
multipleSlots: true
|
||||
},
|
||||
properties: {
|
||||
isPopup:{ //是否显示弹出层
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
backClick:{ // 点击背景是否关闭
|
||||
type: Boolean,
|
||||
value: true
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
isBackClick () {
|
||||
if(this.properties.backClick) return;
|
||||
this.properties.isPopup = false
|
||||
}
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/component/popup/popup.json
Normal file
4
衣莎项目/源码/YiShaXiYi/component/popup/popup.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
10
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxml
Normal file
10
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxml
Normal file
@@ -0,0 +1,10 @@
|
||||
<!--component/popup/popup.wxml-->
|
||||
<view
|
||||
catchtouchmove='{{ isPopup }}'
|
||||
wx:if="{{ isPopup }}"
|
||||
class="popup"
|
||||
bindtap="isBackClick"
|
||||
>
|
||||
<slot/>
|
||||
</view>
|
||||
|
||||
15
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxss
Normal file
15
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxss
Normal file
@@ -0,0 +1,15 @@
|
||||
/* component/popup/popup.wxss */
|
||||
.popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999999;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
Reference in New Issue
Block a user