仿互站小程序
This commit is contained in:
18
vant/icon/index.js
Normal file
18
vant/icon/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
props: {
|
||||
info: null,
|
||||
name: String,
|
||||
size: String,
|
||||
color: String,
|
||||
customStyle: String,
|
||||
classPrefix: {
|
||||
type: String,
|
||||
value: "van-icon"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick: function() {
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
});
|
14
vant/icon/index.json
Normal file
14
vant/icon/index.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-info": "../info/index",
|
||||
"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"
|
||||
}
|
||||
}
|
5
vant/icon/index.wxml
Normal file
5
vant/icon/index.wxml
Normal file
@@ -0,0 +1,5 @@
|
||||
<view bind:tap="onClick" class="custom-class {{classPrefix}} {{utils.isSrc(name)?'van-icon--image':classPrefix+'-'+name}}" style="{{color?'color: '+color+';':''}}{{size?'font-size: '+size+';':''}}{{customStyle}}">
|
||||
<van-info customClass="van-icon__info" info="{{info}}" wx:if="{{info!==null}}"></van-info>
|
||||
<image class="van-icon__image" src="{{name}}" wx:if="{{utils.isSrc(name)}}"></image>
|
||||
</view>
|
||||
<wxs module="utils" src="../wxs/utils.wxs" />
|
1279
vant/icon/index.wxss
Normal file
1279
vant/icon/index.wxss
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user