Initial commit
This commit is contained in:
3
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/build.js
generated
vendored
Normal file
3
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/build.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
template: '<my-card wx:if="{{n.name==\'card\'}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" mode="{{opts[5]}}" src="{{n.attrs.src}}" title="{{n.attrs.title}}" desc="{{n.attrs.desc}}" url="{{n.attrs.url}}" color="{{n.attrs.color}}" bgcolor="{{n.attrs.bgcolor}}" border="{{n.attrs.border}}" name="{{n.attrs.name}}" data-i="{{i}}" data-source="card" />'
|
||||
}
|
||||
26
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.js
generated
vendored
Normal file
26
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @fileoverview card 组件
|
||||
*/
|
||||
Component({
|
||||
properties: {
|
||||
mode: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
src: String,
|
||||
title: String,
|
||||
desc: String,
|
||||
url: String,
|
||||
color: String,
|
||||
bgcolor: String,
|
||||
border: String
|
||||
},
|
||||
data: {},
|
||||
methods: {
|
||||
onClick (e) {
|
||||
if (this.properties.url && this.properties.url.trim().length > 6 && !this.properties.mode) {
|
||||
wx.navigateTo({ url: this.properties.url })
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
3
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.json
generated
vendored
Normal file
3
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
9
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.wxml
generated
vendored
Normal file
9
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.wxml
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<view class="card" bindtap="onClick" style="background-color:{{bgcolor||'#a4d0ff'}};border:{{border||'1px solid #FFF'}};color:{{color||'#000'}}">
|
||||
<image class="card-img" mode="aspectFill" src="{{src}}" />
|
||||
<view class="text-wrap text-wrap-width" wx:if="{{!!desc}}">
|
||||
<view class="title one-t">{{title}}</view>
|
||||
<view class="desc one-t">{{desc}}</view>
|
||||
</view>
|
||||
<view wx:else class="text-wrap-width title more-t">{{title}}</view>
|
||||
<image class="card-icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAABCFBMVEUAAAC/v7+qqqqZmZmLi6KJnZ2ImZmHlpaGlKGMjJmSkp6Li5eQkJuKlZ+Pj5mOjpeJkpuNjZ6IkJmHj5eLi5uKkpmGjZqJj5uLi5eIjpmIjZiKj5qKj5mJjpiHjJqJjZaGj5iKj5eIjJmKjpqHi5eGjZeIi5eHjZiIi5eHjJiIjpaHjJeIjZiGjJeIjZiGjJaGjJeIi5aGjJeHi5eHi5aHjJeHjJaHjJeGi5eHjJaHjJeGi5aGi5aHjJeHjJaGjJeGjJeHjJaHi5eGi5eHjJaHjJeGjJaGjJeHi5aHjJeHjJeHi5aGjJeHi5aGjJaHi5eGjJaHi5eHjJaGi5eGi5aHjJeGi5aGi5apAvjmAAAAV3RSTlMABAYKCw0PERMUFRYXGBkbHB0eICEjJiksLS8wMjQ1ODk7PD9ATFZXWFlaW1xdXl+Hi6msu7/Dx8vMzs/R0tTV19na3N3f4uTn6evs7e7v8PHy9PX7/P18cCTXAAABEklEQVRo3u2YWU5CQRQFn4qCM4LzhIoDAorzrIgCigiCimf/O/Gj3UIlmJxaQFXSea/T90aRMcYYY4zpG0ZPu9cZMnAi6SsLBjqS9LnJBcqSpC53Sjs/kqSPNaxwGAqtFbrQXKILjQW68DpPF17m6EI9TRdqM3TheZouVCbpQnkcK5RC4T5BF27jdOFqhC5cDtOFixhdOB+iC2cDdOEoggttLrDbk6QW5/+WJB1T/r1e+FAHWT/2q/35scsiF/w3cdZ/R13Y+8H/MMb6Hycgfz74n6ZYfzXJ+mspyF8I/vos68cep0X4eV2EB4SD4H9bZP3vy+yTtL3KjrGddXgQ34BXCVvwMmT7P69zjDHGGGP6gF83lHISOctsKQAAAABJRU5ErkJggg=="></image>
|
||||
</view>
|
||||
55
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.wxss
generated
vendored
Normal file
55
wechat-mini-program/node_modules/mp-html/plugins/card/miniprogram/card.wxss
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
.one-t {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: all linear 0.2s;
|
||||
}
|
||||
.more-t {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
transition: all linear 0.2s;
|
||||
}
|
||||
.card {
|
||||
width: 80%;
|
||||
margin: 10rpx auto;
|
||||
max-width: 700rpx;
|
||||
max-height: 140rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0 20rpx 10rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.card-img {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 12rpx;
|
||||
flex: 0 0 96rpx;
|
||||
}
|
||||
.card-icon {
|
||||
width: 30rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
.card .text-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card .text-wrap-width {
|
||||
width: 72%;
|
||||
}
|
||||
.card .title {
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
.card .desc {
|
||||
font-size: 27rpx;
|
||||
line-height: 37rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user