<commit_before><template>
  <div>
    <group title="textarea">
      <x-textarea :max="20" placeholder="请填写详细信息"></x-textarea>
    </group>
    <group title="和input一起使用">
      <x-input placeholder="标题"></x-input>
      <x-textarea :max="200" name="description" placeholder="描述"></x-textarea>
    </group>
    <group title="不显示计数器">
      <x-textarea :max="200" name="detail" placeholder="请填写详细信息" :show-counter="false"></x-textarea>
    </group>
    <group title="set height=200">
      <x-textarea :max="200" placeholder="请填写详细信息" :show-counter="false" :height="200" :rows="8" :cols="30"></x-textarea>
    </group>
    <group title="autosize">
      <x-textarea placeholder="Type something" :show-counter="false" :rows="1" v-ref:autosize></x-textarea>
    </group>
  </div>
</template>

<script>
import { XTextarea, Group, XInput } from '../components'
import Autosize from 'autosize'

export default {
  components: {
    XTextarea,
    Group,
    XInput
  },
  ready () {
    Autosize(this.$refs.autosize.$els.textarea)
  }
}
</script><commit_msg>Textarea: Add destroy handler for autosize<commit_after><template>
  <div>
    <group title="textarea">
      <x-textarea :max="20" placeholder="请填写详细信息"></x-textarea>
    </group>
    <group title="和input一起使用">
      <x-input placeholder="标题"></x-input>
      <x-textarea :max="200" name="description" placeholder="描述"></x-textarea>
    </group>
    <group title="不显示计数器">
      <x-textarea :max="200" name="detail" placeholder="请填写详细信息" :show-counter="false"></x-textarea>
    </group>
    <group title="set height=200">
      <x-textarea :max="200" placeholder="请填写详细信息" :show-counter="false" :height="200" :rows="8" :cols="30"></x-textarea>
    </group>
    <group title="autosize">
      <x-textarea placeholder="Type something" :show-counter="false" :rows="1" v-ref:autosize></x-textarea>
    </group>
  </div>
</template>

<script>
import { XTextarea, Group, XInput } from '../components'
import Autosize from 'autosize'

export default {
  components: {
    XTextarea,
    Group,
    XInput
  },
  ready () {
    Autosize(this.$refs.autosize.$els.textarea)
  },
  beforeDestroy () {
    Autosize.destroy(this.$refs.autosize.$els.textarea)
  }
}
</script>
{'fraction_non_alphanumeric': 0.1920469950293719, 'fraction_numerical': 0.018978761861726163, 'mean_word_length': 3.8130434782608695, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7424258', 'n_tokens_mistral': 844, 'n_tokens_neox': 829, 'n_words': 140}