仿互站小程序
This commit is contained in:
21
vant/overlay/index.js
Normal file
21
vant/overlay/index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
props: {
|
||||
show: Boolean,
|
||||
mask: Boolean,
|
||||
customStyle: String,
|
||||
duration: {
|
||||
type: [ Number, Object ],
|
||||
value: 300
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
value: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick: function() {
|
||||
this.$emit("click");
|
||||
},
|
||||
noop: function() {}
|
||||
}
|
||||
});
|
14
vant/overlay/index.json
Normal file
14
vant/overlay/index.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-transition": "../transition/index",
|
||||
"forview": "/utils/forview/index",
|
||||
"van-loading": "/vant/loading/index",
|
||||
"van-dialog": "/vant/dialog/index",
|
||||
"van-button": "/vant/button/index",
|
||||
"van-icon": "/vant/icon/index",
|
||||
"van-popup": "/vant/popup/index",
|
||||
"van-tab": "/vant/tab/index",
|
||||
"van-tabs": "/vant/tabs/index"
|
||||
}
|
||||
}
|
1
vant/overlay/index.wxml
Normal file
1
vant/overlay/index.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<van-transition bind:tap="onClick" catch:touchmove="noop" customClass="van-overlay" customStyle="z-index: {{zIndex}}; {{mask?'background-color: rgba(0, 0, 0, .7);':''}}; {{customStyle}}" duration="{{duration}}" show="{{show}}"></van-transition>
|
9
vant/overlay/index.wxss
Normal file
9
vant/overlay/index.wxss
Normal file
@@ -0,0 +1,9 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
Reference in New Issue
Block a user