mirror of
https://gitee.com/TSpecific/tuniao-ui.git
synced 2026-06-08 12:33:17 +08:00
Compare commits
3 Commits
e39af9afd4
...
f503c4b578
| Author | SHA1 | Date | |
|---|---|---|---|
| f503c4b578 | |||
| 5186a277e1 | |||
| 224c9ea9b1 |
@@ -114,6 +114,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Emitter from '../../libs/utils/emitter.js'
|
import Emitter from '../../libs/utils/emitter.js'
|
||||||
|
import {
|
||||||
|
debounceFun
|
||||||
|
} from '../../libs/function/applyEven.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [Emitter],
|
mixins: [Emitter],
|
||||||
@@ -334,7 +337,7 @@
|
|||||||
/**
|
/**
|
||||||
* input事件
|
* input事件
|
||||||
*/
|
*/
|
||||||
handleInput(event) {
|
handleInput:debounceFun(function(event){
|
||||||
let value = event.detail.value
|
let value = event.detail.value
|
||||||
// 是否需要去掉空格
|
// 是否需要去掉空格
|
||||||
if (this.trim) value = this.$tn.string.trim(value)
|
if (this.trim) value = this.$tn.string.trim(value)
|
||||||
@@ -351,11 +354,11 @@
|
|||||||
if (this.$tn.string.trim(value) === this.lastValue) return
|
if (this.$tn.string.trim(value) === this.lastValue) return
|
||||||
this.lastValue = value
|
this.lastValue = value
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// 发送当前的值到form-item进行校验
|
// 发送当前的值到form-item进行校验
|
||||||
this.dispatch('tn-form-item','on-form-change', value)
|
this.dispatch('tn-form-item','on-form-change', value)
|
||||||
}, 40)
|
}, 40)
|
||||||
},
|
},this.blockTime),
|
||||||
/**
|
/**
|
||||||
* blur事件
|
* blur事件
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -119,21 +119,25 @@
|
|||||||
style.padding = '0 12rpx'
|
style.padding = '0 12rpx'
|
||||||
style.fontSize = '20rpx'
|
style.fontSize = '20rpx'
|
||||||
style.height = '32rpx'
|
style.height = '32rpx'
|
||||||
|
style.lineHeight = '32rpx'
|
||||||
break
|
break
|
||||||
case 'lg':
|
case 'lg':
|
||||||
style.padding = '0 20rpx'
|
style.padding = '0 20rpx'
|
||||||
style.fontSize = '28rpx'
|
style.fontSize = '28rpx'
|
||||||
style.height = '62rpx'
|
style.height = '62rpx'
|
||||||
|
style.lineHeight = '62rpx'
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
style.padding = '0 16rpx'
|
style.padding = '0 16rpx'
|
||||||
style.fontSize = '24rpx'
|
style.fontSize = '24rpx'
|
||||||
style.height = '48rpx'
|
style.height = '48rpx'
|
||||||
|
style.lineHeight = '48rpx'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
style.width = this.width || '120rpx'
|
style.width = this.width || '120rpx'
|
||||||
style.height = this.height || style.height
|
style.height = this.height || style.height
|
||||||
|
style.lineHeight = this.height || style.height
|
||||||
|
|
||||||
style.padding = this.padding || style.padding
|
style.padding = this.padding || style.padding
|
||||||
if (this.margin) {
|
if (this.margin) {
|
||||||
|
|||||||
Reference in New Issue
Block a user