仿互站小程序
This commit is contained in:
23
vant/goods-action/index.js
Normal file
23
vant/goods-action/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
relation: {
|
||||
type: "descendant",
|
||||
name: "goods-action-button",
|
||||
linked: function(n) {
|
||||
this.children.push(n);
|
||||
},
|
||||
unlinked: function(n) {
|
||||
this.children = this.children.filter(function(e) {
|
||||
return e !== n;
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeCreate: function() {
|
||||
this.children = [];
|
||||
},
|
||||
props: {
|
||||
safeAreaInsetBottom: {
|
||||
type: Boolean,
|
||||
value: !0
|
||||
}
|
||||
}
|
||||
});
|
13
vant/goods-action/index.json
Normal file
13
vant/goods-action/index.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"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"
|
||||
}
|
||||
}
|
4
vant/goods-action/index.wxml
Normal file
4
vant/goods-action/index.wxml
Normal file
@@ -0,0 +1,4 @@
|
||||
<view class="custom-class {{utils.bem( 'goods-action',{safe:safeAreaInsetBottom} )}}">
|
||||
<slot></slot>
|
||||
</view>
|
||||
<wxs module="utils" src="../wxs/utils.wxs" />
|
17
vant/goods-action/index.wxss
Normal file
17
vant/goods-action/index.wxss
Normal file
@@ -0,0 +1,17 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-goods-action {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
background-color: var(--goods-action-background-color,#fff);
|
||||
}
|
||||
|
||||
.van-goods-action--safe {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
Reference in New Issue
Block a user