-
Notifications
You must be signed in to change notification settings - Fork 769
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.【新增】readMore组件新增index参数和close,open事件
2.【新增】新增man,woman,level三个图标 3.【新增】新增"注意事项"专题,记录一些踩坑知识点,让同学们少走弯路,详见[注意事项](https://uviewui.com/components/feature.html) 4.【新增】alertTips组件新增icon、title-style、desc-style、icon-style参数 5.【新增】新增节流和防抖方法,通过this.$u.debounce()和this.$u.throttle()调用,详见[节流防抖](https://uviewui.com/js/debounce.html) 6.【新增】button组件新增节流功能,以及配置间隔时间的throttle-time参数 7.【新增】field和input组件新增trim参数,默认为true,可以去除输入内容两端的空格 8.【优化】优化form-item组件的label设置为空内容时,依然显示左边的占位的问题 9.【优化】优化lazy-load组件修改图片路径后,无法再次加载的问题 10.【优化】优化navbar,upload,tabbar等组件由于各小程序props参数类型为Function,组件内执行父组件方法时this上下文丢失的问题 11.【优化】优化numberbox组件无法阻止事件冒泡的问题 12.【优化】优化timeFormat组件由于使用es7的padStart方法,导致在电脑版微信小程序无法识别的问题 13.【调整】调整this.$u.sys和this.$u.os,通过this.$u.sys()和this.$u.os()调用,详见[升级指南](https://uviewui.com/components/changeGuide.html) 14.【修复】修复无法通过手动设置popup的v-model为false来关闭popup的问题 15.【修复】修复骨架屏组件在微信小程序平台的组件中使用无效的问题。
- Loading branch information
Showing
36 changed files
with
706 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
<template> | ||
<view> | ||
<u-popup v-model="show" @close="close"> | ||
<view>出淤泥而不染,濯清涟而不妖</view> | ||
</u-popup> | ||
<u-button @click="show = true">打开</u-button> | ||
<view style="padding-top: 200px;"> | ||
<u-button @click="show = true" :custom-style="{ | ||
color: 'red', | ||
borderColor: 'blue' | ||
}">打开</u-button> | ||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
show: false | ||
show: true, | ||
list: [{ | ||
name: '待收货' | ||
}, { | ||
name: '待付款' | ||
}, { | ||
name: '待评价' | ||
}], | ||
current: 0 | ||
} | ||
}, | ||
onLoad() { | ||
// setTimeout(() => { | ||
// this.show = false; | ||
// }, 2000) | ||
}, | ||
methods: { | ||
close() { | ||
console.log('close'); | ||
//console.log('close'); | ||
}, | ||
change(index) { | ||
this.current = index; | ||
} | ||
} | ||
} | ||
</script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<template> | ||
<view class="u-demo"> | ||
<view class="u-demo-wrap"> | ||
<view class="u-demo-title">演示效果</view> | ||
<view class="u-demo-area"> | ||
<view class="no-mode-here"> | ||
选择节流或者防抖模式,点击按钮,将会执行回调并显示在下方: | ||
</view> | ||
<view class="u-demo-result-line" v-if="result.length"> | ||
<view v-for="(item, index) in result" :key="index">{{(index >= 1) ? '-' : ''}}回调</view> | ||
</view> | ||
</view> | ||
</view> | ||
<view class="u-config-wrap"> | ||
<view class="u-button" hover-class="u-button--hover" hover-stay-time="150" @tap="btnClick"> | ||
点击触发 | ||
</view> | ||
<view class="u-config-title u-border-bottom"> | ||
参数配置 | ||
</view> | ||
<view class="u-config-item"> | ||
<view class="u-item-title">模式</view> | ||
<u-subsection vibrateShort :list="['节流', '防抖']" @change="modeChange"></u-subsection> | ||
</view> | ||
<view class="u-config-item"> | ||
<view class="u-item-title">时间间隔</view> | ||
<u-subsection vibrateShort current="1" :list="['500ms', '1000ms', '2000ms']" @change="timeoutChange"></u-subsection> | ||
</view> | ||
<view class="u-config-item"> | ||
<view class="u-item-title">执行时机</view> | ||
<u-subsection vibrateShort :list="['开始处', '结束处']" @change="immediateChange"></u-subsection> | ||
</view> | ||
</view> | ||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
result: [], | ||
timeout: 1000, | ||
immediate: true, | ||
mode: 'throttle' | ||
} | ||
}, | ||
methods: { | ||
modeChange(index) { | ||
this.mode = index ? 'debouncd' : 'throttle'; | ||
}, | ||
timeoutChange(index) { | ||
this.timeout = [500, 1000, 2000][index]; | ||
}, | ||
immediateChange(index) { | ||
this.immediate = !index; | ||
}, | ||
getResult() { | ||
if(this.result.length >= 6) this.result = []; | ||
this.result.push(0); | ||
}, | ||
btnClick() { | ||
if(this.mode == 'throttle') { | ||
this.$u.throttle(this.getResult, this.timeout, this.immediate); | ||
} else { | ||
this.$u.debounce(this.getResult, this.timeout, this.immediate); | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.u-button { | ||
margin-top: 50rpx; | ||
margin-bottom: 50rpx; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 80rpx; | ||
border-radius: 6rpx; | ||
border: 1px solid $u-type-primary; | ||
color: $u-type-primary; | ||
} | ||
.u-button--hover { | ||
color: #fff; | ||
background-color: $u-type-primary; | ||
} | ||
.u-demo-result-line { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.