提交 246827c5 编写于 作者: X xzs02

Merge branch 'dev' of github.com:dcloudio/uni-app into dev

...@@ -34,7 +34,6 @@ import { ...@@ -34,7 +34,6 @@ import {
} from 'uni-mixins' } from 'uni-mixins'
const INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password'] const INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password']
const NUMBER_TYPES = ['number', 'digit'] const NUMBER_TYPES = ['number', 'digit']
let isRendered = false
export default { export default {
name: 'Input', name: 'Input',
mixins: [emitter], mixins: [emitter],
...@@ -93,7 +92,8 @@ export default { ...@@ -93,7 +92,8 @@ export default {
inputValue: this.value + '', inputValue: this.value + '',
composing: false, composing: false,
wrapperHeight: 0, wrapperHeight: 0,
cachedValue: '' cachedValue: '',
isRendered: false
} }
}, },
computed: { computed: {
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
}, },
methods: { methods: {
_resize () { _resize () {
if (!isRendered) { if (!this.isRendered) {
this._initInputStyle() this._initInputStyle()
} }
}, },
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
if (!rectStyle.height) { if (!rectStyle.height) {
return return
} else { } else {
isRendered = true this.isRendered = true
} }
// 渲染之后进行计算,设置实际的高度等样式。 // 渲染之后进行计算,设置实际的高度等样式。
const realHeight = rectStyle.height - (parseFloat(computedStyle.borderTopWidth, 10) + parseFloat(computedStyle.borderBottomWidth, const realHeight = rectStyle.height - (parseFloat(computedStyle.borderTopWidth, 10) + parseFloat(computedStyle.borderBottomWidth,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册