仿互站小程序
This commit is contained in:
6
vant/info/index.js
Normal file
6
vant/info/index.js
Normal file
@@ -0,0 +1,6 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
props: {
|
||||
info: null,
|
||||
customStyle: String
|
||||
}
|
||||
});
|
13
vant/info/index.json
Normal file
13
vant/info/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"
|
||||
}
|
||||
}
|
1
vant/info/index.wxml
Normal file
1
vant/info/index.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<view class="custom-class van-info" style="{{customStyle}}" wx:if="{{info!==null}}">{{info}}</view>
|
22
vant/info/index.wxss
Normal file
22
vant/info/index.wxss
Normal file
@@ -0,0 +1,22 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-info {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: 0;
|
||||
min-width: 16px;
|
||||
padding: 0 3px;
|
||||
font-family: PingFang SC,Helvetica Neue,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 14px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background-color: #f44;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 16px;
|
||||
transform: translateX(50%);
|
||||
box-sizing: border-box;
|
||||
transform-origin: 100%;
|
||||
}
|
Reference in New Issue
Block a user