Skip to content

Commit

Permalink
chore: 升级版本0.9.10
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
smileShirmy authored May 22, 2022
2 parents 338afbc + b8decfe commit 730c722
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 70 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 TaleLin
Copyright (c) 2022 TaleLin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion dist/capsule-bar/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


<cover-view mut-bind:tap="onTapRightButton" catch:longpress="onLongPressRightButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image class="icon-right" style="width{{capsuleRightIconWidth?capsuleRightIconWidth+'rpx':''}};height:{{capsuleRightIconHeight?capsuleRightIconHeight+'rpx':''}}" src="{{capsuleRightIconPath?capsuleRightIconPath:'icons/capsule-right-'+capsuleColor+'.png'}}"></cover-image>
<cover-image class="icon-right" style="width:{{capsuleRightIconWidth?capsuleRightIconWidth+'rpx':''}};height:{{capsuleRightIconHeight?capsuleRightIconHeight+'rpx':''}}" src="{{capsuleRightIconPath?capsuleRightIconPath:'icons/capsule-right-'+capsuleColor+'.png'}}"></cover-image>
</cover-view>
</cover-view>
</cover-view>
Expand Down
2 changes: 1 addition & 1 deletion dist/counter/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/dist/capsule-bar/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image
class="icon-right"
style="width{{capsuleRightIconWidth?capsuleRightIconWidth+'rpx':''}};height:{{capsuleRightIconHeight?capsuleRightIconHeight+'rpx':''}}"
style="width:{{capsuleRightIconWidth?capsuleRightIconWidth+'rpx':''}};height:{{capsuleRightIconHeight?capsuleRightIconHeight+'rpx':''}}"
src="{{capsuleRightIconPath?capsuleRightIconPath:'icons/capsule-right-'+capsuleColor+'.png'}}"></cover-image>
</cover-view>
</cover-view>
Expand Down
12 changes: 12 additions & 0 deletions examples/dist/counter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Component({
type: Number,
value: 1
},
roundFloat: {
type: Boolean,
value: false
},
disabled: Boolean,
iconSize: String,
iconColor: String
Expand Down Expand Up @@ -62,6 +66,7 @@ Component({
let {
value
} = e.detail;
// setTimeout留出修改count的时间,保证调整一些不合适的数值
setTimeout(() => {
this.blurCount(Number(value), () => {
eventUtil.emit(this, 'lintap', { count: this.data.count, type: 'blur' });
Expand Down Expand Up @@ -91,6 +96,10 @@ Component({
value = value > max ? max : value;
value = value < min ? min : value;

// 4舍5入
if (this.data.roundFloat) {
value = Math.round(value);
}
// 更新页面显示数值
value === this.data.count && this.setData({ focus: false });
value !== this.data.count && this.setData({ count: value }, () => {
Expand All @@ -114,6 +123,9 @@ Component({
} else if (type === 'reduce') {
result = count - step < min ? min : count - step;
}
// 浮点数运算会有精确度问题,保留两位小数
result = result.toFixed(2);
result = parseFloat(result);

this.setData({ count: result });
eventUtil.emit(this, 'lintap', {
Expand Down
49 changes: 0 additions & 49 deletions examples/pages/components/layout/pages/album/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,54 +34,5 @@ Page({
this.setData({
urls1_1:['https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-3.jpg?sign=d71bb290f896e14bb800d0fb807f6764&t=1590025427']
});
},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

}
});
14 changes: 7 additions & 7 deletions examples/pages/components/layout/pages/card/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<view class="content-name">卡片类型(primary)</view>
</view>

<l-card type="primary" l-class="card" image="https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1549701108&di=d141540da70a7f92abd6f90ffef7460c&src=http://ztd00.photos.bdimg.com/ztd/w=700;q=50/sign=0b1f180b5a43fbf2c52ca4238045bbbd/b7fd5266d0160924665b9f18dd0735fae6cd34b2.jpg"
<l-card type="primary" l-class="card" image="https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-7.jpg?sign=a09608b13d13402e657a8a37118f3190&t=1590025970"
title="新疆精选苹果">
<view class="content">
新疆苹果,又名塞威氏苹果,蔷微科,落叶乔木。原产新疆西部天山北山麓,主要集中分布于伊犁河谷果子沟,新源县境内的那拉提野果林,巩留的莫合林场,垂直分布区域海拔在1000~1300m的山顶、山坡、河谷区域。
Expand All @@ -17,7 +17,7 @@
<view class="content-name">卡片类型(cover)</view>
</view>

<l-card type="cover" l-class="card" image="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549736747027&di=8e75e11a150193e0f8a555e107f921eb&imgtype=0&src=http%3A%2F%2Fwww.lanxu.net%2Fuploads%2Fallimg%2F20190201%2F201902010602093105.jpg"
<l-card type="cover" l-class="card" image=https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-8.jpg?sign=a984d69b221dee6ce1da7f213c9593be&t=1590025977"
title="年味儿的科技大升级">
<view class="content">
一部分人回乡,一部分人把父母接到了身边,还有一部分人,干脆把假期变成了真正属于自己的时间。总有- -些科技,升级了生活方式,延展了过年形式的体验,还有一些欲...
Expand All @@ -29,8 +29,8 @@
<view class="content-name">卡片类型(avatar)</view>
</view>

<l-card type="avatar" l-class="card" image="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549711852726&di=6b454cec0b57f62d46089487454fa56f&imgtype=0&src=http%3A%2F%2Fimg3.duitang.com%2Fuploads%2Fitem%2F201609%2F14%2F20160914062816_SC8KU.jpeg"
title="七月在夏天" describe="18个小时前">
<l-card type="avatar" l-class="card" image="https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/avatar.jpg?sign=21809a2654e7a6fdd438166e83a35484&t=1590025376"
title="林间有风" describe="18个小时前">
<view class="avter-content">
很简单,豆瓣现在这样就给大家指了一条明路:以后凡是这种国产的风口浪尖的的片子,会涉及到各方背后利益关系的片子...
</view>
Expand All @@ -52,14 +52,14 @@
<view class="content-name">图片位置</view>
</view>

<l-card type="primary" l-class="card" l-img-class="right-card" position="right" image="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549711458710&di=e4af10c03585ed60f2b51bc61393cef8&imgtype=0&src=http%3A%2F%2Fimg0.pconline.com.cn%2Fpconline%2Fbizi%2Fdesktop%2F1410%2FA2_1.jpg"
<l-card type="primary" l-class="card" l-img-class="right-card" position="right" image="https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-9.jpg?sign=d63aa68ca5c4e65598c781cac161981c&t=1590026002"
title="做一个热爱生活的人!">
<view class="content">
很简单,豆瓣现在这样就给大家指了一条明路:以后凡是这种国产的风口浪尖的的片子...
</view>
</l-card>

<l-card type="primary" l-class="card" l-img-class="right-card" image="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549711458710&di=e4af10c03585ed60f2b51bc61393cef8&imgtype=0&src=http%3A%2F%2Fimg0.pconline.com.cn%2Fpconline%2Fbizi%2Fdesktop%2F1410%2FA2_1.jpg"
<l-card type="primary" l-class="card" l-img-class="right-card" image="https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-8.jpg?sign=a984d69b221dee6ce1da7f213c9593be&t=1590025977"
title="做一个热爱生活的人!">
<view class="content">
很简单,豆瓣现在这样就给大家指了一条明路:以后凡是这种国产的风口浪尖的的片子...
Expand All @@ -82,7 +82,7 @@
<view class="content-name">通栏卡片</view>
</view>

<l-card type="primary" full l-class="card" l-img-class="right-card" image="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549721538811&di=cf9f89bac33be78e9c1eacfad00c4c2d&imgtype=0&src=http%3A%2F%2Fp2.gexing.com%2FG1%2FM00%2F07%2F4B%2FrBACFFNu-XPgEVX7AAG69r794d8992.jpg"
<l-card type="primary" full l-class="card" l-img-class="right-card" image="https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-6.jpg?sign=6ba5b48f6766201a5458725defff47c7&t=1590025956"
title="做一个热爱生活的人!">
<view class="content">
大雄要死掉了,他对妻子说:我死之后你找一个男人我就在地下打一一个滚。说完就咽气了。某天...
Expand Down
12 changes: 6 additions & 6 deletions examples/pages/components/layout/pages/water-flow/data.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
const product = [{
image: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559893694567&di=decd597a4206cdc46ff1c58f93d54a4e&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F49453126d099fdb7ae6489e01449281c004af3761e10e-tvDbXH_fw658',
image: 'https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-7.jpg?sign=a09608b13d13402e657a8a37118f3190&t=1590025970',
title: '显瘦中长款系带风衣',
describe: '柔软顺滑、上身挺括显瘦,垂坠飘逸、不易皱好打理。',
count: '888',
delCount: '666'
},
{
image: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559893694566&di=9a26e26b870f520a931c93a817879427&imgtype=0&src=http%3A%2F%2Fpic.rmb.bdstatic.com%2F11a8881842e35c7ff188fbf13f220d5f.jpeg',
image: 'https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-5.jpg?sign=785abbd12c4fa70454ef4bd7c3961536&t=1590025441',
title: '酵素洗纯棉四件套',
describe: '100%新疆精梳棉,柔软、厚实、光泽度好,颜色高级,2色可选颜色高级,2色可选,高级,2色可选',
count: '459',
delCount: '359'
},
{
image: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559893993143&di=69804e9c197aeef57f69965980d804be&imgtype=0&src=http%3A%2F%2Fimg4.duitang.com%2Fuploads%2Fblog%2F201311%2F21%2F20131121101949_8iPmK.jpeg',
image: 'https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-4.jpg?sign=37d3fc32fe841a137e56b54cec2807c8&t=1590025434',
title: '环保棉做的男女款衬衫',
describe: '环保的高级长绒精梳棉,亲肤透气,安全无刺激,版型时髦有型,多款多色可选,环保的高级长绒精梳棉,亲肤透气,安全无刺激',
count: '888',
delCount: '666'
},
{
image: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559893795164&di=bbaa2db719d648f652058efb157735eb&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F2cf875136ae0f6f9babe8fffff24730c00e27c6850d50-8AgKsJ_fw658',
image: 'https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-6.jpg?sign=6ba5b48f6766201a5458725defff47c7&t=1590025956',
title: '自带线的快充移动电源',
describe: '自带两条快充线,支持大部分快充设备充电,还能充笔记本电脑,有微电流模式,电脑,有微电流模式',
count: '888',
delCount: '666'
},
{
image: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559895182707&di=afd7d89ebcb21e0dd2f0517336ce8d25&imgtype=0&src=http%3A%2F%2Fimg2.ph.126.net%2FZIrNMh3jc-oib-qFmdyYUQ%3D%3D%2F5717519838063213749.jpg',
image: 'https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-2.jpg?sign=7ccd10f793df154311f15a7b15d9ba57&t=1590025418',
title: '显瘦中长款系带风衣',
describe: '柔软顺滑、上身挺括显瘦,垂坠飘逸、不易皱好打理。不易皱好打理。',
count: '888',
delCount: '666'
},
{
image: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559895137091&di=c7db1a52ecbe3886bf79b39e3da162a4&imgtype=0&src=http%3A%2F%2Fphotocdn.sohu.com%2F20160204%2FImg436843528.jpg',
image: 'https://656e-env-9eb476-1258886794.tcb.qcloud.la/images/album/photo-5.jpg?sign=785abbd12c4fa70454ef4bd7c3961536&t=1590025441',
title: '酵素洗纯棉四件套',
describe: '100%新疆精梳棉,柔软、厚实、光泽度好,颜色高级,2色可选,100%新疆精梳棉,柔软、厚实、光泽度好,颜色高级,2色可选',
count: '459',
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/filter/pages/classnames/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<view>1 在
<text class="code">wxml</text>文件中使用
<text class="code">wxs</text>:</view>
<l-wemark md="```html\n<wxs src='../../../dist/filter/classnames.wxs' module='classnames'/>\n```" highlight="{{true}}" />
<l-wemark md="```html\n<wxs src='../../../../dist/filter/classnames.wxs' module='classnames'/>\n```" highlight="{{true}}" />
<view>注意事项:</view>
<view>1
<text class="code">src</text>是相对路径</view>
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/filter/pages/zero-padding/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<view>1 在
<text class="code">wxml</text>文件中使用
<text class="code">wxs</text>:</view>
<l-wemark md="```html\n<wxs src='../../../dist/filter/zero-padding.wxs' module='zeroPadding'/>\n```" highlight="{{true}}" />
<l-wemark md="```html\n<wxs src='../../../../dist/filter/zero-padding.wxs' module='zeroPadding'/>\n```" highlight="{{true}}" />
<view>注意事项:</view>
<view>1
<text class="code">src</text>是相对路径</view>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lin-ui",
"version": "0.9.9",
"version": "0.9.10",
"description": "A high quality UI components library with MiniProgram",
"main": "app.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/capsule-bar/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image
class="icon-right"
style="width{{capsuleRightIconWidth?capsuleRightIconWidth+'rpx':''}};height:{{capsuleRightIconHeight?capsuleRightIconHeight+'rpx':''}}"
style="width:{{capsuleRightIconWidth?capsuleRightIconWidth+'rpx':''}};height:{{capsuleRightIconHeight?capsuleRightIconHeight+'rpx':''}}"
src="{{capsuleRightIconPath?capsuleRightIconPath:'icons/capsule-right-'+capsuleColor+'.png'}}"></cover-image>
</cover-view>
</cover-view>
Expand Down
12 changes: 12 additions & 0 deletions src/counter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Component({
type: Number,
value: 1
},
roundFloat: {
type: Boolean,
value: false
},
disabled: Boolean,
iconSize: String,
iconColor: String
Expand Down Expand Up @@ -62,6 +66,7 @@ Component({
let {
value
} = e.detail;
// setTimeout留出修改count的时间,保证调整一些不合适的数值
setTimeout(() => {
this.blurCount(Number(value), () => {
eventUtil.emit(this, 'lintap', { count: this.data.count, type: 'blur' });
Expand Down Expand Up @@ -91,6 +96,10 @@ Component({
value = value > max ? max : value;
value = value < min ? min : value;

// 4舍5入
if (this.data.roundFloat) {
value = Math.round(value);
}
// 更新页面显示数值
value === this.data.count && this.setData({ focus: false });
value !== this.data.count && this.setData({ count: value }, () => {
Expand All @@ -114,6 +123,9 @@ Component({
} else if (type === 'reduce') {
result = count - step < min ? min : count - step;
}
// 浮点数运算会有精确度问题,保留两位小数
result = result.toFixed(2);
result = parseFloat(result);

this.setData({ count: result });
eventUtil.emit(this, 'lintap', {
Expand Down

0 comments on commit 730c722

Please sign in to comment.