GitHub user kfeagle opened a pull request:

    https://github.com/apache/incubator-weex/pull/111

    + [ios] textarea add maxlength ,because android textarea has this attributes

    -  textarea add maxlength ,because android textarea has this attributes
    - demo
    ```html
    <template>
      <div class="wrapper">
        <textarea class="textarea" maxlength=10 @input="oninput" 
@change="onchange" @focus="onfocus" @blur="onblur"></textarea>
      </div>
    </template>
    <script>
      const modal = weex.requireModule('modal')
      export default {
        methods: {
          oninput (event) {
            console.log('oninput:', event.value)
            modal.toast({
              message: `oninput: ${event.value}`,
              duration: 0.8
            })
          },
          onchange (event) {
            console.log('onchange:', event.value)
            modal.toast({
              message: `onchange: ${event.value}`,
              duration: 0.8
            })
          },
          onfocus (event) {
            console.log('onfocus:', event.value)
            modal.toast({
              message: `onfocus: ${event.value}`,
              duration: 0.8
            })
          },
          onblur (event) {
            console.log('onblur:', event.value)
            modal.toast({
              message: `input blur: ${event.value}`,
              duration: 0.8
            })
          }
        }
      }
    </script>
    <style>
      .textarea {
        font-size: 50px;
        width: 650px;
        margin-top: 50px;
        margin-left: 50px;
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 20px;
        padding-right: 20px;
        color: #666666;
        border-width: 2px;
        border-style: solid;
        border-color: #41B883;
        maxlength:10;
      }
    </style>
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kfeagle/incubator-weex 
ios-feature-textarea-maxlength-0.12-dev

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/111.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #111
    
----
commit 7b99f4a3b53089fe43d4731bb143ce9fa21de0f4
Author: kfeagle <[email protected]>
Date:   2017-03-16T02:09:08Z

    + [ios] texture add maxlength ,because android textarea has this attributes

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to