[build] 0.4.0

This commit is contained in:
陈嘉涵 2018-10-15 11:29:24 +08:00
parent 001ee9d4a1
commit 912861a405
13 changed files with 105 additions and 0 deletions

18
dist/goods-action-button/index.js vendored Normal file
View File

@ -0,0 +1,18 @@
import { link } from '../mixins/link';
import { VantComponent } from '../common/component';
VantComponent({
mixins: [link],
props: {
text: String,
type: {
type: String,
value: 'danger'
}
},
methods: {
onClick: function onClick(event) {
this.$emit('click', event.detail);
this.jumpLink();
}
}
});

6
dist/goods-action-button/index.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"van-button": "../button/index"
}
}

8
dist/goods-action-button/index.wxml vendored Normal file
View File

@ -0,0 +1,8 @@
<van-button
square
size="large"
type="{{ type }}"
bind:click="onClick"
>
{{ text }}
</van-button>

1
dist/goods-action-button/index.wxss vendored Normal file
View File

@ -0,0 +1 @@
@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}

16
dist/goods-action-icon/index.js vendored Normal file
View File

@ -0,0 +1,16 @@
import { link } from '../mixins/link';
import { VantComponent } from '../common/component';
VantComponent({
mixins: [link],
props: {
text: String,
info: String,
icon: String
},
methods: {
onClick: function onClick(event) {
this.$emit('click', event.detail);
this.jumpLink();
}
}
});

7
dist/goods-action-icon/index.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"van-icon": "../icon/index",
"van-button": "../button/index"
}
}

15
dist/goods-action-icon/index.wxml vendored Normal file
View File

@ -0,0 +1,15 @@
<van-button
custom-class="van-goods-action-icon"
size="large"
bind:tap="onClick"
>
<view class="van-goods-action-icon__content van-hairline--right">
<van-icon
size="20px"
name="{{ icon }}"
info="{{ info }}"
class="van-goods-action-icon__icon"
/>
{{ text }}
</view>
</van-button>

1
dist/goods-action-icon/index.wxss vendored Normal file
View File

@ -0,0 +1 @@
@import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:10px;color:#666;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:5px}

2
dist/goods-action/index.js vendored Normal file
View File

@ -0,0 +1,2 @@
import { VantComponent } from '../common/component';
VantComponent();

3
dist/goods-action/index.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"component": true
}

3
dist/goods-action/index.wxml vendored Normal file
View File

@ -0,0 +1,3 @@
<view class="van-goods-action custom-class">
<slot />
</view>

1
dist/goods-action/index.wxss vendored Normal file
View File

@ -0,0 +1 @@
@import '../common/index.wxss';.van-goods-action{left:0;right:0;bottom:0;display:-webkit-flex;display:flex;position:fixed}

24
dist/mixins/link.js vendored Normal file
View File

@ -0,0 +1,24 @@
export var link = Behavior({
properties: {
url: String,
linkType: {
type: String,
value: 'navigateTo'
}
},
methods: {
jumpLink: function jumpLink(urlKey) {
if (urlKey === void 0) {
urlKey = 'url';
}
var url = this.data[urlKey];
if (url) {
wx[this.data.linkType]({
url: url
});
}
}
}
});