This commit is contained in:
2019-12-14 09:20:48 +08:00
parent 57e95e3217
commit 933673b092
372 changed files with 8090 additions and 0 deletions

1
utils/dist/icon/index.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export {};

39
utils/dist/icon/index.js vendored Normal file
View File

@@ -0,0 +1,39 @@
import { VantComponent } from '../common/component';
import { addUnit } from '../common/utils';
VantComponent({
props: {
dot: Boolean,
info: null,
size: {
type: null,
observer: 'setSizeWithUnit'
},
color: String,
customStyle: String,
classPrefix: {
type: String,
value: 'van-icon'
},
name: {
type: String,
observer(val) {
this.setData({
isImageName: val.indexOf('/') !== -1
});
}
}
},
data: {
sizeWithUnit: null,
},
methods: {
onClick() {
this.$emit('click');
},
setSizeWithUnit(size) {
this.setData({
sizeWithUnit: addUnit(size)
});
}
}
});

6
utils/dist/icon/index.json vendored Normal file
View File

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

18
utils/dist/icon/index.wxml vendored Normal file
View File

@@ -0,0 +1,18 @@
<view
class="custom-class {{ classPrefix }} {{ isImageName ? 'van-icon--image' : classPrefix + '-' + name }}"
style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + sizeWithUnit + ';' : '' }}{{ customStyle }}"
bind:tap="onClick"
>
<van-info
wx:if="{{ info !== null || dot }}"
dot="{{ dot }}"
info="{{ info }}"
custom-class="van-icon__info"
/>
<image
wx:if="{{ isImageName }}"
src="{{ name }}"
mode="aspectFit"
class="van-icon__image"
/>
</view>

1
utils/dist/icon/index.wxss vendored Normal file

File diff suppressed because one or more lines are too long