length-limiting.vue 460 B

123456789101112131415161718192021222324
  1. <template>
  2. <kk-input
  3. v-model="text"
  4. maxlength="10"
  5. placeholder="Please input"
  6. show-word-limit
  7. type="text"
  8. />
  9. <div style="margin: 20px 0" />
  10. <kk-input
  11. v-model="textarea"
  12. maxlength="30"
  13. placeholder="Please input"
  14. show-word-limit
  15. type="textarea"
  16. />
  17. </template>
  18. <script lang="ts" setup>
  19. import { ref } from 'vue'
  20. import { KkInput } from 'kankan-components'
  21. const text = ref('')
  22. const textarea = ref('')
  23. </script>