You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
608 B

  1. <template>
  2. <view class="container">
  3. <button type="default" @click="open">打开键盘</button>
  4. {{value}}
  5. <cu-keyboard ref="cukeyboard" @change="change" @confirm="confirm" @hide="hide"></cu-keyboard>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. value:''
  13. }
  14. },
  15. mounted() {
  16. },
  17. methods: {
  18. change(e){
  19. this.value = e;
  20. console.log("数字改变",e);
  21. },
  22. open(){
  23. console.log("打开键盘");
  24. this.$refs.cukeyboard.open();
  25. },
  26. confirm(e){
  27. console.log("付款",e);
  28. },
  29. hide(){
  30. console.log("关闭键盘")
  31. }
  32. }
  33. }
  34. </script>
  35. <style>
  36. </style>