We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`_initInputStyle () { const wrapper = this.$refs.wrapper const computedStyle = window.getComputedStyle(wrapper) const rectStyle = wrapper.getBoundingClientRect() const inputElem = this.$refs.input const placeholderElem = this.$refs.placeholder
// 获取到的高度为 0 则认为组件未渲染,通常是使用 v-show 时会出现此情况。 if (!rectStyle.height) { return } else { this.isRendered = true } // 渲染之后进行计算,设置实际的高度等样式。 const realHeight = rectStyle.height - (parseFloat(computedStyle.borderTopWidth, 10) + parseFloat(computedStyle.borderBottomWidth, 10)) if (realHeight !== this.wrapperHeight) { inputElem.style.height = `${realHeight}px` inputElem.style.lineHeight = `${realHeight}px` this.wrapperHeight = realHeight } // inputElem.style.color = computedStyle.color placeholderElem.style.height = `${realHeight}px` placeholderElem.style.lineHeight = `${realHeight}px` }`
这部分代码是不是初始化了样式? 我在外面无法设置 letter-spacing 。有什么办法可以解决这个问题吗?
The text was updated successfully, but these errors were encountered:
650573c
还是无法设置letter-spacing样式
Sorry, something went wrong.
No branches or pull requests
`_initInputStyle () {
const wrapper = this.$refs.wrapper
const computedStyle = window.getComputedStyle(wrapper)
const rectStyle = wrapper.getBoundingClientRect()
const inputElem = this.$refs.input
const placeholderElem = this.$refs.placeholder
这部分代码是不是初始化了样式?
我在外面无法设置 letter-spacing 。有什么办法可以解决这个问题吗?
The text was updated successfully, but these errors were encountered: