仿互站小程序
This commit is contained in:
19
vant/goods-action-icon/index.js
Normal file
19
vant/goods-action-icon/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var i = require("../common/component"), n = require("../mixins/link"), e = require("../mixins/button"), o = require("../mixins/open-type");
|
||||
|
||||
(0, i.VantComponent)({
|
||||
classes: [ "icon-class", "text-class" ],
|
||||
mixins: [ n.link, e.button, o.openType ],
|
||||
props: {
|
||||
text: String,
|
||||
dot: Boolean,
|
||||
info: String,
|
||||
icon: String,
|
||||
disabled: Boolean,
|
||||
loading: Boolean
|
||||
},
|
||||
methods: {
|
||||
onClick: function(i) {
|
||||
this.$emit("click", i.detail), this.jumpLink();
|
||||
}
|
||||
}
|
||||
});
|
13
vant/goods-action-icon/index.json
Normal file
13
vant/goods-action-icon/index.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-icon": "../icon/index",
|
||||
"van-button": "../button/index",
|
||||
"forview": "/utils/forview/index",
|
||||
"van-loading": "/vant/loading/index",
|
||||
"van-dialog": "/vant/dialog/index",
|
||||
"van-popup": "/vant/popup/index",
|
||||
"van-tab": "/vant/tab/index",
|
||||
"van-tabs": "/vant/tabs/index"
|
||||
}
|
||||
}
|
7
vant/goods-action-icon/index.wxml
Normal file
7
vant/goods-action-icon/index.wxml
Normal file
@@ -0,0 +1,7 @@
|
||||
<van-button square appParameter="{{appParameter}}" bind:click="onClick" bindcontact="bindContact" binderror="bindError" bindgetphonenumber="bindGetPhoneNumber" bindgetuserinfo="bindGetUserInfo" bindlaunchapp="bindLaunchApp" bindopensetting="bindOpenSetting" businessId="{{businessId}}" customClass="van-goods-action-icon" disabled="{{disabled}}" id="{{id}}" lang="{{lang}}" loading="{{loading}}" openType="{{openType}}" sendMessageImg="{{sendMessageImg}}" sendMessagePath="{{sendMessagePath}}" sendMessageTitle="{{sendMessageTitle}}" sessionFrom="{{sessionFrom}}" showMessageCard="{{showMessageCard}}" size="large">
|
||||
<view class="van-goods-action-icon__content">
|
||||
<van-icon class="van-goods-action-icon__icon" customClass="icon-class" dot="{{dot}}" info="{{info}}" name="{{icon}}" size="20px" wx:if="{{icon}}"></van-icon>
|
||||
<slot name="icon"></slot>
|
||||
<text class="text-class">{{text}}</text>
|
||||
</view>
|
||||
</van-button>
|
23
vant/goods-action-icon/index.wxss
Normal file
23
vant/goods-action-icon/index.wxss
Normal file
@@ -0,0 +1,23 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-goods-action-icon {
|
||||
border: none!important;
|
||||
width: 50px!important;
|
||||
width: var(--goods-action-icon-height,50px)!important;
|
||||
}
|
||||
|
||||
.van-goods-action-icon__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
line-height: 1;
|
||||
font-size: 10px;
|
||||
font-size: var(--goods-action-icon-font-size,10px);
|
||||
color: #646566;
|
||||
color: var(--goods-action-icon-text-color,#646566);
|
||||
}
|
||||
|
||||
.van-goods-action-icon__icon {
|
||||
margin-bottom: 4px;
|
||||
}
|
Reference in New Issue
Block a user