diff --git a/pages/component/input/input.uvue b/pages/component/input/input.uvue index 7193a80246fef9f118c88ee65408674a3a37b783..5a8f6e94e14b45cf928040817683348ef5492343 100644 --- a/pages/component/input/input.uvue +++ b/pages/component/input/input.uvue @@ -248,6 +248,17 @@ + + + + 设置adjust-position + + + + + + + @@ -282,7 +293,8 @@ holdKeyboard: false, keyboardHeight: 0, focusedForKeyboardHeightChangeTest: false, - demoValue: '123' + demoValue: '123', + adjustPosition: false } }, methods: { @@ -359,6 +371,10 @@ changeHoldKeyboard(event : UniSwitchChangeEvent) { const checked = event.detail.value; this.holdKeyboard = checked + }, + changeAdjustPosition(event : UniSwitchChangeEvent){ + const checked = event.detail.value; + this.adjustPosition = checked } } } diff --git a/pages/component/textarea/textarea.test.js b/pages/component/textarea/textarea.test.js index 9676d2dd9bf8d4adab06f644c6bab39e9ba96d2e..8c9854381a3288bd459cf76d4eb782093ce5bffd 100644 --- a/pages/component/textarea/textarea.test.js +++ b/pages/component/textarea/textarea.test.js @@ -81,4 +81,21 @@ describe('component-native-textarea', () => { expect(await textarea2.value()).toBe("123") }) } + + it("maxlength", async () => { + const input = await page.$('#textarea-instance-maxlength'); + let str = ""; + for(let i = 0;i < 200;i++){ + str += `${i}` + } + await page.setData({ + textareaMaxLengthValue: str + }) + let length = (await input.value()).length + expect(length).toBe(10) + await page.setData({ + textareaMaxLengthValue: "" + }) + }) + }); diff --git a/pages/component/textarea/textarea.uvue b/pages/component/textarea/textarea.uvue index 8b4e0862200d76e529d142382a4455f443af8015..81ac3d87399238df86dd4841573145f4226ce991 100644 --- a/pages/component/textarea/textarea.uvue +++ b/pages/component/textarea/textarea.uvue @@ -1,170 +1,197 @@ - - - - -