[Improvement] Switch: support custom size (#723)

This commit is contained in:
neverland
2018-03-19 13:44:12 +08:00
committed by GitHub
parent 1489efd9f9
commit c6a3896ce7
9 changed files with 62 additions and 63 deletions

View File

@@ -127,6 +127,10 @@ export default create({
}
const el = this.$refs.textarea;
if (!el) {
return;
}
el.style.height = 'auto';
let height = el.scrollHeight;